mirror of
https://github.com/nathanriggs/AppleIIAsm-Collection.git
synced 2024-12-02 12:52:03 +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
451 lines
8.4 KiB
NASM
451 lines
8.4 KiB
NASM
IFJ MAC
|
|
STA SCRATCH
|
|
LDA ]1
|
|
CMP ]3
|
|
IF ]2,E
|
|
BEQ ]J4
|
|
FIN
|
|
IF ]2,N
|
|
BNE ]J4
|
|
FIN
|
|
IF ]2,G
|
|
BEQ ]SKPGT
|
|
BCS ]J4
|
|
]SKPGT
|
|
FIN
|
|
IF ]2,L
|
|
BCC ]J4
|
|
FIN
|
|
IF ]2,)
|
|
BCS ]J4
|
|
FIN
|
|
IF ]2,(
|
|
BEQ ]J4
|
|
BCC ]J4
|
|
FIN
|
|
JMP ]EXIT
|
|
]J4
|
|
LDA SCRATCH
|
|
JMP ]4
|
|
]EXIT
|
|
LDA SCRATCH
|
|
<<<
|
|
IFJE MAC
|
|
STA SCRATCH
|
|
LDA ]1
|
|
CMP ]3
|
|
IF ]2,E
|
|
BEQ ]J4
|
|
JMP ]5
|
|
FIN
|
|
IF ]2,N
|
|
BNE ]J4
|
|
JMP ]5
|
|
FIN
|
|
IF ]2,G
|
|
BEQ ]SKPGT
|
|
BCS ]J4
|
|
]SKPGT
|
|
JMP ]5
|
|
FIN
|
|
IF ]2,L
|
|
BCC ]J4
|
|
FIN
|
|
IF ]2,)
|
|
BCS ]J4
|
|
JMP ]5
|
|
FIN
|
|
IF ]2,(
|
|
BEQ ]J4
|
|
BCC ]J4
|
|
JMP ]5
|
|
FIN
|
|
JMP ]EXIT
|
|
]J4
|
|
LDA SCRATCH
|
|
JMP ]4
|
|
]EXIT
|
|
LDA SCRATCH
|
|
<<<
|
|
IFRJ MAC
|
|
STA SCRATCH
|
|
STX RESULT
|
|
STY RESULT+1
|
|
IF ]1,A
|
|
LDA SCRATCH
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