ack/mach/6500/libem/sdl.s

31 lines
424 B
ArmAsm
Raw Permalink Normal View History

1984-12-17 11:03:13 +00:00
.define Sdi, Sdo
1987-01-30 18:41:42 +00:00
.sect .text
.sect .rom
.sect .data
.sect .bss
.sect .text
1984-12-17 11:03:13 +00:00
! The subroutine Sdi takes a fourbyte word and stores it
! at the address in registerpair AX.
! If the address is in zeropage, Sdo is used.
Sdi:
stx ADDR ! address (lowbyte)
sta ADDR+1 ! address (highbyte)
Sdo:
ldy #0
1: jsr Pop
pha
txa
sta (ADDR),y ! store lowbyte
iny
pla
sta (ADDR),y ! store highbyte
iny
cpy #4
bne 1b
rts