mirror of
https://github.com/nathanriggs/AppleIIAsm-Collection.git
synced 2024-12-10 17:52:35 +00:00
f5c097e70f
- 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.
89 lines
2.0 KiB
Plaintext
89 lines
2.0 KiB
Plaintext
CURSFOR
|
|
CLC
|
|
ADC CURSH
|
|
STA CURSH
|
|
LDA ERRCTRL
|
|
CMP #1
|
|
BEQ :CHKERR
|
|
JMP :ERREND
|
|
:CHKERR
|
|
LDA CURSH
|
|
CMP #40 ; MAX COL + 1
|
|
BCS :XOVF
|
|
JMP :ERREND
|
|
:XOVF
|
|
_ERR :E_SID;:E_XOF;:E_DMP1;RETURN;#10
|
|
:ERREND
|
|
JSR VTAB
|
|
RTS
|
|
:E_SID ASC "CURSFOR (CURF MACRO)",00
|
|
:E_DMP1 ASC "DUMPING RETURN BLOCK...",00
|
|
:E_XOF ASC "CURSOR X OVERFLOW: X <> MIN/MAX",00
|
|
CURSBAK
|
|
SEC
|
|
STA SCRATCH
|
|
LDA CURSH
|
|
SBC SCRATCH
|
|
STA CURSH
|
|
LDA ERRCTRL
|
|
CMP #1
|
|
BEQ :CHKERR
|
|
JMP :ERREND
|
|
:CHKERR
|
|
LDA CURSH
|
|
CMP #40 ; MIN COLUMN
|
|
BCS :XOVF
|
|
JMP :ERREND
|
|
:XOVF
|
|
_ERR :E_SID;:E_XOF;:E_DMP1;RETURN;#10
|
|
:ERREND
|
|
JSR VTAB
|
|
RTS
|
|
:E_SID ASC "CURSBAK (CURB MACRO)",00
|
|
:E_DMP1 ASC "DUMPING RETURN BLOCK...",00
|
|
:E_XOF ASC "CURSOR X OVERFLOW: X <> MIN/MAX",00
|
|
CURSDN
|
|
CLC
|
|
ADC CURSV
|
|
STA CURSV
|
|
LDA ERRCTRL
|
|
CMP #1
|
|
BEQ :CHKERR
|
|
JMP :ERREND
|
|
:CHKERR
|
|
LDA CURSV
|
|
CMP #24 ; MAX ROWS
|
|
BCS :YOVF
|
|
JMP :ERREND
|
|
:YOVF
|
|
_ERR :E_SID;:E_YOF;:E_DMP1;RETURN;#10
|
|
:ERREND
|
|
JSR VTAB
|
|
RTS
|
|
:E_SID ASC "CURSDN (CURD MACRO)",00
|
|
:E_DMP1 ASC "DUMPING RETURN BLOCK...",00
|
|
:E_YOF ASC "CURSOR Y OVERFLOW: Y <> MIN/MAX",00
|
|
CURSUP
|
|
SEC
|
|
STA SCRATCH
|
|
LDA CURSV
|
|
SBC SCRATCH
|
|
STA CURSV
|
|
LDA ERRCTRL
|
|
CMP #1
|
|
BEQ :CHKERR
|
|
JMP :ERREND
|
|
:CHKERR
|
|
LDA CURSV
|
|
CMP #24 ; MAX ROWS
|
|
BCS :YOVF
|
|
JMP :ERREND
|
|
:YOVF
|
|
_ERR :E_SID;:E_YOF;:E_DMP1;RETURN;#10
|
|
:ERREND
|
|
JSR VTAB
|
|
RTS
|
|
:E_SID ASC "CURSUP (CURU MACRO)",00
|
|
:E_DMP1 ASC "DUMPING RETURN BLOCK...",00
|
|
:E_YOF ASC "CURSOR Y OVERFLOW: Y <> MIN/MAX",00
|