ack/mach/m65oo2/libem/dup.s

18 lines
229 B
ArmAsm
Raw Normal View History

2024-02-22 15:13:52 +00:00
.sect .text; .sect .rom; .sect .data; .sect .bss
.define .dup
! #bytes in cx
.sect .text
.dup:
pop bx ! return address
mov ax,si
mov dx,di
mov si,sp
sub sp,cx
mov di,sp
sar cx,1
rep movs
mov si,ax
mov di,dx
jmp bx