AppleIIAsm-Collection/source/disk2_common/T.MIN.SUB.MEMFILL
nathanriggs c8cac53c5e Rev 0.4 updates
Massive updates that changes the way most subroutines are handled. Major bugfixes, various utilities added, started higher-level libraries.
2019-04-26 18:49:10 -04:00

44 lines
860 B
Plaintext

MEMFILL
PLA
STA RETADR
PLA
STA RETADR+1
PLA
STA :VALUE
PLA
STA :ARYSZ
PLA
STA :ARYSZ+1
PLA
STA ADDR1
PLA
STA ADDR1+1
LDA :VALUE
LDX :ARYSZ+1
BEQ :PARTPG
LDY #0
:FULLPG
STA (ADDR1),Y
INY
BNE :FULLPG
INC ADDR1+1
DEX
BNE :FULLPG
:PARTPG
LDX :ARYSZ ;GET # OF BYTES IN FINAL PAGE
BEQ :EXIT
LDY #0
:PARTLP
STA (ADDR1),Y
INY
DEX
BNE :PARTLP
:EXIT
LDA RETADR+1
PHA
LDA RETADR
PHA
RTS
:VALUE DS 1
:ARYSZ DS 2