/* This C language subroutine copies one range of memory into another. The Run Time Library for the C Language. Gordon A. Sterling (617) 461 - 3076 DSP Development Tools Engineering Created on 4/30/90 Updated on 5/94 by AS Updated on 2/95 by AS - separated polymorphic functions #include
void *memcpy(void *s1, const void *s2, size_t size); */ #include "lib_glob.h" #include "str_glob.h" .SEGMENT/CODE Code_Space_Name; .FILE RTL_FILENAME; .GLOBAL ___memcpyPP; ___memcpyPP: copy_core: R12=PASS R12, R1=pma_i; IF EQ JUMP (PC, restore_state) (DB); pm_to_pm_copy: pm_ptr=R8; /*Point to input*/ pma_i=R4; /*Point to output*/ LCNTR=R12, DO pm_pm UNTIL LCE; /*Loop n times*/ R2=PM(pm_ptr,1); pm_pm: PM(pma_i,1)=R2; restore_state: R0=PASS R4, FETCH_RETURN pma_i=R1; RETURN (DB); RESTORE_STACK RESTORE_FRAME .ENDSEG;