mirror of
https://github.com/nathanriggs/AppleIIAsm-Collection.git
synced 2024-12-02 12:52:03 +00:00
c8cac53c5e
Massive updates that changes the way most subroutines are handled. Major bugfixes, various utilities added, started higher-level libraries.
93 lines
1.7 KiB
Plaintext
93 lines
1.7 KiB
Plaintext
ADIM81
|
|
PLA
|
|
STA RETADR
|
|
PLA
|
|
STA RETADR+1
|
|
PLA
|
|
STA :FILL
|
|
PLA
|
|
STA :ESIZE
|
|
STA :ESZBAK
|
|
PLA
|
|
STA :ASIZE
|
|
STA :ASZBAK
|
|
PLA
|
|
STA ADDR1
|
|
PLA
|
|
STA ADDR1+1
|
|
LDY #0
|
|
LDA #0
|
|
STY SCRATCH
|
|
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
|
|
INX
|
|
INX
|
|
|
|
BCC :NOINY
|
|
INY
|
|
:NOINY
|
|
STX :MSIZE
|
|
STY :MSIZE+1
|
|
LDA :FILL
|
|
LDX :MSIZE+1
|
|
BEQ :PART
|
|
LDY #0
|
|
:FULL
|
|
STA (ADDR1),Y
|
|
INY
|
|
BNE :FULL
|
|
INC ADDR1+1
|
|
DEX
|
|
BNE :FULL
|
|
:PART
|
|
LDX :MSIZE
|
|
BEQ :MFEXIT
|
|
LDY #0
|
|
:PARTLP
|
|
STA (ADDR1),Y
|
|
INY
|
|
DEX
|
|
BNE :PARTLP
|
|
:MFEXIT
|
|
LDY #0
|
|
LDA :ASZBAK
|
|
STA (ADDR1),Y
|
|
INY
|
|
LDA :ESZBAK
|
|
STA (ADDR1),Y
|
|
LDA RETADR+1
|
|
PHA
|
|
LDA RETADR
|
|
PHA
|
|
LDY ADDR1
|
|
LDX ADDR1+1
|
|
LDA :ASZBAK
|
|
LDA :MSIZE
|
|
STA RETURN
|
|
LDA :MSIZE+1
|
|
STA RETURN+1
|
|
LDA #2
|
|
STA RETLEN
|
|
RTS
|
|
:MSIZE DS 2
|
|
:ASIZE DS 1
|
|
:ESIZE DS 1
|
|
:ASZBAK DS 1
|
|
:ESZBAK DS 1
|
|
:FILL DS 1
|