ack/mach/i86/libem/exg.s

23 lines
251 B
ArmAsm
Raw Normal View History

1987-01-08 10:13:48 +00:00
.sect .text; .sect .rom; .sect .data; .sect .bss
1985-02-07 15:33:13 +00:00
.define .exg
! #bytes in cx
1987-01-08 10:13:48 +00:00
.sect .text
1985-02-07 15:33:13 +00:00
.exg:
push di
1989-05-16 16:02:46 +00:00
mov di,sp
add di,4
mov bx,di
add bx,cx
1985-02-07 15:33:13 +00:00
sar cx,1
1:
mov ax,(bx)
xchg ax,(di)
mov (bx),ax
1989-05-16 16:02:46 +00:00
add di,2
add bx,2
loop 1b
2:
pop di
ret