ack/mach/z8000/libem/exg.s

24 lines
284 B
ArmAsm
Raw Permalink Normal View History

1985-01-08 11:48:43 +00:00
.define exg
1987-01-19 10:51:50 +00:00
.sect .text
.sect .rom
.sect .data
.sect .bss
.sect .text
1985-01-08 11:48:43 +00:00
!size (bytes) in R0
exg:
ldm savereg, R4, $10
ldl RR2, RR14
inc R3, $2
ldl RR4, RR2
add R5, R0
sra R0
1: ld R1, *RR2
ex R1, *RR4
ld *RR4, R1
inc R3, $2
inc R5, $2
djnz R0, 1b
ldm R4, savereg, $10
ret