mirror of
https://github.com/A2osX/A2osX.git
synced 2024-09-10 07:54:37 +00:00
ANSI Support for CON,SysScreen & Shell
This commit is contained in:
parent
4b10684611
commit
adc8ad9630
@ -589,7 +589,7 @@ CURON .BS 1
|
|||||||
CURCHAR .BS 1
|
CURCHAR .BS 1
|
||||||
*--------------------------------------
|
*--------------------------------------
|
||||||
KeyRemapIdx .BS 1
|
KeyRemapIdx .BS 1
|
||||||
KeyRemapped .HS 0508090A0D15 L,D,U,CR,R
|
KeyRemapped .HS 05080A0B0D15 L,D,U,CR,R
|
||||||
KeyRemappedIdx .HS 050004080C0F
|
KeyRemappedIdx .HS 050004080C0F
|
||||||
KeyRemappedTable .EQ *
|
KeyRemappedTable .EQ *
|
||||||
KeyRemappedLEFT .HS 1B5B4400 esc[D
|
KeyRemappedLEFT .HS 1B5B4400 esc[D
|
||||||
|
@ -193,12 +193,17 @@ CS.DOEVENT ldy #S.EVT.hDEV is Event from active IN device?
|
|||||||
|
|
||||||
lda #0
|
lda #0
|
||||||
sta (pData),y
|
sta (pData),y
|
||||||
bra .8
|
clc
|
||||||
|
rts
|
||||||
|
|
||||||
|
.9 sec
|
||||||
|
rts
|
||||||
|
|
||||||
.11 ldy #hInputFile Batch mode ?
|
.11 ldy #hInputFile Batch mode ?
|
||||||
lda (pData),y
|
lda (pData),y
|
||||||
beq .10
|
beq .10
|
||||||
|
|
||||||
|
* Batch Mode
|
||||||
cpx #3 test Ctrl-c
|
cpx #3 test Ctrl-c
|
||||||
bne .12
|
bne .12
|
||||||
|
|
||||||
@ -215,9 +220,33 @@ CS.DOEVENT ldy #S.EVT.hDEV is Event from active IN device?
|
|||||||
ldy #bPause
|
ldy #bPause
|
||||||
lda #$80
|
lda #$80
|
||||||
sta (pData),y
|
sta (pData),y
|
||||||
|
clc
|
||||||
|
rts
|
||||||
|
|
||||||
|
* interactive mode
|
||||||
|
.10 ldy #bEscMode
|
||||||
|
lda (pData),y
|
||||||
|
beq .13
|
||||||
|
|
||||||
|
cpx #'['
|
||||||
|
beq .8
|
||||||
|
|
||||||
|
lda #0
|
||||||
|
sta (pData),y
|
||||||
|
|
||||||
|
txa
|
||||||
|
|
||||||
|
ldx EscChars
|
||||||
|
.17 cmp EscChars,x
|
||||||
|
beq .18
|
||||||
|
dex
|
||||||
|
bne .17
|
||||||
bra .8
|
bra .8
|
||||||
|
|
||||||
.10 cpx #$20
|
.18 lda EscAscii,x
|
||||||
|
tax
|
||||||
|
|
||||||
|
.13 cpx #$20
|
||||||
bcs .1
|
bcs .1
|
||||||
jsr CS.EVENT.CTRL.CHAR
|
jsr CS.EVENT.CTRL.CHAR
|
||||||
bra .8
|
bra .8
|
||||||
@ -225,7 +254,8 @@ CS.DOEVENT ldy #S.EVT.hDEV is Event from active IN device?
|
|||||||
.1 cpx #$7f
|
.1 cpx #$7f
|
||||||
bne .2
|
bne .2
|
||||||
jsr CmdBuffer.DEL
|
jsr CmdBuffer.DEL
|
||||||
bra .8
|
clc
|
||||||
|
rts
|
||||||
|
|
||||||
.2 lda (pData) CmdBuffer
|
.2 lda (pData) CmdBuffer
|
||||||
|
|
||||||
@ -242,9 +272,6 @@ CS.DOEVENT ldy #S.EVT.hDEV is Event from active IN device?
|
|||||||
|
|
||||||
.8 clc
|
.8 clc
|
||||||
rts
|
rts
|
||||||
|
|
||||||
.9 sec
|
|
||||||
rts
|
|
||||||
*--------------------------------------
|
*--------------------------------------
|
||||||
CS.EVENT.CTRL.CHAR
|
CS.EVENT.CTRL.CHAR
|
||||||
cpx #13 CR
|
cpx #13 CR
|
||||||
@ -257,7 +284,16 @@ CS.EVENT.CTRL.CHAR
|
|||||||
clc
|
clc
|
||||||
rts
|
rts
|
||||||
|
|
||||||
.10 cpx #3 Ctrl-C
|
.10 cpx #$1B esc
|
||||||
|
bne .11
|
||||||
|
|
||||||
|
ldy #bEscMode
|
||||||
|
lda #$ff
|
||||||
|
sta (pData),y
|
||||||
|
clc
|
||||||
|
rts
|
||||||
|
|
||||||
|
.11 cpx #3 Ctrl-C
|
||||||
bne .1
|
bne .1
|
||||||
|
|
||||||
jsr CmdBuffer.CLR
|
jsr CmdBuffer.CLR
|
||||||
@ -451,6 +487,8 @@ MSG.GREETINGS >PSTRING "\nA2osX-Shell on Dev=%h\n\n"
|
|||||||
MSG.ERROR >PSTRING "[%h]\n"
|
MSG.ERROR >PSTRING "[%h]\n"
|
||||||
*MSG.NOTFOUND >CSTRING "Command Not Found\n"
|
*MSG.NOTFOUND >CSTRING "Command Not Found\n"
|
||||||
*MSG.SYNERR >CSTRING "Syntax Error Or Invalid Pathname\n"
|
*MSG.SYNERR >CSTRING "Syntax Error Or Invalid Pathname\n"
|
||||||
|
EscChars >PSTRING "DBAC"
|
||||||
|
EscAscii .HS 04080A0B15
|
||||||
hLIBSTR .BS 1
|
hLIBSTR .BS 1
|
||||||
hNEWPATH .BS 1
|
hNEWPATH .BS 1
|
||||||
hExecCmd .BS 1
|
hExecCmd .BS 1
|
||||||
@ -464,18 +502,19 @@ ExecCmdIdx .BS 1
|
|||||||
.DUMMY
|
.DUMMY
|
||||||
.OR 0
|
.OR 0
|
||||||
DS.START
|
DS.START
|
||||||
CmdBuffer .BS CmdBuffer.MAX+1
|
CmdBuffer .BS CmdBuffer.MAX+1 (pData)
|
||||||
|
bEscMode .BS 1
|
||||||
bPause .BS 1
|
bPause .BS 1
|
||||||
bExit .BS 1
|
bExit .BS 1
|
||||||
bEchoOff .BS 1
|
bEchoOff .BS 1
|
||||||
|
bExitOnEOF .BS 1
|
||||||
hCmdLine .BS 1
|
hCmdLine .BS 1
|
||||||
hCmdHistory .BS 1
|
hCmdHistory .BS 1
|
||||||
CmdHistory.IDX .BS 1
|
CmdHistory.IDX .BS 1
|
||||||
bExitOnEOF .BS 1
|
CmdHistory.END .BS 1
|
||||||
hInputFile .BS 1
|
hInputFile .BS 1
|
||||||
hInputArgs .BS 1
|
hInputArgs .BS 1
|
||||||
hInputBuffer .BS 1
|
hInputBuffer .BS 1
|
||||||
CmdHistory.END .BS 1
|
|
||||||
DS.END
|
DS.END
|
||||||
.ED
|
.ED
|
||||||
*--------------------------------------
|
*--------------------------------------
|
||||||
|
@ -268,20 +268,30 @@ DevMgr.SYS.GetEvent
|
|||||||
*--------------------------------------
|
*--------------------------------------
|
||||||
DevMgr.SYS.COut phx
|
DevMgr.SYS.COut phx
|
||||||
phy
|
phy
|
||||||
cmp #13
|
cmp #' '
|
||||||
bne .1
|
bcc .1
|
||||||
jsr DevMgr.SYS.CROut
|
ldy DevMgr.SYS.CH
|
||||||
ply
|
|
||||||
plx
|
|
||||||
clc
|
|
||||||
rts
|
|
||||||
|
|
||||||
.1 ldy DevMgr.SYS.CH
|
|
||||||
ldx DevMgr.SYS.CV
|
ldx DevMgr.SYS.CV
|
||||||
ora #$80
|
ora #$80
|
||||||
jsr DevMgr.SYS.SetCharAtYX
|
jsr DevMgr.SYS.SetCharAtYX
|
||||||
jsr DevMgr.SYS.FSOut
|
jsr DevMgr.SYS.FSOut
|
||||||
ply
|
bra .8
|
||||||
|
|
||||||
|
.1 cmp #10
|
||||||
|
bne .2
|
||||||
|
jsr DevMgr.SYS.LF
|
||||||
|
bra .8
|
||||||
|
|
||||||
|
.2 cmp #13
|
||||||
|
bne .3
|
||||||
|
jsr DevMgr.SYS.CROut
|
||||||
|
bra .8
|
||||||
|
|
||||||
|
.3 ora #$20
|
||||||
|
jsr DevMgr.SYS.SetCharAtYX
|
||||||
|
jsr DevMgr.SYS.FSOut
|
||||||
|
|
||||||
|
.8 ply
|
||||||
plx
|
plx
|
||||||
clc
|
clc
|
||||||
rts
|
rts
|
||||||
@ -289,15 +299,17 @@ DevMgr.SYS.COut phx
|
|||||||
DevMgr.SYS.FSOut
|
DevMgr.SYS.FSOut
|
||||||
lda DevMgr.SYS.CH
|
lda DevMgr.SYS.CH
|
||||||
cmp #79
|
cmp #79
|
||||||
beq DevMgr.SYS.CROut1
|
beq DevMgr.SYS.LF1
|
||||||
inc DevMgr.SYS.CH
|
inc DevMgr.SYS.CH
|
||||||
rts
|
rts
|
||||||
*--------------------------------------
|
*--------------------------------------
|
||||||
DevMgr.SYS.CROut
|
DevMgr.SYS.CROut
|
||||||
jsr DevMgr.SYS.ClrEOL
|
jsr DevMgr.SYS.ClrEOL
|
||||||
DevMgr.SYS.CROut1
|
|
||||||
stz DevMgr.SYS.CH
|
stz DevMgr.SYS.CH
|
||||||
ldx DevMgr.SYS.CV
|
rts
|
||||||
|
*--------------------------------------
|
||||||
|
DevMgr.SYS.LF1 stz DevMgr.SYS.CH
|
||||||
|
DevMgr.SYS.LF ldx DevMgr.SYS.CV
|
||||||
cpx #23
|
cpx #23
|
||||||
beq DevMgr.SYS.Scroll
|
beq DevMgr.SYS.Scroll
|
||||||
inc DevMgr.SYS.CV
|
inc DevMgr.SYS.CV
|
||||||
|
Loading…
Reference in New Issue
Block a user