AppleIIAsm-Collection/disks/disk1_stdio/T.REQUIRED.MAC.MIN
nathanriggs f5c097e70f STDIO disk 0.3.0 update
- added error handling
- no more massive library; just a subroutine per file. This is because Merlin doesn't like large files.
- added a "minify" BASIC utility that gets rid of *most* comments in a source textfile. This dramatically reduces space used if you're not terribly interested in non-inline comments.
- TFILL,THLIN,TVLIN and TPUT not directly access the video memory (page one), making for a much faster draw without interfering COUT.
- some stylistic changes, primarily to TFILL
- change required files to minified versions only. The whole files can be found on disk 2.
- got a norovirus so pretty much couldn't do anything requiring sustained attention, so focused on small things here and not on my dayjob. Cool.
- created a required.vars file that separates variables and settings from the other required files. Not minified.
- This current bout of revision will probably be the last, once all initial 6 disks are revamped, that focuses on all subroutines/macros in a given library at a single push. After this round, commits will be done on a subroutine or related file basis.
2019-01-13 23:48:09 -05:00

95 lines
1.8 KiB
Plaintext

_ISLIT MAC
IF #=]1 ; IF ]1 IS A LITERAL
LDA ]1/$100 ; GET HI
PHA
LDA ]1 ; GET LO
PHA
ELSE ; ]1 IS ADDRESS
LDA ]1+1 ; SO GET HIGH VAL FROM ADDR
PHA
LDA ]1 ; THEN LO VAL
PHA
FIN
<<<
_ISSTR MAC
IF "=]1 ; IF ]1 IS A STRING
JMP STRCONT
]STRTMP STR ]1
STRCONT
LDY #0
LDA ]STRTMP
STA PARLEN
STA PARAM
]STRLP1
INY
LDA ]STRTMP,Y
STA PARAM,Y
CPY PARLEN
BNE ]STRLP1
LDA #>PARAM ; GET HI
PHA
LDA #<PARAM ; GET LO
PHA
ELSE ; ]1 IS ADDRESS
LDA #>]1 ; SO GET HIBYTE OF ADDR
PHA
LDA #<]1 ; THEN LOBYTE
PHA
FIN
<<<
_GRET MAC
LDA #>]1
PHA
LDA #<]1
PHA
JSR __GETRET
<<<
_SPAR MAC
LDA #>]1
PHA
LDA #<]1
PHA
JSR __SETPARM
<<<
_DUMP MAC
LDA #>]1
PHA
LDA #<]1
PHA
LDA ]2
PHA
JSR __DUMP
<<<
_PRNT MAC
JSR __P
ASC ]1
HEX 00
<<<
_WAIT MAC
JSR __W
<<<
_RDUMP MAC
JSR __RDMP
<<<
_ERR MAC
LDA #>]1
PHA
LDA #<]1
PHA
LDA #>]2
PHA
LDA #<]2
PHA
LDA #>]3
PHA
LDA #<]3
PHA
LDA #>]4
PHA
LDA #<]4
PHA
LDA ]5
PHA
JSR __ERR
<<<