2015-03-14 21:48:35 +00:00
|
|
|
|
PR#3
|
2015-06-03 18:30:57 +00:00
|
|
|
|
PREFIX /A2OSX.SRC
|
2015-03-14 21:48:35 +00:00
|
|
|
|
NEW
|
|
|
|
|
INC 1
|
|
|
|
|
AUTO 6
|
|
|
|
|
.LIST OFF
|
|
|
|
|
.OP 65C02
|
|
|
|
|
.OR $2000
|
2015-06-03 18:30:57 +00:00
|
|
|
|
.TF /A2OSX.BOOT/DRV/CONSOLE.DRV
|
2015-03-14 21:48:35 +00:00
|
|
|
|
*--------------------------------------
|
|
|
|
|
.INB INC/MACROS.I
|
|
|
|
|
.INB INC/A2OSX.I
|
|
|
|
|
.INB INC/IO.I
|
|
|
|
|
*--------------------------------------
|
2015-06-03 18:30:57 +00:00
|
|
|
|
CURSOR.BLINK.SPEED .EQ 2
|
2015-11-29 22:19:10 +00:00
|
|
|
|
ESCSEQ.MAXLEN .EQ 16
|
2015-06-03 18:30:57 +00:00
|
|
|
|
*--------------------------------------
|
2015-11-29 22:19:10 +00:00
|
|
|
|
ZPBaseL1 .EQ ZPDRV
|
|
|
|
|
ZPBaseL2 .EQ ZPDRV+2
|
|
|
|
|
ZPTmpByte .EQ ZPDRV+4
|
2015-03-14 21:48:35 +00:00
|
|
|
|
*--------------------------------------
|
2015-06-03 18:30:57 +00:00
|
|
|
|
* File Header (16 Bytes)
|
2015-03-14 21:48:35 +00:00
|
|
|
|
*--------------------------------------
|
2015-06-03 18:30:57 +00:00
|
|
|
|
CS.START cld
|
|
|
|
|
jmp Dev.Detect cld,jmp abs=DRV
|
|
|
|
|
.DA #$61 6502,Level 1 (65c02)
|
|
|
|
|
.DA #1 DRV Layout Version 1
|
|
|
|
|
.DA 0
|
|
|
|
|
.DA CS.END-CS.START Code Length
|
|
|
|
|
.DA DEV.HEADER-CS.START Device Header Offset
|
|
|
|
|
.DA DRV.CS.START-CS.START Driver Code Offset
|
|
|
|
|
.DA DRV.CS.END-DRV.CS.START Drv Code Length
|
2015-03-14 21:48:35 +00:00
|
|
|
|
*--------------------------------------
|
2015-06-03 18:30:57 +00:00
|
|
|
|
* Relocation Table
|
2015-03-14 21:48:35 +00:00
|
|
|
|
*--------------------------------------
|
2015-06-03 18:30:57 +00:00
|
|
|
|
L.MSG.DETECT .DA MSG.DETECT
|
|
|
|
|
.DA 0 End Of Reloc Table
|
|
|
|
|
*--------------------------------------
|
|
|
|
|
Dev.Detect >LDYA L.MSG.DETECT
|
2015-11-22 22:30:06 +00:00
|
|
|
|
>SYSCALL SYS.PSTROutYA
|
2015-06-03 18:30:57 +00:00
|
|
|
|
|
|
|
|
|
lda A2osX.SCREENS
|
|
|
|
|
ora #A2osX.SCREENS.C
|
|
|
|
|
sta A2osX.SCREENS
|
|
|
|
|
clc
|
|
|
|
|
rts
|
|
|
|
|
CS.END
|
2015-11-22 22:30:06 +00:00
|
|
|
|
MSG.DETECT >PSTRING "Apple IIe/IIc 80 Col Driver.\n"
|
2015-06-03 18:30:57 +00:00
|
|
|
|
*--------------------------------------
|
|
|
|
|
* Device Header (16 Bytes)
|
|
|
|
|
*--------------------------------------
|
|
|
|
|
DEV.HEADER cld
|
|
|
|
|
jmp (DRV.CS.START,x)
|
|
|
|
|
.DA #S.DEV.F.EVENT+S.DEV.F.COUT+S.DEV.F.CHAR
|
|
|
|
|
>PSTRING "CON" NAME
|
|
|
|
|
.HS 00 NAME must Be 5 bytes long
|
|
|
|
|
.HS 00.00
|
|
|
|
|
.HS 00.00.00.00
|
|
|
|
|
*--------------------------------------
|
|
|
|
|
* Driver Code
|
|
|
|
|
*--------------------------------------
|
|
|
|
|
DRV.CS.START .DA OPEN
|
2015-03-14 21:48:35 +00:00
|
|
|
|
.DA GETEVENT
|
2015-06-03 18:30:57 +00:00
|
|
|
|
.DA COUT
|
2015-03-14 21:48:35 +00:00
|
|
|
|
.DA CLOSE
|
|
|
|
|
.DA GETINFO
|
2015-06-03 18:30:57 +00:00
|
|
|
|
.DA IRQ
|
|
|
|
|
L.DEVINFO .DA DEVINFO
|
2015-11-29 22:19:10 +00:00
|
|
|
|
J.EscSeq .DA Esc.DispAttr m
|
|
|
|
|
.DA Esc.Scroll r
|
|
|
|
|
.DA Esc.EraseLine K
|
|
|
|
|
.DA Esc.Home H
|
|
|
|
|
.DA 0 end of relocation
|
2015-03-14 21:48:35 +00:00
|
|
|
|
*--------------------------------------
|
|
|
|
|
OPEN stz CURON
|
2015-11-29 22:19:10 +00:00
|
|
|
|
stz bEscMode
|
|
|
|
|
stz bEscModeCSI
|
|
|
|
|
|
|
|
|
|
jsr RESET
|
|
|
|
|
jsr RESETATTR
|
2015-03-14 21:48:35 +00:00
|
|
|
|
jsr HOME
|
2015-11-22 22:30:06 +00:00
|
|
|
|
|
|
|
|
|
lda #A2osX.SCREENS.C
|
|
|
|
|
>SYSCALL SYS.ScreenSelectA
|
2015-03-14 21:48:35 +00:00
|
|
|
|
|
|
|
|
|
clc
|
|
|
|
|
rts
|
|
|
|
|
*--------------------------------------
|
2015-06-03 18:30:57 +00:00
|
|
|
|
GETEVENT lda A2osX.TIMER16
|
2015-03-14 21:48:35 +00:00
|
|
|
|
and #CURSOR.BLINK.SPEED
|
|
|
|
|
eor CURON
|
2015-10-19 20:35:00 +00:00
|
|
|
|
beq .1
|
2015-03-14 21:48:35 +00:00
|
|
|
|
jsr CURBLNK
|
2015-10-19 20:35:00 +00:00
|
|
|
|
|
2015-11-22 22:30:06 +00:00
|
|
|
|
.1 lda A2osX.ASCREEN
|
2015-10-19 20:35:00 +00:00
|
|
|
|
and #A2osX.SCREENS.C is screen active?
|
|
|
|
|
beq .9
|
|
|
|
|
|
|
|
|
|
>SYSCALL SYS.GetKeyboardEvent
|
|
|
|
|
bcs .9
|
|
|
|
|
rts
|
2015-03-14 21:48:35 +00:00
|
|
|
|
|
|
|
|
|
.9 lda #0 Error = no event
|
|
|
|
|
sec
|
|
|
|
|
rts
|
|
|
|
|
*--------------------------------------
|
2015-11-29 22:19:10 +00:00
|
|
|
|
COUT bit bEscMode
|
|
|
|
|
bpl .1
|
|
|
|
|
jmp EscMode
|
|
|
|
|
|
|
|
|
|
.1 pha
|
2015-08-05 20:38:05 +00:00
|
|
|
|
jsr CUROFF
|
|
|
|
|
pla
|
|
|
|
|
cmp #32
|
2015-11-29 22:19:10 +00:00
|
|
|
|
bcc COUT.CTRL
|
|
|
|
|
|
|
|
|
|
ora INVFLG
|
|
|
|
|
ldx CH
|
|
|
|
|
ldy CV
|
|
|
|
|
jsr SetCharAtXY
|
|
|
|
|
bra FSOUT
|
2015-08-05 20:38:05 +00:00
|
|
|
|
|
2015-11-29 22:19:10 +00:00
|
|
|
|
COUT.CTRL cmp #8
|
2015-03-14 21:48:35 +00:00
|
|
|
|
bne .2
|
|
|
|
|
ldx CH
|
|
|
|
|
beq .10
|
|
|
|
|
dec CH
|
|
|
|
|
bra .12
|
|
|
|
|
|
|
|
|
|
.10 ldy CV
|
|
|
|
|
bne .11
|
2015-11-29 22:19:10 +00:00
|
|
|
|
clc
|
2015-03-14 21:48:35 +00:00
|
|
|
|
rts
|
|
|
|
|
|
|
|
|
|
.11 lda #79
|
|
|
|
|
sta CH
|
|
|
|
|
dec CV
|
|
|
|
|
|
2015-06-03 18:30:57 +00:00
|
|
|
|
.12 lda #$20
|
|
|
|
|
ora INVFLG
|
2015-03-14 21:48:35 +00:00
|
|
|
|
ldx CH
|
|
|
|
|
ldy CV
|
2015-11-29 22:19:10 +00:00
|
|
|
|
jmp SetCharAtXY
|
2015-03-14 21:48:35 +00:00
|
|
|
|
|
2015-08-05 20:38:05 +00:00
|
|
|
|
.2 cmp #12
|
2015-11-29 22:19:10 +00:00
|
|
|
|
beq HOME
|
2015-08-05 20:38:05 +00:00
|
|
|
|
|
|
|
|
|
.3 cmp #13
|
2015-03-14 21:48:35 +00:00
|
|
|
|
beq CROUT
|
2015-08-05 20:38:05 +00:00
|
|
|
|
|
2015-11-29 22:19:10 +00:00
|
|
|
|
cmp #27 ESC
|
|
|
|
|
dec bEscMode
|
|
|
|
|
clc
|
2015-08-05 20:38:05 +00:00
|
|
|
|
rts
|
2015-11-29 22:19:10 +00:00
|
|
|
|
*--------------------------------------
|
|
|
|
|
CLOSE
|
|
|
|
|
* lda A2osX.SCREENS
|
|
|
|
|
* and #$FF^A2osX.SCREENS.C
|
|
|
|
|
* sta A2osX.SCREENS
|
|
|
|
|
clc
|
|
|
|
|
rts
|
|
|
|
|
*--------------------------------------
|
|
|
|
|
GETINFO >LDYA L.DEVINFO
|
|
|
|
|
IRQ clc
|
|
|
|
|
rts
|
|
|
|
|
*--------------------------------------
|
|
|
|
|
* PRIVATE
|
|
|
|
|
*--------------------------------------
|
|
|
|
|
RESET lda #0
|
|
|
|
|
sta SCROLLTOP
|
|
|
|
|
lda #23
|
|
|
|
|
sta SCROLLBOT
|
|
|
|
|
rts
|
|
|
|
|
*--------------------------------------
|
|
|
|
|
RESETATTR lda #$80
|
|
|
|
|
sta INVFLG
|
|
|
|
|
rts
|
|
|
|
|
*--------------------------------------
|
2015-03-14 21:48:35 +00:00
|
|
|
|
FSOUT ldx CH
|
|
|
|
|
cpx #79
|
|
|
|
|
beq CROUT1
|
|
|
|
|
inc CH
|
2015-11-29 22:19:10 +00:00
|
|
|
|
clc
|
|
|
|
|
rts
|
2015-03-14 21:48:35 +00:00
|
|
|
|
*--------------------------------------
|
|
|
|
|
CROUT jsr CLREOL
|
2015-06-03 18:30:57 +00:00
|
|
|
|
*--------------------------------------
|
2015-03-14 21:48:35 +00:00
|
|
|
|
CROUT1 stz CH
|
|
|
|
|
ldy CV
|
|
|
|
|
cpy #23
|
|
|
|
|
beq SCROLL.UP
|
|
|
|
|
inc CV
|
2015-11-29 22:19:10 +00:00
|
|
|
|
clc
|
2015-03-14 21:48:35 +00:00
|
|
|
|
rts
|
2015-06-03 18:30:57 +00:00
|
|
|
|
*--------------------------------------
|
2015-11-29 22:19:10 +00:00
|
|
|
|
HOME stz CH
|
|
|
|
|
stz CV
|
|
|
|
|
|
|
|
|
|
ldx #23
|
2015-03-14 21:48:35 +00:00
|
|
|
|
|
|
|
|
|
.1 lda BASEL,x
|
2015-11-29 22:19:10 +00:00
|
|
|
|
sta ZPBaseL1
|
2015-03-14 21:48:35 +00:00
|
|
|
|
lda BASEH,x
|
2015-11-29 22:19:10 +00:00
|
|
|
|
sta ZPBaseL1+1
|
2015-03-14 21:48:35 +00:00
|
|
|
|
|
2015-11-29 22:19:10 +00:00
|
|
|
|
lda #' '
|
|
|
|
|
ora INVFLG
|
|
|
|
|
|
2015-11-23 14:54:30 +00:00
|
|
|
|
sta SETWRITEAUX
|
|
|
|
|
sta SETREADAUX
|
2015-03-14 21:48:35 +00:00
|
|
|
|
|
2015-11-29 22:19:10 +00:00
|
|
|
|
ldy #39
|
|
|
|
|
.2 sta (ZPBaseL1),y
|
2015-03-14 21:48:35 +00:00
|
|
|
|
dey
|
|
|
|
|
bpl .2
|
2015-11-29 22:19:10 +00:00
|
|
|
|
|
2015-11-23 14:54:30 +00:00
|
|
|
|
sta CLRWRITEAUX
|
|
|
|
|
sta CLRREADAUX
|
2015-11-29 22:19:10 +00:00
|
|
|
|
|
|
|
|
|
ldy #39
|
|
|
|
|
.3 sta (ZPBaseL1),y
|
2015-03-14 21:48:35 +00:00
|
|
|
|
dey
|
|
|
|
|
bpl .3
|
|
|
|
|
|
2015-11-29 22:19:10 +00:00
|
|
|
|
dex
|
|
|
|
|
bpl .1
|
|
|
|
|
|
|
|
|
|
clc
|
2015-03-14 21:48:35 +00:00
|
|
|
|
rts
|
|
|
|
|
*--------------------------------------
|
2015-11-29 22:19:10 +00:00
|
|
|
|
SCROLL.UP ldx SCROLLTOP
|
2015-03-14 21:48:35 +00:00
|
|
|
|
|
|
|
|
|
.1 lda BASEL,x
|
2015-11-29 22:19:10 +00:00
|
|
|
|
sta ZPBaseL1
|
|
|
|
|
lda BASEH,x
|
|
|
|
|
sta ZPBaseL1+1
|
|
|
|
|
inx
|
|
|
|
|
lda BASEL,x
|
|
|
|
|
sta ZPBaseL2
|
2015-03-14 21:48:35 +00:00
|
|
|
|
lda BASEH,x
|
2015-11-29 22:19:10 +00:00
|
|
|
|
sta ZPBaseL2+1
|
2015-03-14 21:48:35 +00:00
|
|
|
|
|
2015-11-29 22:19:10 +00:00
|
|
|
|
ldy #39
|
2015-11-23 14:54:30 +00:00
|
|
|
|
sta SETWRITEAUX
|
|
|
|
|
sta SETREADAUX
|
2015-03-14 21:48:35 +00:00
|
|
|
|
|
2015-11-29 22:19:10 +00:00
|
|
|
|
.2 lda (ZPBaseL2),y
|
|
|
|
|
sta (ZPBaseL1),y
|
2015-03-14 21:48:35 +00:00
|
|
|
|
dey
|
|
|
|
|
bpl .2
|
2015-11-23 14:54:30 +00:00
|
|
|
|
|
2015-03-14 21:48:35 +00:00
|
|
|
|
ldy #39
|
2015-11-29 22:19:10 +00:00
|
|
|
|
sta CLRWRITEAUX
|
|
|
|
|
sta CLRREADAUX
|
|
|
|
|
|
|
|
|
|
.3 lda (ZPBaseL2),y
|
|
|
|
|
sta (ZPBaseL1),y
|
2015-03-14 21:48:35 +00:00
|
|
|
|
dey
|
|
|
|
|
bpl .3
|
|
|
|
|
|
2015-11-29 22:19:10 +00:00
|
|
|
|
cpx SCROLLBOT
|
|
|
|
|
bne .1
|
|
|
|
|
*--------------------------------------
|
|
|
|
|
CLREOL ldx CH
|
|
|
|
|
ldy #80
|
|
|
|
|
bra CLR
|
|
|
|
|
|
|
|
|
|
CLRLINE ldx #0
|
|
|
|
|
ldy #80
|
|
|
|
|
bra CLR
|
2015-03-14 21:48:35 +00:00
|
|
|
|
|
2015-11-29 22:19:10 +00:00
|
|
|
|
CLRSOL ldx #0
|
|
|
|
|
ldy CH
|
|
|
|
|
|
|
|
|
|
CLR sty ZPTmpByte
|
|
|
|
|
.1 phx
|
|
|
|
|
lda #$20
|
|
|
|
|
ora INVFLG
|
|
|
|
|
ldy CV
|
|
|
|
|
jsr SetCharAtXY
|
|
|
|
|
plx
|
|
|
|
|
inx
|
|
|
|
|
cpx ZPTmpByte
|
|
|
|
|
bne .1
|
|
|
|
|
clc
|
2015-11-23 14:54:30 +00:00
|
|
|
|
rts
|
2015-03-14 21:48:35 +00:00
|
|
|
|
*--------------------------------------
|
|
|
|
|
CUROFF lda CURON
|
|
|
|
|
beq CUREXIT.RTS
|
|
|
|
|
|
2015-06-03 18:30:57 +00:00
|
|
|
|
CURBLNK lda A2osX.ASCREEN
|
2015-03-14 21:48:35 +00:00
|
|
|
|
and #A2osX.SCREENS.C
|
|
|
|
|
bne CURBLNK1
|
|
|
|
|
|
|
|
|
|
lda CURON
|
|
|
|
|
bne CURBLNK.OFF
|
|
|
|
|
rts do not Light if screen is not active
|
|
|
|
|
|
|
|
|
|
CURBLNK1 lda CURON
|
|
|
|
|
bne CURBLNK.OFF
|
|
|
|
|
ldx CH
|
|
|
|
|
ldy CV
|
|
|
|
|
jsr GetCharAtXY
|
|
|
|
|
sta CURCHAR
|
2015-11-29 22:19:10 +00:00
|
|
|
|
and #$80
|
2015-03-14 21:48:35 +00:00
|
|
|
|
ldx CH
|
|
|
|
|
ldy CV
|
2015-11-29 22:19:10 +00:00
|
|
|
|
eor #" "
|
2015-03-14 21:48:35 +00:00
|
|
|
|
jsr SetCharAtXY
|
|
|
|
|
bra CUREXIT
|
|
|
|
|
|
|
|
|
|
CURBLNK.OFF ldx CH
|
|
|
|
|
ldy CV
|
|
|
|
|
lda CURCHAR
|
|
|
|
|
jsr SetCharAtXY
|
|
|
|
|
|
|
|
|
|
CUREXIT lda CURON
|
|
|
|
|
eor #CURSOR.BLINK.SPEED
|
|
|
|
|
sta CURON
|
|
|
|
|
CUREXIT.RTS rts
|
|
|
|
|
*--------------------------------------
|
2015-11-29 22:19:10 +00:00
|
|
|
|
SetCharAtXY cmp #$40
|
|
|
|
|
bcc .10
|
|
|
|
|
cmp #$5F
|
|
|
|
|
bcs .10
|
|
|
|
|
and #$3F
|
|
|
|
|
|
|
|
|
|
.10 pha
|
2015-03-14 21:48:35 +00:00
|
|
|
|
txa
|
|
|
|
|
lsr
|
|
|
|
|
|
2015-11-23 14:54:30 +00:00
|
|
|
|
bcs .1
|
|
|
|
|
sta SETWRITEAUX
|
|
|
|
|
|
|
|
|
|
.1 clc
|
|
|
|
|
adc BASEL,y
|
2015-11-29 22:19:10 +00:00
|
|
|
|
sta ZPBaseL1
|
2015-03-14 21:48:35 +00:00
|
|
|
|
lda BASEH,y
|
2015-11-29 22:19:10 +00:00
|
|
|
|
sta ZPBaseL1+1
|
2015-03-14 21:48:35 +00:00
|
|
|
|
|
|
|
|
|
pla
|
2015-11-29 22:19:10 +00:00
|
|
|
|
sta (ZPBaseL1)
|
2015-11-23 14:54:30 +00:00
|
|
|
|
sta CLRWRITEAUX
|
|
|
|
|
rts
|
2015-03-14 21:48:35 +00:00
|
|
|
|
*--------------------------------------
|
2015-11-23 14:54:30 +00:00
|
|
|
|
GetCharAtXY txa
|
2015-03-14 21:48:35 +00:00
|
|
|
|
lsr
|
|
|
|
|
|
2015-11-23 14:54:30 +00:00
|
|
|
|
bcs .1
|
|
|
|
|
sta SETREADAUX
|
|
|
|
|
|
|
|
|
|
.1 clc
|
|
|
|
|
adc BASEL,y
|
2015-11-29 22:19:10 +00:00
|
|
|
|
sta ZPBaseL1
|
2015-03-14 21:48:35 +00:00
|
|
|
|
lda BASEH,y
|
2015-11-29 22:19:10 +00:00
|
|
|
|
sta ZPBaseL1+1
|
2015-03-14 21:48:35 +00:00
|
|
|
|
|
2015-11-29 22:19:10 +00:00
|
|
|
|
lda (ZPBaseL1)
|
2015-11-23 14:54:30 +00:00
|
|
|
|
sta CLRREADAUX
|
|
|
|
|
rts
|
2015-03-14 21:48:35 +00:00
|
|
|
|
*--------------------------------------
|
2015-11-29 22:19:10 +00:00
|
|
|
|
EscMode bit bEscModeCSI
|
|
|
|
|
bmi EscModeCSI
|
|
|
|
|
cmp #'['
|
|
|
|
|
bne .1
|
|
|
|
|
|
|
|
|
|
dec bEscModeCSI
|
|
|
|
|
stz EscSeq
|
|
|
|
|
clc
|
|
|
|
|
rts
|
|
|
|
|
|
|
|
|
|
.1 cmp #'7' save cup & attr
|
|
|
|
|
|
|
|
|
|
cmp #'8' restore cup & attr
|
|
|
|
|
|
|
|
|
|
stz bEscMode
|
|
|
|
|
clc
|
|
|
|
|
rts
|
|
|
|
|
|
|
|
|
|
EscModeCSI inc EscSeq
|
|
|
|
|
ldx EscSeq
|
|
|
|
|
sta EscSeq,x
|
|
|
|
|
cmp #64 End of Seq ?
|
|
|
|
|
bcs ExecEscSeq
|
|
|
|
|
cpx #ESCSEQ.MAXLEN too long?
|
|
|
|
|
bne .1
|
|
|
|
|
stz bEscModeCSI
|
|
|
|
|
stz bEscMode
|
|
|
|
|
.1 clc
|
|
|
|
|
rts
|
|
|
|
|
*--------------------------------------
|
|
|
|
|
ExecEscSeq stz EscSeqParamCnt
|
|
|
|
|
stz EscSeqInNum
|
|
|
|
|
ldx #0 EscSeq Ptr
|
|
|
|
|
ldy #0 EsqSeqParam Ptr
|
|
|
|
|
|
|
|
|
|
.1 inx
|
|
|
|
|
lda EscSeq,x
|
|
|
|
|
jsr IsDigit
|
|
|
|
|
bcs .2
|
|
|
|
|
|
|
|
|
|
dec EscSeqInNum
|
|
|
|
|
and #$0F
|
|
|
|
|
pha
|
|
|
|
|
lda EscSeqParam,y param=param*10
|
|
|
|
|
asl
|
|
|
|
|
asl
|
|
|
|
|
clc
|
|
|
|
|
adc EscSeqParam,y
|
|
|
|
|
sta EscSeqParam,y
|
|
|
|
|
pla
|
|
|
|
|
clc
|
|
|
|
|
adc EscSeqParam,y
|
|
|
|
|
sta EscSeqParam,y
|
|
|
|
|
bra .1
|
|
|
|
|
|
|
|
|
|
.2 bit EscSeqInNum
|
|
|
|
|
bpl .3
|
|
|
|
|
|
|
|
|
|
stz EscSeqInNum
|
|
|
|
|
iny
|
|
|
|
|
|
|
|
|
|
.3 lda EscSeq,x
|
|
|
|
|
cmp #';'
|
|
|
|
|
beq .1
|
|
|
|
|
|
|
|
|
|
sty EscSeqParamCnt
|
|
|
|
|
stz bEscModeCSI
|
|
|
|
|
stz bEscMode
|
|
|
|
|
|
|
|
|
|
ldy #0
|
|
|
|
|
ldx #0
|
|
|
|
|
|
|
|
|
|
.4 iny
|
|
|
|
|
cmp EscSeqCmds,y
|
|
|
|
|
beq .5
|
|
|
|
|
inx
|
|
|
|
|
inx
|
|
|
|
|
cpy EscSeqCmds
|
|
|
|
|
bne .4
|
|
|
|
|
clc
|
|
|
|
|
rts
|
|
|
|
|
|
|
|
|
|
.5 jmp (J.EscSeq,x)
|
|
|
|
|
*--------------------------------------
|
|
|
|
|
IsDigit cmp #'0'
|
|
|
|
|
bcc .9
|
|
|
|
|
cmp #'9'+1
|
|
|
|
|
rts cc if ok, cs if not
|
|
|
|
|
.9 sec
|
|
|
|
|
rts
|
|
|
|
|
*--------------------------------------
|
|
|
|
|
Esc.DispAttr ldx EscSeqParamCnt
|
|
|
|
|
beq .8
|
|
|
|
|
|
|
|
|
|
.1 lda EscSeqParam-1,x
|
|
|
|
|
bne .2
|
|
|
|
|
jsr RESETATTR
|
|
|
|
|
bra .7
|
|
|
|
|
|
|
|
|
|
.2 cmp #7
|
|
|
|
|
bne .8
|
|
|
|
|
stz INVFLG
|
|
|
|
|
|
|
|
|
|
.7 dex
|
|
|
|
|
bne .1
|
|
|
|
|
|
|
|
|
|
.8 clc
|
|
|
|
|
rts
|
|
|
|
|
*--------------------------------------
|
|
|
|
|
Esc.Scroll ldx EscSeqParamCnt
|
|
|
|
|
bne .1
|
|
|
|
|
|
|
|
|
|
lda #0
|
|
|
|
|
ldy #23
|
|
|
|
|
bra .8
|
|
|
|
|
|
|
|
|
|
.1 cpx #2
|
|
|
|
|
bne .9
|
|
|
|
|
|
|
|
|
|
lda EscSeqParam
|
|
|
|
|
dec
|
|
|
|
|
ldy EscSeqParam+1
|
|
|
|
|
dey
|
|
|
|
|
|
|
|
|
|
.8 sta SCROLLTOP
|
|
|
|
|
sty SCROLLBOT
|
|
|
|
|
.9 clc
|
|
|
|
|
rts
|
|
|
|
|
*--------------------------------------
|
|
|
|
|
Esc.EraseLine ldx EscSeqParamCnt
|
|
|
|
|
|
|
|
|
|
bne .1
|
|
|
|
|
jmp CLREOL
|
|
|
|
|
|
|
|
|
|
.1 lda EscSeqParam
|
|
|
|
|
cmp #1
|
|
|
|
|
bne .2
|
|
|
|
|
jmp CLRSOL
|
|
|
|
|
|
|
|
|
|
.2 cmp #2
|
|
|
|
|
bne .9
|
|
|
|
|
jmp CLRLINE
|
|
|
|
|
|
|
|
|
|
.9 clc
|
|
|
|
|
rts
|
|
|
|
|
*--------------------------------------
|
|
|
|
|
Esc.Home ldx EscSeqParamCnt
|
|
|
|
|
bne .1
|
|
|
|
|
stz CH
|
|
|
|
|
stz CV
|
|
|
|
|
clc
|
|
|
|
|
rts
|
|
|
|
|
|
|
|
|
|
.1 lda EscSeqParam
|
|
|
|
|
dec
|
|
|
|
|
bmi .9
|
|
|
|
|
cmp #80
|
|
|
|
|
bcs .9
|
|
|
|
|
sta CH
|
|
|
|
|
|
|
|
|
|
lda EscSeqParam+1
|
|
|
|
|
dec
|
|
|
|
|
bmi .9
|
|
|
|
|
cmp #24
|
|
|
|
|
bcs .9
|
|
|
|
|
sta CV
|
|
|
|
|
|
|
|
|
|
.9 clc
|
|
|
|
|
rts
|
|
|
|
|
*--------------------------------------
|
2015-06-03 18:30:57 +00:00
|
|
|
|
DRV.CS.END
|
|
|
|
|
BASEL .HS 00.80.00.80.00.80.00.80.28.A8.28.A8.28.A8.28.A8.50.D0.50.D0.50.D0.50.D0
|
|
|
|
|
BASEH .HS 04.04.05.05.06.06.07.07.04.04.05.05.06.06.07.07.04.04.05.05.06.06.07.07
|
2015-03-14 21:48:35 +00:00
|
|
|
|
CH .BS 1
|
|
|
|
|
CV .BS 1
|
|
|
|
|
INVFLG .BS 1
|
2015-11-29 22:19:10 +00:00
|
|
|
|
SCROLLTOP .BS 1
|
|
|
|
|
SCROLLBOT .BS 1
|
2015-03-14 21:48:35 +00:00
|
|
|
|
CURON .BS 1
|
|
|
|
|
CURCHAR .BS 1
|
2015-11-29 22:19:10 +00:00
|
|
|
|
bEscMode .BS 1
|
|
|
|
|
bEscModeCSI .BS 1
|
|
|
|
|
EscSeq .BS ESCSEQ.MAXLEN+1
|
|
|
|
|
EscSeqParamCnt .BS 1
|
|
|
|
|
EscSeqParam .BS 4
|
|
|
|
|
EscSeqInNum .BS 1
|
|
|
|
|
EscSeqCmds >PSTRING "mrKH"
|
2015-06-03 18:30:57 +00:00
|
|
|
|
DEVINFO .DA #S.DEVINFO.TYPE.CHAR
|
|
|
|
|
.DA #80
|
|
|
|
|
.DA #24
|
2015-03-14 21:48:35 +00:00
|
|
|
|
*--------------------------------------
|
|
|
|
|
MAN
|
|
|
|
|
SAVE DRV/CONSOLE.DRV.S
|
|
|
|
|
ASM
|