函數(shù)原型
extern void fastcpy(void *s1, void *s2, char n);
匯編代碼
NAME FASTCPY
#include "CH552.H"
?PR?_fastcpy?FASTCPYSEGMENTCODE
?DT?_fastcpy?FASTCPYSEGMENTDATA OVERLAYABLE
PUBLIC_fastcpy
PUBLIC?_fastcpy?BYTE
RSEG?DT?_fastcpy?FASTCPY
?_fastcpy?BYTE:
DS7
RSEG?PR?_fastcpy?FASTCPY
_fastcpy:
INCXBUS_AUX
MOVDPL,R1
MOVDPH,R2
DECXBUS_AUX
MOVDPL,?_fastcpy?BYTE+05H
MOVDPH,?_fastcpy?BYTE+04H
MOVR7,?_fastcpy?BYTE+06H
LOOP:MOVXA,@DPTR
INCDPTR
DB0A5H
DJNZR7,LOOP
RET
END
熱門產(chǎn)品 :
CH592: RISC-V內(nèi)核BLE5.4無線MCU