ack/mach/6500/libem/stil.s

32 lines
700 B
ArmAsm
Raw Permalink Normal View History

1984-12-17 11:03:13 +00:00
.define Stil
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
! This subroutine stores indirect a block of bytes if
! the number of bytes is greater than four.
! The destination address is in registerpair AX.
! The lowbyte of the number of bytes is in Y,
! the highbyte is in zeropage location NBYTES+1.
Stil:
sta ADDR+3 ! destination address (highbyte)
stx ADDR+2 ! destination address (lowbyte)
sty NBYTES ! number of bytes (lowbyte)
clc
lda SP+2
sta ADDR ! source address (lowbyte)
adc NBYTES
sta SP+2 ! new stackpointer (lowbyte)
lda SP+1
sta ADDR+1 ! source address (highbyte)
adc NBYTES+1
sta SP+1 ! new stackpointer (highbyte)
inc NBYTES+1
jmp Blmnp ! do the move