ack/mach/6500/libem/sti.s

30 lines
559 B
ArmAsm
Raw Normal View History

1984-12-17 11:03:13 +00:00
.define Sti, Sext, Stii
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 Sti stores an twobyte word at the address which
! is in registerpair AX.
! The subroutine Sext is used when the address is already in
! zeropage.
! The subroutine Stii is used when the address is in zeropage
! and the registerpair AX contains the word.
Sti:
stx ADDR ! address of word (lowbyte)
sta ADDR+1 ! address of word (highbyte)
Sext:
jsr Pop ! get word
Stii:
ldy #1
sta (ADDR),y ! store highbyte
dey
txa
sta (ADDR),y ! store lowbyte
rts