2019-01-21 00:14:17 +00:00
|
|
|
ADIM82
|
2018-11-10 22:41:05 +00:00
|
|
|
PLA
|
|
|
|
STA RETADR
|
|
|
|
PLA
|
|
|
|
STA RETADR+1
|
2019-01-21 00:14:17 +00:00
|
|
|
PLA
|
|
|
|
STA :FILL
|
2018-11-10 22:41:05 +00:00
|
|
|
PLA
|
2019-04-26 22:49:10 +00:00
|
|
|
STA :MCAND
|
2018-11-10 22:41:05 +00:00
|
|
|
PLA
|
|
|
|
STA :AYSIZE
|
|
|
|
STA :AYBAK
|
|
|
|
PLA
|
|
|
|
STA :AXSIZE
|
|
|
|
STA :AXBAK
|
|
|
|
PLA
|
|
|
|
STA ADDR1
|
|
|
|
PLA
|
|
|
|
STA ADDR1+1
|
2018-12-12 19:29:06 +00:00
|
|
|
LDA #0
|
|
|
|
STA :MCAND+1
|
2018-11-10 22:41:05 +00:00
|
|
|
LDA #0
|
|
|
|
TAY
|
|
|
|
STY SCRATCH
|
|
|
|
BEQ :ENTLP
|
|
|
|
:DOADD
|
|
|
|
CLC
|
|
|
|
ADC :AXSIZE
|
|
|
|
TAX
|
|
|
|
TYA
|
|
|
|
ADC SCRATCH
|
|
|
|
TAY
|
|
|
|
TXA
|
|
|
|
:LP
|
|
|
|
ASL :AXSIZE
|
|
|
|
ROL SCRATCH
|
|
|
|
:ENTLP
|
|
|
|
LSR :AYSIZE
|
|
|
|
BCS :DOADD
|
|
|
|
BNE :LP
|
|
|
|
STX :MLIER
|
|
|
|
STY :MLIER+1
|
|
|
|
LDA #0
|
2018-12-12 19:29:06 +00:00
|
|
|
STA :PROD
|
|
|
|
STA :PROD+1
|
2018-11-10 22:41:05 +00:00
|
|
|
STA :PROD+2
|
|
|
|
STA :PROD+3
|
|
|
|
LDX #$10
|
|
|
|
:SHIFTR LSR :MLIER+1
|
|
|
|
ROR :MLIER
|
|
|
|
BCC :ROTR
|
|
|
|
LDA :PROD+2
|
|
|
|
CLC
|
|
|
|
ADC :MCAND
|
|
|
|
STA :PROD+2
|
|
|
|
LDA :PROD+3
|
|
|
|
ADC :MCAND+1
|
|
|
|
:ROTR
|
|
|
|
ROR
|
|
|
|
STA :PROD+3
|
|
|
|
ROR :PROD+2
|
|
|
|
ROR :PROD+1
|
|
|
|
ROR :PROD
|
|
|
|
DEX
|
|
|
|
BNE :SHIFTR
|
2018-12-12 19:29:06 +00:00
|
|
|
CLC
|
2019-04-26 22:49:10 +00:00
|
|
|
INC :PROD
|
2018-11-10 22:41:05 +00:00
|
|
|
INC :PROD
|
|
|
|
INC :PROD
|
2018-12-12 19:29:06 +00:00
|
|
|
BCC :NOCAR
|
|
|
|
INC :PROD+1
|
|
|
|
:NOCAR
|
2019-04-26 22:49:10 +00:00
|
|
|
LDA :FILL
|
|
|
|
LDX :PROD+1
|
2018-11-10 22:41:05 +00:00
|
|
|
; GO BEYOND A 16BIT VALUE;
|
2019-04-26 22:49:10 +00:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2018-11-10 22:41:05 +00:00
|
|
|
BEQ :PART
|
|
|
|
LDY #0
|
|
|
|
:FULL
|
|
|
|
STA (ADDR1),Y
|
|
|
|
INY
|
|
|
|
BNE :FULL
|
|
|
|
INC ADDR1+1
|
|
|
|
DEX
|
2019-04-26 22:49:10 +00:00
|
|
|
BNE :FULL
|
2018-11-10 22:41:05 +00:00
|
|
|
:PART
|
|
|
|
LDX :PROD
|
|
|
|
BEQ :MFEXIT
|
|
|
|
LDY #0
|
|
|
|
:PARTLP
|
|
|
|
STA (ADDR1),Y
|
|
|
|
INY
|
|
|
|
DEX
|
2019-04-26 22:49:10 +00:00
|
|
|
BNE :PARTLP
|
2018-11-10 22:41:05 +00:00
|
|
|
:MFEXIT
|
|
|
|
LDY #0
|
|
|
|
LDA :AXBAK
|
|
|
|
STA (ADDR1),Y
|
|
|
|
INY
|
|
|
|
LDA :AYBAK
|
|
|
|
STA (ADDR1),Y
|
|
|
|
INY
|
|
|
|
LDA :MCAND
|
|
|
|
STA (ADDR1),Y
|
|
|
|
LDA RETADR+1
|
|
|
|
PHA
|
|
|
|
LDA RETADR
|
|
|
|
PHA
|
|
|
|
LDY ADDR1
|
|
|
|
LDX ADDR1+1
|
2018-12-12 19:29:06 +00:00
|
|
|
LDA :PROD
|
|
|
|
STA RETURN
|
|
|
|
LDA :PROD+1
|
|
|
|
STA RETURN+1
|
|
|
|
LDA :PROD+2
|
|
|
|
STA RETURN+2
|
|
|
|
LDA :PROD+3
|
|
|
|
STA RETURN+3
|
2019-04-26 22:49:10 +00:00
|
|
|
LDA #4
|
2018-12-12 19:29:06 +00:00
|
|
|
STA RETLEN
|
|
|
|
LDA :MCAND
|
2018-11-10 22:41:05 +00:00
|
|
|
RTS
|
|
|
|
:PROD DS 4
|
|
|
|
:AXSIZE DS 1
|
|
|
|
:AYSIZE DS 1
|
|
|
|
:AXBAK DS 1
|
|
|
|
:AYBAK DS 1
|
|
|
|
:MLIER DS 2
|
|
|
|
:MCAND DS 2
|
2019-01-21 00:14:17 +00:00
|
|
|
:FILL DS 1
|