mirror of
https://github.com/nathanriggs/AppleIIAsm-Collection.git
synced 2024-11-27 12:49:27 +00:00
9b12b6fd9b
- getting ready for major changes for 0.6.0. - be sure to download the 0.5.0 release to ensure proper functionality, as these rountines will not work together in the SRC or BIN folder during the transition - Beginning to significantly alter documentation
85 lines
1.8 KiB
NASM
85 lines
1.8 KiB
NASM
]ADDRD EQU WPAR1
|
|
]ASIZE EQU WPAR2
|
|
]ESIZE EQU WPAR3
|
|
]FILL EQU BPAR1
|
|
]MSIZE EQU VARTAB
|
|
]ASZBAK EQU VARTAB+4
|
|
]ESZBAK EQU VARTAB+7
|
|
ADIM161
|
|
LDA ]ESIZE
|
|
STA ]ESZBAK
|
|
LDA ]ASIZE
|
|
STA ]ASZBAK
|
|
LDA ]ASIZE+1
|
|
STA ]ASZBAK+1
|
|
STA SCRATCH
|
|
LDA ]ADDRD
|
|
STA ADDR2
|
|
LDA ]ADDRD+1
|
|
STA ADDR2+1
|
|
LDY #0
|
|
LDA #0
|
|
BEQ :ENTLP
|
|
:DOADD
|
|
CLC
|
|
ADC ]ASIZE
|
|
TAX
|
|
TYA
|
|
ADC SCRATCH
|
|
TAY
|
|
TXA
|
|
:LP
|
|
ASL ]ASIZE
|
|
ROL SCRATCH
|
|
:ENTLP
|
|
LSR ]ESIZE
|
|
BCS :DOADD
|
|
BNE :LP
|
|
CLC
|
|
TXA
|
|
ADC #3
|
|
STA ]MSIZE
|
|
TYA
|
|
ADC #0
|
|
STA ]MSIZE+1
|
|
LDA ]FILL
|
|
LDX ]MSIZE+1
|
|
BEQ :PART
|
|
LDY #0
|
|
:FULL
|
|
STA (]ADDRD),Y
|
|
INY
|
|
BNE :FULL
|
|
INC ]ADDRD+1
|
|
DEX
|
|
BNE :FULL
|
|
:PART
|
|
LDX ]MSIZE
|
|
BEQ :MFEXIT
|
|
LDY #0
|
|
:PARTLP
|
|
STA (]ADDRD),Y
|
|
INY
|
|
DEX
|
|
BNE :PARTLP
|
|
:MFEXIT
|
|
LDY #0
|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