mirror of
https://github.com/nathanriggs/AppleIIAsm-Collection.git
synced 2024-12-02 12:52:03 +00:00
c8cac53c5e
Massive updates that changes the way most subroutines are handled. Major bugfixes, various utilities added, started higher-level libraries.
204 lines
4.1 KiB
Plaintext
204 lines
4.1 KiB
Plaintext
*``````````````````````````````*
|
|
* CURSFOR :: MOVE CURSOR FORWD *
|
|
*- -*
|
|
* FLAGS: NZC----- REG: AYM- *
|
|
* CYCLES: 20 *
|
|
*- -*
|
|
* USAGE: *
|
|
* LDA (AMT TO MOVE) *
|
|
* JSR CURSFOR *
|
|
*,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,*
|
|
*
|
|
CURSFOR
|
|
CLC
|
|
ADC CURSH
|
|
STA CURSH
|
|
*
|
|
********************************
|
|
*
|
|
** ERROR CONTROL
|
|
*
|
|
********************************
|
|
*
|
|
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
|
|
*
|
|
** DATA
|
|
*
|
|
: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 :: MOVE CURSOR BACKWD *
|
|
* *
|
|
*- -*
|
|
* FLAGS: NZC----- REG: AYM- *
|
|
* CYCLES: 26 *
|
|
*- -*
|
|
* USAGE: *
|
|
* LDA (AMT TO MOVE) *
|
|
* JSR CURSBAK *
|
|
*,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,*
|
|
*
|
|
CURSBAK
|
|
SEC
|
|
STA SCRATCH
|
|
LDA CURSH
|
|
SBC SCRATCH
|
|
STA CURSH
|
|
*
|
|
********************************
|
|
*
|
|
** ERROR CONTROL
|
|
*
|
|
********************************
|
|
*
|
|
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
|
|
*
|
|
** DATA
|
|
*
|
|
: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 :: MOVE CURSOR DOWN *
|
|
* *
|
|
*- -*
|
|
* FLAGS: NZC----- REG: AYM- *
|
|
* CYCLES: 20 *
|
|
*- -*
|
|
* USAGE: *
|
|
* LDA (AMT TO MOVE) *
|
|
* JSR CURSDN *
|
|
*,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,*
|
|
*
|
|
CURSDN
|
|
CLC
|
|
ADC CURSV
|
|
STA CURSV
|
|
*
|
|
********************************
|
|
*
|
|
** ERROR CONTROL
|
|
*
|
|
********************************
|
|
*
|
|
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
|
|
*
|
|
** DATA
|
|
*
|
|
: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 :: MOVE CURSOR UP *
|
|
* *
|
|
*- -*
|
|
* FLAGS: NZC----- REG: AYM- *
|
|
* CYCLES: 26 *
|
|
*- -*
|
|
* USAGE: *
|
|
* LDA (AMT TO MOVE) *
|
|
* JSR CURSUP *
|
|
*,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,*
|
|
*
|
|
CURSUP
|
|
SEC
|
|
STA SCRATCH
|
|
LDA CURSV
|
|
SBC SCRATCH
|
|
STA CURSV
|
|
*
|
|
********************************
|
|
*
|
|
** ERROR CONTROL
|
|
*
|
|
********************************
|
|
*
|
|
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
|
|
*
|
|
** DATA
|
|
*
|
|
:E_SID ASC "CURSUP (CURU MACRO)",00
|
|
:E_DMP1 ASC "DUMPING RETURN BLOCK...",00
|
|
:E_YOF ASC "CURSOR Y OVERFLOW: Y <> MIN/MAX",00
|
|
*
|