mirror of
https://github.com/A2osX/A2osX.git
synced 2024-11-22 00:32:44 +00:00
113 lines
3.1 KiB
Plaintext
113 lines
3.1 KiB
Plaintext
|
NEW
|
|||
|
AUTO 3,1
|
|||
|
*--------------------------------
|
|||
|
A.YSAVE .EQ VAR.BEG-1
|
|||
|
A.CHR.UNDER.CURS .EQ A.YSAVE-1
|
|||
|
*--------------------------------
|
|||
|
* STANDARD VIDEO JUMP VECTORS
|
|||
|
* 1. READ KEYBOARD KEY CODE
|
|||
|
* TURNS ON CURSOR
|
|||
|
* GETS KEY CODE
|
|||
|
* TURNS OFF CURSOR
|
|||
|
* REG-A HAS KEY CODE SIGN BIT ON.
|
|||
|
* 2. HORIZONTAL TAB
|
|||
|
* REG-A HAS TAB 0-39
|
|||
|
* 3. VERTICAL TAB
|
|||
|
* REG-A HAS TAB 0-23
|
|||
|
* 4. CLEAR TO END OF LINE
|
|||
|
* 5. CLEAR TO END OF SCREEN
|
|||
|
* 6. CHARACTER OUTPUT ROUTINE
|
|||
|
* REG-A HAS CHAR TO OUTPUT.
|
|||
|
* MUST NOT SCROLL SCREEN OR
|
|||
|
* GO TO NEXT LINE WHEN LAST
|
|||
|
* CHARACTER IS PRINTED ON A LINE.
|
|||
|
*--------------------------------
|
|||
|
JMP A.RD.KBD
|
|||
|
JMP A.MY.HTAB
|
|||
|
JMP A.MY.VTAB
|
|||
|
JMP A.MY.CLREOL
|
|||
|
JMP A.MY.CLREOP
|
|||
|
JMP A.MY.COUT
|
|||
|
*--------------------------------
|
|||
|
A.MY.CLP LDA CTR
|
|||
|
JSR A.MY.VTAB
|
|||
|
A.MY.CLREOP JSR A.MY.CLREOL ZAP REST OF LINE
|
|||
|
LDA #0
|
|||
|
JSR A.MY.HTAB NEXT LINE ZAPPED FROM COL 0
|
|||
|
INC CTR BUMP COUNT TO NEXT LINE
|
|||
|
LDA CTR
|
|||
|
CMP LAST.LINE END OF PAGE?
|
|||
|
BCC A.MY.CLP < END
|
|||
|
BEQ A.MY.CLP = END
|
|||
|
RTS > END
|
|||
|
*--------------------------------
|
|||
|
A.MY.HTAB STA CH SET TAB VALUE
|
|||
|
RTS
|
|||
|
*--------------------------------
|
|||
|
A.MY.VTAB STA CV SET TAB VALUE
|
|||
|
JMP M.BASCALC COMPUTE NEW COUT BASE ADRS
|
|||
|
*--------------------------------
|
|||
|
A.MY.COUT STY A.YSAVE
|
|||
|
LDY CH
|
|||
|
CMP #$A0
|
|||
|
BCS .1 NOT CONTROL CHAR
|
|||
|
AND #$7F ELSE MAKE CHAR INVERSE
|
|||
|
.1 STA (BASEL),Y PUT CHAR ON SCREEN
|
|||
|
INY NEXT COLUMN
|
|||
|
STY CH
|
|||
|
LDY A.YSAVE
|
|||
|
RTS
|
|||
|
*--------------------------------
|
|||
|
A.MY.CLREOL LDY CH
|
|||
|
.1 LDA #$A0 A-REG = BLANK
|
|||
|
CPY SCREEN.WIDTH
|
|||
|
BCS .2
|
|||
|
JSR A.MY.COUT OUTPUT BLANKS UNTIL SCREEN WIDTH
|
|||
|
LDY CH
|
|||
|
BNE .1 ...ALWAYS
|
|||
|
.2 RTS
|
|||
|
*--------------------------------
|
|||
|
A.RD.KBD JSR A.CURSOR.ON TURN ON CURSOR
|
|||
|
.1 LDA $C000 WAIT FOR KEY
|
|||
|
BPL .1
|
|||
|
BIT $C010 KILL FLAG BY STROBE
|
|||
|
PHA
|
|||
|
JSR A.CURSOR.OFF TURN OFF CURSOR
|
|||
|
PLA RETURN REG-A WITH CHAR
|
|||
|
RTS
|
|||
|
*--------------------------------
|
|||
|
A.CURSOR.ON LDA POSV
|
|||
|
JSR A.MY.VTAB POSITION VERTICALLY
|
|||
|
LDA POSH
|
|||
|
SEC
|
|||
|
SBC LEFT.MARGIN
|
|||
|
CLC
|
|||
|
ADC RM.ADJUST
|
|||
|
JSR A.MY.HTAB POSITION HORIZONTALLY
|
|||
|
LDY CH
|
|||
|
LDA (BASEL),Y GET CHAR
|
|||
|
STA A.CHR.UNDER.CURS
|
|||
|
LDA ESC.FLAG
|
|||
|
BNE .1
|
|||
|
LDA #'+ PLUS CURSOR FOR CURSOR MODE
|
|||
|
BNE .2
|
|||
|
.1 LDA (BASEL),Y
|
|||
|
AND #$7F
|
|||
|
CMP #$60 IS CHAR ON SCREEN LOWER CASE
|
|||
|
BCC .2 NO
|
|||
|
AND #$DF FORCE LOWER CASE TO UPPER CASE
|
|||
|
.2 AND #$3F MAKE FLASHING CHAR
|
|||
|
ORA #$40
|
|||
|
STA (BASEL),Y
|
|||
|
RTS
|
|||
|
*--------------------------------
|
|||
|
A.CURSOR.OFF LDY CH
|
|||
|
LDA A.CHR.UNDER.CURS
|
|||
|
STA (BASEL),Y RESTORE SCREEN CHAR
|
|||
|
RTS
|
|||
|
*--------------------------------
|
|||
|
MAN
|
|||
|
SAVE usr/src/fse/fse.s.a2
|
|||
|
LOAD usr/src/fse/fse.s
|
|||
|
ASM
|