mirror of
https://github.com/nathanriggs/AppleIIAsm-Collection.git
synced 2024-11-27 12:49:27 +00:00
795dc18833
- Some major bugfixes - more compact commenting - added required.lib, mac and hooks - changed array get routines to copy appropriate element to memory address designated as "return" - created .min versions of each file that has no comments to save space in large projects - reordered catalog alphabetically
92 lines
1.6 KiB
Plaintext
92 lines
1.6 KiB
Plaintext
SKP 10
|
|
ADIM81
|
|
PLA
|
|
STA RETADR
|
|
PLA
|
|
STA RETADR+1
|
|
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 #0
|
|
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
|
|
SKP 10
|