Kernel 0.93

This commit is contained in:
Rémy GIBERT 2019-05-14 18:04:16 +02:00
parent d1a8e08a0a
commit a4e5c65711
4 changed files with 129 additions and 47 deletions

View File

@ -166,9 +166,11 @@ S.DCB.TTY.bCURON .EQ 7
S.DCB.TTY.bINVERSE .EQ 8
S.DCB.TTY.bLINEWRAP .EQ 9
S.DCB.TTY.bTITLE .EQ 10
*
*
*
S.DCB.TTY.bG0G1 .EQ 11
S.DCB.TTY.bG0ALT .EQ 12
S.DCB.TTY.bG1ALT .EQ 13
S.DCB.TTY.OUTTAIL .EQ 14
S.DCB.TTY.OUTHEAD .EQ 15
S.DCB.TTY.INBUFFER .EQ 16

View File

@ -759,11 +759,11 @@ IO.EOF.REG >MLICALL MLIGETMARK
.2 lda K.MLI.PARAMS+2,y
eor K.EOF.MARK,y
bne IO.EOF.CDEV.80 MARK != EOF -> false
bne IO.EOF.FALSE
dey
bpl .2
IO.EOF.REG.88 lda #$ff
IO.EOF.TRUE lda #$ff
* clc
IO.EOF.REG.RTS rts
*--------------------------------------
@ -777,9 +777,9 @@ IO.EOF.CDEV >LDYAI K.IOBuf
lda K.IOBuf
ora K.IOBuf+1
beq IO.EOF.REG.88
beq IO.EOF.TRUE
IO.EOF.CDEV.80 lda #0
IO.EOF.FALSE lda #0
* clc
rts
*--------------------------------------
@ -797,19 +797,13 @@ IO.EOF.SSOCK ldy #S.FD.SSOCK.EOF
.1 jmp $FFFF SELF MODIFIED
*--------------------------------------
IO.EOF.PIPE ldy #S.FD.PIPE.Used
IO.EOF.PIPE clc
ldy #S.FD.PIPE.Used
lda (pFD),y
iny
ora (pFD),y
bne .8 Data, EOF = false
lda #$ff
clc
rts
.8 lda #0
clc
rts
beq IO.EOF.TRUE
bne IO.EOF.FALSE
*--------------------------------------
IO.MLIOPEN >LDYAI 1024 get a ProDOS IOBUF
ldx #S.MEM.F.ALIGN+S.MEM.F.NOMOVE

View File

@ -14,6 +14,7 @@ ZPBufBaseL1 .BS 2
ZPBufBaseL2 .BS 2
ZPScrBaseL1 .BS 2
ZPScrBaseL2 .BS 2
ZPTmpWord .BS 2
ZPTmpBool .BS 1
*--------------------------------------
@ -402,9 +403,21 @@ DRV.TERM.COUT.ESC
DRV.TERM.ESC lda (ZPBufPtr)
cmp #'['
bne DRV.TERM.ESC1
bne .1
lda #S.DCB.TTY.MODE.CSI
bra DRV.TERM.SETMODE
.1 cmp #'('
bne .2
lda #S.DCB.TTY.MODE.G0
bra DRV.TERM.SETMODE
.2 cmp #')'
bne DRV.TERM.ESC1
lda #S.DCB.TTY.MODE.G1
DRV.TERM.SETMODE
sta (ZPDCBPtr),y
@ -436,8 +449,6 @@ DRV.TERM.ESC1 lda #0 y = #S.DCB.TTY.MODE
.4 .DA Scroll.Dn M
.DA Scroll.Up D
.DA RESET c
.DA G0 (
.DA G1 )
*--------------------------------------
DRV.TERM.CSI ldy #S.DCB.TTY.INBUFFER
lda (ZPDCBPtr),y
@ -548,7 +559,8 @@ DRV.TERM.CSI.Exec
.DA Csi.DispAttr m
.DA Csi.Query n
.DA Csi.Scroll r
.DA Csi.Erase K
.DA Csi.EraseScreen J
.DA Csi.EraseLine K
.DA Csi.Home H
*--------------------------------------
Csi.LWEnable sec
@ -652,7 +664,24 @@ Csi.Scroll ldy CsiParamCnt
.9 clc
rts
*--------------------------------------
Csi.Erase ldx CsiParamCnt
Csi.EraseScreen ldx CsiParamCnt
bne .1
jmp DRV.TERM.CLRSCR.DN
.1 lda CsiParams
cmp #1
bne .2
jmp DRV.TERM.CLRSCR.UP
.2 cmp #2
bne .9
jmp DRV.TERM.CLRSCR
.9 clc
rts
*--------------------------------------
Csi.EraseLine ldx CsiParamCnt
bne .1
jmp CLREOL
@ -716,10 +745,19 @@ Csi.Home lda CsiParamCnt
Csi.Home.8 clc
rts
*--------------------------------------
DRV.TERM.G0
DRV.TERM.G1
DRV.TERM.G0 ldy #S.DCB.TTY.bG0ALT
.HS 2C BIT ABS
DRV.TERM.G1 ldy #S.DCB.TTY.bG1ALT
jmp RESET.MODE
lda (ZPBufPtr)
cmp #'0'
beq .1
clc
.1 ror
sta (ZPDCBPtr),y
clc
rts
*--------------------------------------
DRV.TERM.IAC ldy #S.DCB.TTY.INBUFFER
lda (ZPDCBPtr),y
@ -846,7 +884,7 @@ COUT.IAC.DONT
COUT.IAC.EXIT
*--------------------------------------
RESET.MODE lda #0
SET.MODE ldy #S.DCB.TTY.MODE
ldy #S.DCB.TTY.MODE
sta (ZPDCBPtr),y
clc
rts
@ -867,11 +905,15 @@ RESETATTR lda #$80
clc
rts
*--------------------------------------
G0 lda #S.DCB.TTY.MODE.G0
SI clc
.HS 2C BIT ABS
*--------------------------------------
G1 lda #S.DCB.TTY.MODE.G1
bra SET.MODE
SO sec
ldy #S.DCB.TTY.bG0G1
ror
sta (ZPDCBPtr),y
clc
rts
*--------------------------------------
ENQ ldx #0
@ -1261,7 +1303,7 @@ RESET.VALUES .DA #0 S.DCB.TTY.MODE
.DA #$80 S.DCB.TTY.bINVERSE
.DA #$80 S.DCB.TTY.bLINEWRAP
.DA #0 S.DCB.TTY.bTITLE
.DA #0
.DA #0 S.DCB.TTY.bALTFONT
.DA #0
.DA #0
.DA #S.DCB.TTY.OUTBUFFER S.DCB.TTY.OUTTAIL
@ -1271,9 +1313,9 @@ RESET.VALUES .DA #0 S.DCB.TTY.MODE
CtrlChars .HS 05080A0C0D151B
CtrlChars.Cnt .EQ *-CtrlChars
*--------------------------------------
EscCodes .AZ "MDc()"
EscCodes .AZ "MDc"
EscCodes.Cnt .EQ *-EscCodes
CsiCodes .AS "hlmnrKH"
CsiCodes .AS "hlmnrJKH"
CsiCodes.Cnt .EQ *-CsiCodes
ENQ.String .AZ "xterm"
*--------------------------------------

View File

@ -2,22 +2,43 @@ NEW
PREFIX
AUTO 4,1
*--------------------------------------
DRV.TERM.CLRSCR ldx #23
DRV.TERM.CLRSCR.DN
ldy #S.DCB.TTY.CV
sta (ZPDCBPtr),y
tax
bra DRV.TERM.CLRSCR.1
DRV.TERM.CLRSCR.UP
ldx #0
ldy #S.DCB.TTY.CV
sta (ZPDCBPtr),y
tay
bra DRV.TERM.CLRSCR.2
DRV.TERM.CLRSCR ldx #0
DRV.TERM.CLRSCR.1
ldy #24
DRV.TERM.CLRSCR.2
sty .1+1
sta SET80STORE
.1 jsr DRV.TERM.SETUP.L1X
.1 cpx #$ff SELF MODIFIED
beq .9
jsr DRV.TERM.SETUP.L1X
lda #" "
bit bActive
bpl .4
sta SETPAGE2
jsr .7
sta CLRPAGE2
jsr .7
.4 sta SETWRITEAUX
@ -30,17 +51,15 @@ DRV.TERM.CLRSCR ldx #23
sta CLRWRITEAUX
dex
bpl .1
rts
inx
bra .1
.7 ldy #39
.8 sta (ZPScrBaseL1),y
dey
bpl .8
rts
.9 rts
*--------------------------------------
DRV.TERM.LINE0CPY
ldx #0
@ -167,9 +186,26 @@ SetCharAtCurPos.SCR
pla
bra SetCharAtY.SCR
SetCharAtCurPos ldy #S.DCB.TTY.bINVERSE
SetCharAtCurPos pha
ldy #S.DCB.TTY.bALTFONT
lda (ZPDCBPtr),y
bpl .1
pla
bmi .2
cmp #96
bcc .2
and #$1F
bra .3
.1 pla
.2 ldy #S.DCB.TTY.bINVERSE
ora (ZPDCBPtr),y
pha
.3 pha
ldy #S.DCB.TTY.CV
lda (ZPDCBPtr),y
tax
@ -191,11 +227,19 @@ SetCharAtYX pha
bit bActive
bpl SetCharAtYX.8
SetCharAtY.SCR cmp #$40
SetCharAtY.SCR cmp #$20
bcs .10
phx
tax
lda REMAP.96.127,x
plx
.10 cmp #$40 Remap inverse UPPRECASE
bcc .1
cmp #$5F
bcs .1
and #$3F
and #$1F
.1 pha
@ -228,7 +272,7 @@ GetCharAtCurPos ldy #S.DCB.TTY.CV
rts
*--------------------------------------
REMAP.95.126 .HS 404142434445464748494a4b4c4d4e4f
REMAP.96.127 .HS 404142434445464748494a4b4c4d4e4f
.HS 505152535455565758595a5b5c5d5e5f
*--------------------------------------
BUF.BASEL .DA #0