This commit is contained in:
~d6 2023-01-25 12:19:12 -05:00
commit 761bfc336b
1 changed files with 42 additions and 7 deletions

View File

@ -30,8 +30,9 @@
( NOT SUPPORTED YET: )
( show cursor: ESC [ ? 25 h )
( hide cursor: ESC [ ? 25 l )
( various: ESC [ ? ... )
( insert lines: ESC [ $n L )
( )
( set bracketed paste mode (xterm): ESC [ ? 2004 h )
|00 @System [ &vect $2 &pad $6 &r $2 &g $2 &b $2 ]
|10 @Console [ &vect $2 &r $1 &pad $5 &w $1 ]
@ -209,14 +210,48 @@
&c1 LIT "@ SUB
&done .Console/w DEO BRK
@on-read-seq ( -> )
@on-read-priv
.Console/r DEI
DUP LIT "; EQU ;next-arg JCN2
DUP LIT "0 LTH ;end-arg-priv JCN2
DUP LIT "9 GTH ;end-arg-priv JCN2
;add-to-arg JMP2
@start-priv
;on-read-priv .Console/vect DEO2
BRK
@on-read-csi ( -> )
.Console/r DEI
DUP LIT "? EQU ;start-priv JCN2
DUP LIT "; EQU ;next-arg JCN2
DUP LIT "0 LTH ;end-arg JCN2
DUP LIT "9 GTH ;end-arg JCN2
;add-to-arg JMP2
@debug-seq ( c^ -> )
@debug-priv ( c^ -> )
;scratch STH2
LIT "1 STH2kr STA INC2r
LIT "b STH2kr STA INC2r
#20 STH2kr STA INC2r
LIT "[ STH2kr STA INC2r
#20 STH2kr STA INC2r
LIT "? STH2kr STA INC2r
#20 STH2kr STA INC2r
( TODO: numeric args )
STH2kr STA INC2r
#0a STH2r STA
#0009 .File/len DEO2
;scratch .File/w DEO2
JMP2r
@end-arg-priv ( c^ -> )
;on-read .Console/vect DEO2
DUP ,debug-priv JSR
( TODO: handle these )
POP BRK
@debug-csi ( c^ -> )
;scratch STH2
LIT "1 STH2kr STA INC2r
LIT "b STH2kr STA INC2r
@ -231,7 +266,7 @@
@end-arg ( c^ -> )
;on-read .Console/vect DEO2
DUP ,debug-seq JSR
DUP ,debug-csi 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 )
@ -368,14 +403,14 @@
JMP2r
@on-read-esc ( -> )
.Console/r DEI LIT "[ EQU ;start-seq JCN2
.Console/r DEI LIT "[ EQU ;start-csi JCN2
.Console/r DEI ,debug-esc JSR
;on-read .Console/vect DEO2
;on-read JMP2
@start-seq ( -> )
@start-csi ( -> )
;reset-args JSR2
;on-read-seq .Console/vect DEO2
;on-read-csi .Console/vect DEO2
BRK
@on-read