AppleIIAsm-Collection/disks/disk1_stdio/T.TXTPUT.SUB.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

47 lines
980 B
Plaintext

TXTPUT
PLA
STA RETADR
PLA
STA RETADR+1
PLA
STA :F ; FILL
PLA
STA :Y
PLA
STA :X
LDA ERRCTRL
CMP #1
BEQ :CHKERR
JMP :ERREND
:CHKERR
LDA :X
CMP #40 ; MAX COL + 1
BCS :XOVF
LDA :Y
CMP #24
BCS :YOVF
JMP :ERREND
:XOVF
_ERR :E_SID;:E_XOF;:E_DMP1;:F;#3
JMP :ERREND
:YOVF
_ERR :E_SID;:E_YOF;:E_DMP1;:F;#3
:ERREND
LDA :Y
LDY :X
JSR $F847
LDA :F
STA ($26),Y
LDA RETADR+1
PHA
LDA RETADR
PHA
RTS
:F DS 1
:Y DS 1
:X DS 1
:E_SID ASC "TXTPUT (TPUT MACRO)",00
:E_DMP1 ASC "DUMPING F(1) Y(1) X(1):",00
:E_XOF ASC "X OVERFLOW. X <> MIN/MAX",00
:E_YOF ASC "Y OVERFLOW. Y <> MIN/MAX",00