Before you can use DAT_copy you have to open the DAT module using DAT_open(...). This allocates 4 Transfer Completion Codes (TCC). This means we can issue 4 DAT_copy(...) calls before having to wait for copy completion using DAT_wait(...).
When creating a general purpose copy routine, we have to consider few scenarios to make use of the features of the DAT_copy.
Scenario 1: payload size is less than 65,535
In this case it's simply a single DAT_copy(...) call and DAT_wait(...)
Scenario 2: payload size is more than 65,535 but less than (65,535 * 4)
In this case we issue 'n' number of DAT_copy(...) calls, where n is between 1 and 5
Scenario 3: payload size is more than (65,535 *4)
In this case we issue integer number of blocks of 4 DAT_Copy(...) calls and for the problem would be reduced to a Scenario 2 or Scenario 1.