2018-11-03 18:59:24 +00:00
|
|
|
*
|
|
|
|
*-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=*
|
|
|
|
* *
|
|
|
|
* STDIO.MAC *
|
|
|
|
* *
|
|
|
|
* AUTHOR: NATHAN RIGGS *
|
|
|
|
* CONTACT: NATHAN.RIGGS@ *
|
|
|
|
* OUTLOOK.COM *
|
|
|
|
* *
|
2019-01-14 04:48:09 +00:00
|
|
|
* VERSION: 0.2.0 *
|
|
|
|
* DATE: 12-DEC-2018 *
|
2018-11-03 18:59:24 +00:00
|
|
|
* ASSEMBLER: MERLIN 8 PRO *
|
2019-01-14 04:48:09 +00:00
|
|
|
* LICENSE: APACHE 2.0 *
|
|
|
|
* OS: DOS 3.3 *
|
2018-11-03 18:59:24 +00:00
|
|
|
* *
|
|
|
|
*------------------------------*
|
|
|
|
* *
|
|
|
|
* THIS IS A MACRO LIBRARY FOR *
|
2019-04-26 22:49:10 +00:00
|
|
|
* STANDARD INPUT AND OUTPUT. *
|
|
|
|
* *
|
|
|
|
* SUBROUTINES FILES USED: *
|
|
|
|
* *
|
|
|
|
* SUB.XPRINT *
|
|
|
|
* SUB.DPRINT *
|
|
|
|
* SUB.SINPUT *
|
|
|
|
* SUB.GKEY *
|
|
|
|
* SUB.CURSOR *
|
|
|
|
* SUB.GPBX *
|
|
|
|
* SUB.TVLINE *
|
|
|
|
* SUB.THLINE *
|
|
|
|
* SUB.TFILLA *
|
|
|
|
* SUB.TXTPUT *
|
2018-11-03 18:59:24 +00:00
|
|
|
* *
|
|
|
|
*------------------------------*
|
|
|
|
* *
|
|
|
|
* LIST OF MACROS *
|
|
|
|
* *
|
2019-01-14 04:48:09 +00:00
|
|
|
* PRN : FLEXIBLE PRINT *
|
2019-04-26 22:49:10 +00:00
|
|
|
* INP : STRING INPUT *
|
2019-01-14 04:48:09 +00:00
|
|
|
* GKEY : GET SINGLE KEY *
|
|
|
|
* SCPOS : SET CURS POS AT X,Y *
|
|
|
|
* SETCX : SET CURSOR X *
|
|
|
|
* SETCY : SET CURSOR Y *
|
|
|
|
* CURF : CURSOR FORWARD *
|
|
|
|
* CURB : CURSOR BACKWARD *
|
|
|
|
* CURU : CURSOR UP *
|
|
|
|
* CURD : CURSOR DOWN *
|
|
|
|
* RCPOS : READ CURSOR POSITION *
|
|
|
|
* PDL : READ PADDLE STATE *
|
|
|
|
* PBX : READ PDL BTN X *
|
|
|
|
* TVLIN : TEXT VERTICAL LINE *
|
|
|
|
* THLIN : TEXT HORIZ LINE *
|
|
|
|
* TFILL : TEXT FILL AREA *
|
|
|
|
* TPUT : TEXT CHAR PLOT AT XY *
|
2019-04-26 22:49:10 +00:00
|
|
|
* COL40 : FORCE 40COL MODE *
|
|
|
|
* COL80 : FORCE 80COL MODE *
|
|
|
|
* DIE80 : KILL 80COL FIRMWARE *
|
|
|
|
* MTXT0 : DISABLE MOUSETEXT *
|
|
|
|
* MTXT1 : ENABLE MOUSETEXT *
|
|
|
|
* WAIT : WAIT FOR KEYPRESS *
|
2018-11-03 18:59:24 +00:00
|
|
|
* *
|
|
|
|
*-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=*
|
|
|
|
*
|
|
|
|
*``````````````````````````````*
|
2019-01-14 04:48:09 +00:00
|
|
|
* PRN :: PRINT (NO <CR> ) *
|
2018-11-03 18:59:24 +00:00
|
|
|
*- -*
|
|
|
|
* EITHER PRINTS A STRING OF *
|
|
|
|
* TEXT PROVIDED, OR PRINTS THE *
|
|
|
|
* DATA FOUND AT THE SPECIFIED *
|
|
|
|
* MEMORY LOCATION. *
|
|
|
|
*- -*
|
|
|
|
* PARAMETERS *
|
|
|
|
* *
|
|
|
|
* IF FIRST LETTER OF VAR1 IS *
|
|
|
|
* A QUOTATION MARK, THEN PASS *
|
|
|
|
* CONTROL TO XPRINT. *
|
|
|
|
* *
|
|
|
|
* IF FIRST LETTER OF VAR1 IS *
|
|
|
|
* A DOLLAR SIGN, THEN IT IS A *
|
|
|
|
* MEMORY LOCATION, SO PASS TO *
|
|
|
|
* DPRINT. *
|
|
|
|
*- -*
|
|
|
|
* SAMPLE USAGE: *
|
|
|
|
* *
|
2019-01-14 04:48:09 +00:00
|
|
|
* PRN "HELLO!" *
|
|
|
|
* PRN $300 *
|
2018-11-03 18:59:24 +00:00
|
|
|
*,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,*
|
|
|
|
*
|
2019-01-14 04:48:09 +00:00
|
|
|
PRN MAC
|
2018-11-03 18:59:24 +00:00
|
|
|
IF ",]1 ; --- IF PARAM=STRING
|
|
|
|
JSR XPRINT ; SPECIAL PRINT
|
|
|
|
ASC ]1 ; PUT STRING HERE
|
|
|
|
HEX 00 ; STRING TERMINATE
|
|
|
|
ELSE ; ELSE, PARAM IS
|
|
|
|
; MEMORY LOCATION
|
2019-04-26 22:49:10 +00:00
|
|
|
_ISLIT ]1
|
2018-11-03 18:59:24 +00:00
|
|
|
JSR DPRINT
|
|
|
|
FIN
|
|
|
|
<<<
|
|
|
|
*
|
|
|
|
*``````````````````````````````*
|
2019-01-14 04:48:09 +00:00
|
|
|
* INP: INPUT MACRO *
|
2018-11-03 18:59:24 +00:00
|
|
|
* *
|
|
|
|
* INPUTS A STRING FROM KEYBRD *
|
2019-01-14 04:48:09 +00:00
|
|
|
* AND STORES IT IN [RETURN] *
|
2018-11-03 18:59:24 +00:00
|
|
|
*- -*
|
|
|
|
* SAMPLE USAGE: *
|
|
|
|
* *
|
2019-01-14 04:48:09 +00:00
|
|
|
* INP *
|
2018-11-03 18:59:24 +00:00
|
|
|
*,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,*
|
|
|
|
*
|
2019-01-14 04:48:09 +00:00
|
|
|
INP MAC
|
2018-11-03 18:59:24 +00:00
|
|
|
JSR SINPUT
|
|
|
|
<<<
|
|
|
|
*
|
|
|
|
*``````````````````````````````*
|
2019-01-14 04:48:09 +00:00
|
|
|
* GKEY GETKEY *
|
2018-11-03 18:59:24 +00:00
|
|
|
* *
|
|
|
|
* WAITS FOR USER TO PRESS A *
|
2019-01-14 04:48:09 +00:00
|
|
|
* KEY, THEN STORES THAT IN .A *
|
2018-11-03 18:59:24 +00:00
|
|
|
*- -*
|
|
|
|
* SAMPLE USAGE: *
|
|
|
|
* *
|
2019-01-14 04:48:09 +00:00
|
|
|
* GKEY *
|
2018-11-03 18:59:24 +00:00
|
|
|
*,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,*
|
|
|
|
*
|
2019-01-14 04:48:09 +00:00
|
|
|
GKEY MAC
|
2018-11-03 18:59:24 +00:00
|
|
|
JSR GETKEY
|
2019-01-14 04:48:09 +00:00
|
|
|
LDY #0
|
|
|
|
STY STROBE
|
2018-11-03 18:59:24 +00:00
|
|
|
<<<
|
|
|
|
*
|
|
|
|
*``````````````````````````````*
|
2019-01-14 04:48:09 +00:00
|
|
|
* SCPOS : POSITION CURSOR X,Y *
|
2018-11-03 18:59:24 +00:00
|
|
|
*- -*
|
|
|
|
* SETS THE CURSOR POSITION. *
|
|
|
|
*- -*
|
|
|
|
* PARAMETERS *
|
|
|
|
* *
|
2019-01-14 04:48:09 +00:00
|
|
|
* ]1 = X POSITION *
|
|
|
|
* ]2 = Y POSITION *
|
2018-11-03 18:59:24 +00:00
|
|
|
*- -*
|
|
|
|
* SAMPLE USAGE: *
|
|
|
|
* *
|
2019-01-14 04:48:09 +00:00
|
|
|
* SCPOS #10;#10 *
|
2018-11-03 18:59:24 +00:00
|
|
|
*,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,*
|
|
|
|
*
|
2019-01-14 04:48:09 +00:00
|
|
|
** WARNING: NO ERROR CONTROL
|
|
|
|
*
|
|
|
|
SCPOS MAC
|
2018-11-03 18:59:24 +00:00
|
|
|
LDX ]1
|
|
|
|
LDY ]2
|
|
|
|
STX CURSH
|
|
|
|
STY CURSV
|
|
|
|
JSR VTAB
|
|
|
|
<<<
|
|
|
|
*
|
|
|
|
*``````````````````````````````*
|
2019-01-14 04:48:09 +00:00
|
|
|
* SETCX : SET CURSOR HORIZ *
|
2018-11-03 18:59:24 +00:00
|
|
|
*- -*
|
|
|
|
* SETS THE HORIZONTAL POSITION *
|
|
|
|
* OF THE TEXT CURSOR. *
|
|
|
|
*- -*
|
|
|
|
* PARAMETERS *
|
|
|
|
* *
|
2019-01-14 04:48:09 +00:00
|
|
|
* ]1 = X POSITION *
|
2018-11-03 18:59:24 +00:00
|
|
|
*- -*
|
2019-01-14 04:48:09 +00:00
|
|
|
* SAMPLE USAGE: SETCX #10 *
|
2018-11-03 18:59:24 +00:00
|
|
|
*,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,*
|
|
|
|
*
|
2019-01-14 04:48:09 +00:00
|
|
|
** WARNING: NO ERROR CONTROL
|
|
|
|
*
|
|
|
|
SETCX MAC
|
2018-11-03 18:59:24 +00:00
|
|
|
LDX ]1
|
|
|
|
STX CURSH
|
|
|
|
JSR VTAB
|
|
|
|
<<<
|
|
|
|
*
|
|
|
|
*``````````````````````````````*
|
2019-01-14 04:48:09 +00:00
|
|
|
* SETCY: POSITION CURSOR VERT *
|
2018-11-03 18:59:24 +00:00
|
|
|
*- -*
|
|
|
|
* SET CURSOR VERTICAL POSITION *
|
|
|
|
*- -*
|
|
|
|
* PARAMETERS *
|
|
|
|
* *
|
2019-01-14 04:48:09 +00:00
|
|
|
* ]1 = Y POSITION *
|
2018-11-03 18:59:24 +00:00
|
|
|
*- -*
|
2019-01-14 04:48:09 +00:00
|
|
|
* SAMPLE USAGE: SETCY #10 *
|
2018-11-03 18:59:24 +00:00
|
|
|
*,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,*
|
|
|
|
*
|
2019-01-14 04:48:09 +00:00
|
|
|
** WARNING: NO ERROR CONTROL
|
|
|
|
*
|
|
|
|
SETCY MAC
|
2018-11-03 18:59:24 +00:00
|
|
|
LDY ]1
|
|
|
|
STY CURSV
|
|
|
|
JSR VTAB
|
|
|
|
<<<
|
|
|
|
*
|
|
|
|
*``````````````````````````````*
|
2019-01-14 04:48:09 +00:00
|
|
|
* CURF : TEXT CURSOR FORWRD *
|
2018-11-03 18:59:24 +00:00
|
|
|
*- -*
|
|
|
|
* MOVES THE CURSOR FORWARD BY *
|
|
|
|
* SPECIFIED AMOUNT. *
|
|
|
|
*- -*
|
|
|
|
* PARAMETERS *
|
|
|
|
* *
|
2019-01-14 04:48:09 +00:00
|
|
|
* ]1 = NUMBER TO MOVE FORWARD *
|
2018-11-03 18:59:24 +00:00
|
|
|
*- -*
|
2019-01-14 04:48:09 +00:00
|
|
|
* SAMPLE USAGE: CURF #10 *
|
2018-11-03 18:59:24 +00:00
|
|
|
*,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,*
|
|
|
|
*
|
2019-01-14 04:48:09 +00:00
|
|
|
CURF MAC
|
2018-11-03 18:59:24 +00:00
|
|
|
LDA ]1
|
|
|
|
JSR CURSFOR
|
|
|
|
<<<
|
|
|
|
*
|
|
|
|
*``````````````````````````````*
|
2019-01-14 04:48:09 +00:00
|
|
|
* CURB :: TEXT CURSOR BACKWD *
|
2018-11-03 18:59:24 +00:00
|
|
|
*- -*
|
|
|
|
* MOVES THE CURSOR BACKWARD BY *
|
|
|
|
* SPECIFIED AMOUNT. *
|
|
|
|
*- -*
|
|
|
|
* PARAMETERS *
|
|
|
|
* *
|
2019-01-14 04:48:09 +00:00
|
|
|
* ]1 = AMOUNT TO MOVE BACKWARD *
|
2018-11-03 18:59:24 +00:00
|
|
|
*- -*
|
2019-01-14 04:48:09 +00:00
|
|
|
* SAMPLE USAGE: CURB #10 *
|
2018-11-03 18:59:24 +00:00
|
|
|
*,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,*
|
|
|
|
*
|
2019-01-14 04:48:09 +00:00
|
|
|
CURB MAC
|
2018-11-03 18:59:24 +00:00
|
|
|
LDA ]1
|
|
|
|
JSR CURSBAK
|
|
|
|
<<<
|
|
|
|
*
|
|
|
|
*``````````````````````````````*
|
2019-01-14 04:48:09 +00:00
|
|
|
* CURU :: TEXT CURSOR UP *
|
2018-11-03 18:59:24 +00:00
|
|
|
*- -*
|
|
|
|
* MOVES THE CURSOR UP BY *
|
|
|
|
* SPECIFIED AMOUNT. *
|
|
|
|
*- -*
|
|
|
|
* PARAMETERS *
|
|
|
|
* *
|
2019-01-14 04:48:09 +00:00
|
|
|
* ]1 = AMOUNT TO MOVE UP *
|
2018-11-03 18:59:24 +00:00
|
|
|
*- -*
|
2019-01-14 04:48:09 +00:00
|
|
|
* SAMPLE USAGE: CURU #10 *
|
2018-11-03 18:59:24 +00:00
|
|
|
*,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,*
|
|
|
|
*
|
2019-01-14 04:48:09 +00:00
|
|
|
CURU MAC
|
2018-11-03 18:59:24 +00:00
|
|
|
LDA ]1
|
|
|
|
JSR CURSUP
|
|
|
|
<<<
|
|
|
|
*
|
|
|
|
*``````````````````````````````*
|
2019-01-14 04:48:09 +00:00
|
|
|
* CURD :: TEXT CURSOR DOWN *
|
2018-11-03 18:59:24 +00:00
|
|
|
*- -*
|
|
|
|
* MOVES THE CURSOR DOWN BY *
|
|
|
|
* SPECIFIED AMOUNT. *
|
|
|
|
*- -*
|
|
|
|
* PARAMETERS *
|
|
|
|
* *
|
2019-01-14 04:48:09 +00:00
|
|
|
* ]1 = AMOUNT TO MOVE DOWN *
|
2018-11-03 18:59:24 +00:00
|
|
|
*- -*
|
2019-01-14 04:48:09 +00:00
|
|
|
* SAMPLE USAGE: CURD #10 *
|
2018-11-03 18:59:24 +00:00
|
|
|
*,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,*
|
|
|
|
*
|
2019-01-14 04:48:09 +00:00
|
|
|
CURD MAC
|
2018-11-03 18:59:24 +00:00
|
|
|
LDA ]1
|
|
|
|
JSR CURSDN
|
|
|
|
<<<
|
|
|
|
*
|
|
|
|
*``````````````````````````````*
|
2019-01-14 04:48:09 +00:00
|
|
|
* RCPOS :: READ SCREEN AT XY *
|
2018-11-03 18:59:24 +00:00
|
|
|
*- -*
|
|
|
|
* READ THE CHARACTER AT POS *
|
|
|
|
* X,Y AND LOADS INTO ACCUM *
|
|
|
|
*- -*
|
|
|
|
* PARAMETERS *
|
|
|
|
* *
|
2019-01-14 04:48:09 +00:00
|
|
|
* ]1 = X POSITION *
|
|
|
|
* ]2 = Y POSITION *
|
2018-11-03 18:59:24 +00:00
|
|
|
*- -*
|
|
|
|
* SAMPLE USAGE: _RCXY #3;#9 *
|
|
|
|
*,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,*
|
|
|
|
*
|
2019-01-14 04:48:09 +00:00
|
|
|
** WARNING: NO ERROR CONTROL
|
|
|
|
*
|
|
|
|
RCPOS MAC
|
2018-11-03 18:59:24 +00:00
|
|
|
LDA ]1 ; ROW
|
|
|
|
LDY ]2 ; COLUMN
|
2019-01-14 04:48:09 +00:00
|
|
|
JSR $F847 ; GBASCALC ROUTINE
|
|
|
|
LDA ($26),Y ; LOW OF ADDR OF CHAR
|
2018-11-03 18:59:24 +00:00
|
|
|
<<<
|
|
|
|
*
|
|
|
|
*``````````````````````````````*
|
2019-01-14 04:48:09 +00:00
|
|
|
* PDL PADDLE / MOUSE INPUT *
|
2018-11-03 18:59:24 +00:00
|
|
|
*- -*
|
|
|
|
* SIMPLY READS STATE OF PADDLE *
|
|
|
|
* NUMBER [NUM] AND STORES IT *
|
|
|
|
* IN THE Y REGISTER. *
|
|
|
|
*- -*
|
|
|
|
* PARAMETERS *
|
|
|
|
* *
|
2019-01-14 04:48:09 +00:00
|
|
|
* ]1 = PADDLE NUMBER TO READ *
|
2018-11-03 18:59:24 +00:00
|
|
|
*- -*
|
2019-01-14 04:48:09 +00:00
|
|
|
* SAMPLE USAGE: PDL #0 *
|
2018-11-03 18:59:24 +00:00
|
|
|
*,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,*
|
|
|
|
*
|
2019-01-14 04:48:09 +00:00
|
|
|
** WARNING: NO ERROR CONTROL
|
|
|
|
*
|
|
|
|
PDL MAC ; GET PADDLE VALUE
|
2019-04-26 22:49:10 +00:00
|
|
|
LDX ]1 ; READ PADDLE # ]1 (USUALLY 0)
|
2018-11-03 18:59:24 +00:00
|
|
|
JSR PREAD ; PADDLE READING STORED IN Y
|
|
|
|
<<<
|
|
|
|
*
|
|
|
|
*``````````````````````````````*
|
2019-01-14 04:48:09 +00:00
|
|
|
* PBX :: PADDLE BUTTON X *
|
2018-11-03 18:59:24 +00:00
|
|
|
* *
|
|
|
|
* STORE 1 IN ACCUMULATOR IF *
|
|
|
|
* PADDLE BUTTON X IS PRESSED, *
|
|
|
|
* OTHERWISE STORE 0 IN ACCUM. *
|
|
|
|
*- -*
|
|
|
|
* PARAMETERS *
|
|
|
|
* *
|
2019-01-14 04:48:09 +00:00
|
|
|
* ]1 = PADDLE BUTTON TO READ *
|
2018-11-03 18:59:24 +00:00
|
|
|
* *
|
|
|
|
* PB0: $C061 PB1: $C062 *
|
|
|
|
* PB2: $C063 PB4: $C060 *
|
|
|
|
*- -*
|
2019-01-14 04:48:09 +00:00
|
|
|
* SAMPLE USAGE: PBX $C061 *
|
2018-11-03 18:59:24 +00:00
|
|
|
*,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,*
|
|
|
|
*
|
2019-01-14 04:48:09 +00:00
|
|
|
PBX MAC
|
2019-04-26 22:49:10 +00:00
|
|
|
_ISLIT ]1
|
2018-11-03 18:59:24 +00:00
|
|
|
JSR GPBX
|
|
|
|
<<<
|
|
|
|
*
|
|
|
|
*``````````````````````````````*
|
2019-01-14 04:48:09 +00:00
|
|
|
* TVLIN :: TEXT VERTICAL LINE *
|
2018-11-03 18:59:24 +00:00
|
|
|
*- -*
|
|
|
|
* CREATES A VERTICAL LINE OF *
|
|
|
|
* TEXT AT THE CURRENT CURSOR *
|
|
|
|
* COLUMN CONSISTING OF THE *
|
|
|
|
* SPECIFIED CHARACTER. *
|
|
|
|
*- -*
|
|
|
|
* PARAMETERS *
|
|
|
|
* *
|
2019-01-14 04:48:09 +00:00
|
|
|
* ]1 = START OF VERTICAL LINE *
|
|
|
|
* ]2 = END OF VERTICAL LINE *
|
|
|
|
* ]3 = X POSITION OF LINE *
|
|
|
|
* ]4 = FILL CHARACTER *
|
2018-11-03 18:59:24 +00:00
|
|
|
*- -*
|
|
|
|
* SAMPLE USAGE: *
|
|
|
|
* *
|
2019-01-14 04:48:09 +00:00
|
|
|
* TVLIN #0;#10;#3;#$18 *
|
2018-11-03 18:59:24 +00:00
|
|
|
*,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,*
|
|
|
|
*
|
2019-01-14 04:48:09 +00:00
|
|
|
TVLIN MAC
|
2018-11-03 18:59:24 +00:00
|
|
|
LDA ]1 ; Y START
|
|
|
|
PHA
|
|
|
|
LDA ]2 ; Y END
|
|
|
|
PHA
|
|
|
|
LDA ]3 ; X POSITION
|
|
|
|
PHA
|
|
|
|
LDA ]4 ; CHARACTER
|
|
|
|
PHA
|
2019-01-14 04:48:09 +00:00
|
|
|
JSR TVLINE
|
2018-11-03 18:59:24 +00:00
|
|
|
<<<
|
|
|
|
*
|
|
|
|
*``````````````````````````````*
|
2019-01-14 04:48:09 +00:00
|
|
|
* THLIN : TEXT HORIZONTAL LINE *
|
2018-11-03 18:59:24 +00:00
|
|
|
* *
|
|
|
|
* CREATES A HORIZONTAL LINE OF *
|
|
|
|
* TEXT FROM X1,Y TO X2,Y WITH *
|
|
|
|
* THE SPECIFIED CHARACTER. *
|
|
|
|
*- -*
|
|
|
|
* PARAMETERS *
|
|
|
|
* *
|
2019-01-14 04:48:09 +00:00
|
|
|
* ]1 = START OF HORIZONTL LINE *
|
|
|
|
* ]2 = END OF HORIZONTAL LINE *
|
|
|
|
* ]3 = Y POSITION OF LINE *
|
|
|
|
* ]4 = FILL CHARACTER *
|
2018-11-03 18:59:24 +00:00
|
|
|
*- -*
|
|
|
|
* SAMPLE USAGE: *
|
|
|
|
* *
|
2019-01-14 04:48:09 +00:00
|
|
|
* THLIN #0;#10;#12;#$18 *
|
2018-11-03 18:59:24 +00:00
|
|
|
*,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,*
|
|
|
|
*
|
2019-01-14 04:48:09 +00:00
|
|
|
THLIN MAC
|
2018-11-03 18:59:24 +00:00
|
|
|
LDA ]1 ; X START
|
|
|
|
PHA
|
|
|
|
LDA ]2 ; X END
|
|
|
|
PHA
|
|
|
|
LDA ]3 ; Y POS
|
|
|
|
PHA
|
|
|
|
LDA ]4 ; FILL CHAR
|
|
|
|
PHA
|
2019-01-14 04:48:09 +00:00
|
|
|
JSR THLINE
|
2018-11-03 18:59:24 +00:00
|
|
|
<<<
|
|
|
|
*
|
|
|
|
*``````````````````````````````*
|
2019-01-14 04:48:09 +00:00
|
|
|
* TFILL :: TEXT FILL *
|
2018-11-03 18:59:24 +00:00
|
|
|
*- -*
|
|
|
|
* FILL X1,Y1 TO X2,Y2 WITH *
|
|
|
|
* SPECIFIED CHARACTER. *
|
|
|
|
*- -*
|
|
|
|
* PARAMETERS *
|
|
|
|
* *
|
2019-01-14 04:48:09 +00:00
|
|
|
* PARAM1 = X1 *
|
|
|
|
* PARAM2 = Y1 *
|
|
|
|
* PARAM3 = X2 *
|
|
|
|
* PARAM4 = Y2 *
|
2018-11-03 18:59:24 +00:00
|
|
|
*- -*
|
|
|
|
* SAMPLE USAGE: *
|
|
|
|
* *
|
2019-01-14 04:48:09 +00:00
|
|
|
* TFILL #0;#10;#0;#10 *
|
2018-11-03 18:59:24 +00:00
|
|
|
*,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,*
|
|
|
|
*
|
2019-01-14 04:48:09 +00:00
|
|
|
TFILL MAC
|
2018-11-03 18:59:24 +00:00
|
|
|
LDA ]1 ; LEFT BOUNDARY
|
|
|
|
PHA
|
2019-01-14 04:48:09 +00:00
|
|
|
LDA ]2 ; TOP BOUNDARY
|
2018-11-03 18:59:24 +00:00
|
|
|
PHA
|
2019-01-14 04:48:09 +00:00
|
|
|
LDA ]3 ; RIGHT BOUNDARY
|
2018-11-03 18:59:24 +00:00
|
|
|
PHA
|
|
|
|
LDA ]4 ; BOTTOM BOUNDARY
|
|
|
|
PHA
|
|
|
|
LDA ]5 ; FILL CHAR
|
|
|
|
PHA
|
|
|
|
JSR TFILLA
|
|
|
|
<<<
|
|
|
|
*
|
2019-01-14 04:48:09 +00:00
|
|
|
*``````````````````````````````*
|
|
|
|
* TPUT :: TEXT CHARACTER PLOT *
|
|
|
|
*- -*
|
|
|
|
* PLOT A TEXT CHARACTER AT X,Y *
|
|
|
|
* DIRECTLY TO MEMORY. *
|
|
|
|
*- -*
|
|
|
|
* PARAMETERS *
|
|
|
|
* *
|
|
|
|
* PARAM1 = X *
|
|
|
|
* PARAM2 = Y *
|
|
|
|
* PARAM3 = CHARACTER *
|
|
|
|
*- -*
|
|
|
|
* SAMPLE USAGE: *
|
|
|
|
* *
|
|
|
|
* TPUT #$AA;#10;#10 *
|
|
|
|
*,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,*
|
|
|
|
*
|
|
|
|
TPUT MAC
|
|
|
|
LDA ]1
|
|
|
|
PHA
|
|
|
|
LDA ]2
|
|
|
|
PHA
|
|
|
|
LDA ]3
|
|
|
|
PHA
|
|
|
|
JSR TXTPUT
|
|
|
|
<<<
|
2019-04-26 22:49:10 +00:00
|
|
|
*
|
|
|
|
*``````````````````````````````*
|
|
|
|
* DIE80 : KILL 80-COLUMN FIRMW *
|
|
|
|
*- -*
|
|
|
|
* SEND CTRL-U TO COUT, FORCING *
|
|
|
|
* 40 COLUMN MODE. *
|
|
|
|
*,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,*
|
|
|
|
*
|
|
|
|
DIE80 MAC
|
|
|
|
LDA #21
|
|
|
|
JSR COUT
|
|
|
|
<<<
|
|
|
|
*
|
|
|
|
*``````````````````````````````*
|
|
|
|
* COL80 : FORCE 80 COLUMN MODE *
|
|
|
|
*,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,*
|
|
|
|
*
|
|
|
|
COL80 MAC
|
|
|
|
LDA #18
|
|
|
|
JSR COUT
|
|
|
|
<<<
|
|
|
|
*
|
|
|
|
*``````````````````````````````*
|
|
|
|
* COL40 : FORCE 40 COLUMN MODE *
|
|
|
|
*- -*
|
|
|
|
* SEND CTRL-U TO COUT, FORCING *
|
|
|
|
* 40 COLUMN MODE. *
|
|
|
|
*,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,*
|
|
|
|
*
|
|
|
|
COL40 MAC
|
|
|
|
LDA #17
|
|
|
|
JSR COUT
|
|
|
|
<<<
|
|
|
|
*
|
|
|
|
*``````````````````````````````*
|
|
|
|
* MTXT0 : DISABLE MOUSETEXT *
|
|
|
|
*,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,*
|
|
|
|
*
|
|
|
|
MTXT0 MAC
|
|
|
|
LDA #24
|
|
|
|
JSR COUT
|
|
|
|
<<<
|
|
|
|
*
|
|
|
|
*``````````````````````````````*
|
|
|
|
* MTXT1 : DISABLE MOUSETEXT *
|
|
|
|
*,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,*
|
|
|
|
*
|
|
|
|
MTXT1 MAC
|
|
|
|
LDA #27
|
|
|
|
JSR COUT
|
|
|
|
<<<
|
|
|
|
*
|
|
|
|
*``````````````````````````````*
|
|
|
|
* WAIT : WAIT FOR KEYPRESS, NO *
|
|
|
|
* COUT INTERFERENCE *
|
|
|
|
* *
|
|
|
|
* KEYCODE STORED IN .A *
|
|
|
|
*,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,*
|
|
|
|
*
|
|
|
|
WAIT MAC
|
|
|
|
]WTLP LDA $C000
|
|
|
|
BPL ]WTLP
|
|
|
|
AND #$7F
|
|
|
|
STA $C010
|
|
|
|
<<<
|
|
|
|
*
|