ack/mach/m65oo2/libem/cms.s

24 lines
328 B
ArmAsm
Raw Normal View History

2024-02-22 15:13:52 +00:00
.sect .text; .sect .rom; .sect .data; .sect .bss
.define .cms
! #bytes in cx
.sect .text
.cms:
pop bx ! return address
mov dx,sp
push si
push di
mov si,dx
add dx,cx
mov di,dx
add dx,cx
sar cx,1
repe cmps
je 1f
inc cx
1:
pop di
pop si
mov sp,dx
jmp bx