converting to echo support

This commit is contained in:
~d6 2023-01-22 15:29:00 -05:00
parent 74ee535179
commit 7757e71409
1 changed files with 1 additions and 42 deletions

View File

@ -99,48 +99,7 @@
@on-key
.Controller/key DEI #00 EQU ,&skip JCN
#41 .tint STZ
.Controller/key DEI ;send JSR2
&skip BRK
@send ( byte^ -> )
DUP #20 LTH ;send-ctrl JCN2
DUP #7f GTH ;send-8bit JCN2
DUP #7f EQU ;send-del JCN2
;send-printable JMP2
@send-ctrl ( byte^ -> )
DUP #08 EQU ;send-bs JCN2
( DUP #09 EQU ;send-tab JCN2
DUP #0a EQU ;send-nl JCN2
DUP #1b EQU ;send-esc JCN2 )
DUP #0d EQU ;send-cr JCN2
POP JMP2r
@send-8bit ( byte^ -> )
POP JMP2r
@send-del ( 7f -> )
POP JMP2r
@send-bs ( 08 -> )
POP ;back JSR2
( #20 ;cursor-addr JSR2 STA ) JMP2r
@send-cr ( 0d -> )
POP
;emit-line JSR2
;read-cr JSR2 ;read-nl JMP2
@send-printable ( c -> )
.pos LDZ STZk INC .pos STZ
;read-printable JMP2
@emit-line ( -> )
.pos LDZ .buffer
&loop GTHk ,&next JCN ,&done JMP
&next LDZk .Console/w DEO INC ,&loop JMP
&done #0a .Console/w DEO .buffer .pos STZ JMP2r
.Controller/key DEI .Console/w DEO &skip BRK
@on-input
.Console/r DEI #00 EQU ,&skip JCN