add more control sequences

This commit is contained in:
~d6 2023-01-23 21:18:50 -05:00
parent 907f2b6b50
commit ac10ee23ff
1 changed files with 20 additions and 3 deletions

View File

@ -7,6 +7,8 @@
( )
( move cursor home: ESC [ H )
( move cursor: ESC [ $row ; $col H )
( move to column: ESC [ $n G )
( move to row: ESC [ $n d )
( move up: ESC [ $n A )
( move down: ESC [ $n B )
( move forward: ESC [ $n C )
@ -19,9 +21,10 @@
( erase from current line to top: ESC [ 1 J )
( erase screen: ESC [ 2 J )
( )
( ??? ESC [ ... ? )
( ??? ESC [ ... d )
( ??? ESC [ ... G )
( NOT SUPPORTED YET: )
( show cursor: ESC [ ? 25 h )
( hide cursor: ESC [ ? 25 l )
( various: ESC [ ? ... )
|00 @System [ &vect $2 &pad $6 &r $2 &g $2 &b $2 ]
|10 @Console [ &vect $2 &r $1 &pad $5 &w $1 ]
@ -216,10 +219,12 @@
@end-arg ( c^ -> )
;on-read .Console/vect DEO2
DUP ,debug-seq JSR
DUP LIT "d EQU ;exec-move-row JCN2 ( move cursor to row )
DUP LIT "h EQU ;exec-noop JCN2 ( enable line wrap )
DUP LIT "l EQU ;exec-noop JCN2 ( disable line wrap )
DUP LIT "m EQU ;exec-noop JCN2 ( set attr )
DUP LIT "n EQU ;exec-status JCN2 ( get status )
DUP LIT "G EQU ;exec-move-col JCN2 ( move cursor to col )
DUP LIT "H EQU ;exec-move JCN2 ( move cursor )
DUP LIT "A EQU ;exec-up JCN2 ( up )
DUP LIT "B EQU ;exec-down JCN2 ( down )
@ -289,6 +294,18 @@
#01 .dirty? STZ ( ; FIXME just redraw affected tiles )
JMP2r ( )
@exec-move-row ( c^ -> )
POP
#0001 ;read-arg-1 JSR2 #0001 SUB2 ( row )
.cur-x LDZ2 ( col )
;goto JSR2 BRK
@exec-move-col ( c^ -> )
POP
.cur-y LDZ2 ( row )
#0001 ;read-arg-2 JSR2 #0001 SUB2 ( col )
;goto JSR2 BRK
@exec-move ( c^ -> )
POP
#0001 ;read-arg-1 JSR2 #0001 SUB2 ( row )