ack/mach/z80/libem/exg.s

31 lines
269 B
ArmAsm
Raw Normal View History

1985-03-29 21:44:50 +00:00
.define .exg
1987-02-02 13:30:20 +00:00
.sect .text
.sect .rom
.sect .data
.sect .bss
.sect .text
1985-03-29 21:44:50 +00:00
.exg:
pop ix
pop de
ld hl,0
add hl,sp
ld b,h
ld c,l
add hl,de
1:
ld a,(bc)
ex af,af2
ld a,(hl)
ld (bc),a
ex af,af2
ld (hl),a
inc bc
inc hl
dec de
ld a,d
or e
jr nz,1b
jp (ix)