begin implementing DMAgic COPY operation.
fix bugs in DMAgic COPY.