ENTRY mark the first instruction to call
start
LDR r1, =srcstr pointer to first string
LDR r0, =dststr pointer to second string
BL strcopy
call subroutine to do copy
stop
MOV r0,
#0x18
LDR r1,
=0x20026
SWI
0x123456
strcopy
LDRB r2, [r1],#1
STRB r2, [r0],#1
CMP r2, #0
BNE strcopy
MOV pc,lr
Return
AREA Strings, DATA, READWRITE
srcstr DCB First string - source,0
dststr DCB Second string - destination,0
END
试试,
欢迎分享,转载请注明来源:内存溢出
评论列表(0条)