bug fixes.
This commit is contained in:
parent
63cac578bd
commit
121673badb
20
debug.S
20
debug.S
|
@ -1,24 +1,8 @@
|
||||||
|
|
||||||
|
|
||||||
debug mac
|
debug mac
|
||||||
brl ]eom
|
brl eom
|
||||||
dw $7771
|
dw $7771
|
||||||
str ']1'
|
str ']1'
|
||||||
]eom
|
eom
|
||||||
<<<
|
<<<
|
||||||
|
|
||||||
*debuglab mac
|
|
||||||
*]1
|
|
||||||
* brl ]eom
|
|
||||||
* dw $7771
|
|
||||||
* str ']1'
|
|
||||||
*]eom
|
|
||||||
* <<<
|
|
||||||
|
|
||||||
*debugent mac
|
|
||||||
*]1 ent
|
|
||||||
* brl ]eom
|
|
||||||
* dw $7771
|
|
||||||
* str ']1'
|
|
||||||
*]eom
|
|
||||||
* <<<
|
|
||||||
|
|
12
vt100.csi.S
12
vt100.csi.S
|
@ -1,6 +1,6 @@
|
||||||
|
|
||||||
|
|
||||||
lst off
|
* lst off
|
||||||
cas se
|
cas se
|
||||||
|
|
||||||
rel
|
rel
|
||||||
|
@ -8,6 +8,7 @@
|
||||||
xc
|
xc
|
||||||
|
|
||||||
use vt.equ
|
use vt.equ
|
||||||
|
use debug
|
||||||
|
|
||||||
mx %11
|
mx %11
|
||||||
|
|
||||||
|
@ -15,6 +16,8 @@
|
||||||
ext recalc_cursor,recalc_cursor_x,recalc_cursor_y
|
ext recalc_cursor,recalc_cursor_x,recalc_cursor_y
|
||||||
|
|
||||||
vt100_csi ent
|
vt100_csi ent
|
||||||
|
debug vt100_csi
|
||||||
|
|
||||||
* 0123456789;ycnlhgrqJKmABCDHf
|
* 0123456789;ycnlhgrqJKmABCDHf
|
||||||
|
|
||||||
* based on testing -
|
* based on testing -
|
||||||
|
@ -153,6 +156,7 @@ vt100_csi_bad ent
|
||||||
|
|
||||||
|
|
||||||
vt100_csi_2 ent
|
vt100_csi_2 ent
|
||||||
|
debug vt100_csi_2
|
||||||
|
|
||||||
cmp #:MIN
|
cmp #:MIN
|
||||||
blt :end
|
blt :end
|
||||||
|
@ -160,6 +164,8 @@ vt100_csi_2 ent
|
||||||
bge :end
|
bge :end
|
||||||
sec
|
sec
|
||||||
sbc #:MIN
|
sbc #:MIN
|
||||||
|
asl
|
||||||
|
tax
|
||||||
jmp (:table,x)
|
jmp (:table,x)
|
||||||
|
|
||||||
:badmod
|
:badmod
|
||||||
|
@ -478,6 +484,10 @@ csi_D
|
||||||
|
|
||||||
csi_f
|
csi_f
|
||||||
csi_H ; direct cursor addressing
|
csi_H ; direct cursor addressing
|
||||||
|
|
||||||
|
debug csi_H
|
||||||
|
|
||||||
|
|
||||||
* honors origin
|
* honors origin
|
||||||
* large numbers are clamped
|
* large numbers are clamped
|
||||||
* 0 or 1 treated as 1 (1-based counting)
|
* 0 or 1 treated as 1 (1-based counting)
|
||||||
|
|
188
vt100.esc.S
188
vt100.esc.S
|
@ -9,10 +9,14 @@
|
||||||
mx %11
|
mx %11
|
||||||
|
|
||||||
|
|
||||||
|
ext recalc_cursor,recalc_cursor_x,recalc_cursor_y
|
||||||
|
ext scroll_up,scroll_down
|
||||||
|
|
||||||
vt100_esc ent
|
vt100_esc ent
|
||||||
* #[()=>cH78DEM
|
* #[()=>cH78DEM
|
||||||
* based on testing, unspecified chars in the 0x20-0x2f range cause it to gobble
|
* based on testing, unspecified chars in the 0x20-0x2f range cause it
|
||||||
* chars until 0x30- terminator (which ends the sequence but does not take an action)
|
* to gobble chars until 0x30- terminator (which ends the sequence but
|
||||||
|
* does not take an action)
|
||||||
|
|
||||||
* esc 1 -> hangs? [undocumented]
|
* esc 1 -> hangs? [undocumented]
|
||||||
|
|
||||||
|
@ -40,69 +44,69 @@ vt100_esc ent
|
||||||
|
|
||||||
:table
|
:table
|
||||||
dw :pound ; #
|
dw :pound ; #
|
||||||
dw :bad ; $
|
dw :bad ; $
|
||||||
dw :bad ; %
|
dw :bad ; %
|
||||||
dw :bad ; &
|
dw :bad ; &
|
||||||
dw :bad ; '
|
dw :bad ; '
|
||||||
dw :lparen ; (
|
dw :lparen ; (
|
||||||
dw :rparen ; )
|
dw :rparen ; )
|
||||||
dw :bad ; *
|
dw :bad ; *
|
||||||
dw :bad ; +
|
dw :bad ; +
|
||||||
dw :bad ; ,
|
dw :bad ; ,
|
||||||
dw :bad ; -
|
dw :bad ; -
|
||||||
dw :bad ; .
|
dw :bad ; .
|
||||||
dw :bad ; /
|
dw :bad ; /
|
||||||
dw :rts ; 0
|
dw :rts ; 0
|
||||||
dw :rts ; 1
|
dw :rts ; 1
|
||||||
dw :rts ; 2
|
dw :rts ; 2
|
||||||
dw :rts ; 3
|
dw :rts ; 3
|
||||||
dw :rts ; 4
|
dw :rts ; 4
|
||||||
dw :rts ; 5
|
dw :rts ; 5
|
||||||
dw :rts ; 6
|
dw :rts ; 6
|
||||||
dw esc_7 ; 7
|
dw esc_7 ; 7
|
||||||
dw esc_8 ; 8
|
dw esc_8 ; 8
|
||||||
dw :rts ; 9
|
dw :rts ; 9
|
||||||
dw :rts ; :
|
dw :rts ; :
|
||||||
dw :rts ; ;
|
dw :rts ; ;
|
||||||
dw :rts ; <
|
dw :rts ; <
|
||||||
dw esc_eq ; =
|
dw esc_eq ; =
|
||||||
dw esc_gt ; >
|
dw esc_gt ; >
|
||||||
dw :rts ; ?
|
dw :rts ; ?
|
||||||
dw :rts ; @
|
dw :rts ; @
|
||||||
dw :rts ; A
|
dw :rts ; A
|
||||||
dw :rts ; B
|
dw :rts ; B
|
||||||
dw :rts ; C
|
dw :rts ; C
|
||||||
dw esc_D ; D
|
dw esc_D ; D
|
||||||
dw esc_E ; E
|
dw esc_E ; E
|
||||||
dw :rts ; F
|
dw :rts ; F
|
||||||
dw :rts ; G
|
dw :rts ; G
|
||||||
dw esc_H ; H
|
dw esc_H ; H
|
||||||
dw :rts ; I
|
dw :rts ; I
|
||||||
dw :rts ; J
|
dw :rts ; J
|
||||||
dw :rts ; K
|
dw :rts ; K
|
||||||
dw :rts ; L
|
dw :rts ; L
|
||||||
dw esc_M ; M
|
dw esc_M ; M
|
||||||
dw :rts ; N
|
dw :rts ; N
|
||||||
dw :rts ; O
|
dw :rts ; O
|
||||||
dw :rts ; P
|
dw :rts ; P
|
||||||
dw :rts ; Q
|
dw :rts ; Q
|
||||||
dw :rts ; R
|
dw :rts ; R
|
||||||
dw :rts ; S
|
dw :rts ; S
|
||||||
dw :rts ; T
|
dw :rts ; T
|
||||||
dw :rts ; U
|
dw :rts ; U
|
||||||
dw :rts ; V
|
dw :rts ; V
|
||||||
dw :rts ; W
|
dw :rts ; W
|
||||||
dw :rts ; X
|
dw :rts ; X
|
||||||
dw :rts ; Y
|
dw :rts ; Y
|
||||||
dw :rts ; Z
|
dw :rts ; Z
|
||||||
dw :rts ; [
|
dw :csi ; [
|
||||||
dw :rts ; \
|
dw :rts ; \
|
||||||
dw :rts ; ]
|
dw :rts ; ]
|
||||||
dw :rts ; ^
|
dw :rts ; ^
|
||||||
dw :rts ; _
|
dw :rts ; _
|
||||||
dw :rts ; `
|
dw :rts ; `
|
||||||
dw :rts ; a
|
dw :rts ; a
|
||||||
dw :rts ; b
|
dw :rts ; b
|
||||||
dw esc_c ; c
|
dw esc_c ; c
|
||||||
|
|
||||||
|
|
||||||
|
@ -122,6 +126,11 @@ vt100_esc ent
|
||||||
stx state
|
stx state
|
||||||
rts
|
rts
|
||||||
|
|
||||||
|
:csi
|
||||||
|
ldx #st_vt100_csi
|
||||||
|
stx state
|
||||||
|
rts
|
||||||
|
|
||||||
|
|
||||||
esc_7 ; save cursor position, graphic rendition, and character set.
|
esc_7 ; save cursor position, graphic rendition, and character set.
|
||||||
rts
|
rts
|
||||||
|
@ -144,13 +153,45 @@ esc_H ; set tab stop
|
||||||
:rts rts
|
:rts rts
|
||||||
|
|
||||||
esc_E ; next line
|
esc_E ; next line
|
||||||
|
* This sequence causes the active position to move to the first position
|
||||||
|
* on the next line downward. If the active position is at the bottom
|
||||||
|
* margin, a scroll up is performed.
|
||||||
stz x
|
stz x
|
||||||
|
jsr recalc_cursor_x
|
||||||
; drop through
|
; drop through
|
||||||
esc_D ; index
|
esc_D ; index
|
||||||
rts
|
* This sequence causes the active position to move downward one line
|
||||||
|
* without changing the column position. If the active position is at the
|
||||||
|
* bottom margin, a scroll up is performed.
|
||||||
|
|
||||||
|
lda y
|
||||||
|
cmp DECBM
|
||||||
|
beq :scroll
|
||||||
|
cmp #23
|
||||||
|
beq :rts
|
||||||
|
inc y
|
||||||
|
jmp recalc_cursor_y
|
||||||
|
|
||||||
|
:scroll jmp scroll_down
|
||||||
|
:rts rts
|
||||||
|
|
||||||
|
|
||||||
esc_M ; reverse index
|
esc_M ; reverse index
|
||||||
rts
|
* Move the active position to the same horizontal position on the
|
||||||
|
* preceding line. If the active position is at the top margin, a scroll
|
||||||
|
* down is performed.
|
||||||
|
|
||||||
|
lda y
|
||||||
|
cmp DECTM
|
||||||
|
beq :scroll
|
||||||
|
cmp #0
|
||||||
|
beq :rts
|
||||||
|
dec y
|
||||||
|
jmp recalc_cursor_y
|
||||||
|
|
||||||
|
:scroll jmp scroll_up
|
||||||
|
:rts rts
|
||||||
|
|
||||||
|
|
||||||
esc_c ; reset terminal.
|
esc_c ; reset terminal.
|
||||||
rts
|
rts
|
||||||
|
@ -174,23 +215,27 @@ vt100_esc_pound ent
|
||||||
* esc # 6 - make line double width
|
* esc # 6 - make line double width
|
||||||
|
|
||||||
* esc # 8 - screen alignment - fill screen with E (SGR not honored)
|
* esc # 8 - screen alignment - fill screen with E (SGR not honored)
|
||||||
* based on testing, this also resets the scrolling region and homes the cursor.
|
* based on testing, this also resets the scrolling region and homes
|
||||||
|
* the cursor.
|
||||||
|
|
||||||
* based on testing, 0+ are term characters, 0x20-0x2f puts it in esc_bad state
|
* based on testing, 0+ are term characters, 0x20-0x2f puts it in
|
||||||
|
* esc_bad state
|
||||||
|
|
||||||
ldx #st_vt100
|
ldx #st_vt100
|
||||||
sta state
|
stx state
|
||||||
|
|
||||||
cmp #:MIN ; must be 0.
|
cmp #:MIN
|
||||||
blt :bad
|
blt :bad
|
||||||
cmp #:MAX+1
|
cmp #:MAX+1
|
||||||
bge :rts
|
bge :rts
|
||||||
|
sec
|
||||||
|
sbc #:MIN
|
||||||
asl
|
asl
|
||||||
tax
|
tax
|
||||||
jmp (:table,x)
|
jmp (:table,x)
|
||||||
|
|
||||||
:bad ldx #st_vt100_esc_bad
|
:bad ldx #st_vt100_esc_bad
|
||||||
sta state
|
stx state
|
||||||
:rts rts
|
:rts rts
|
||||||
|
|
||||||
:MIN equ 48
|
:MIN equ 48
|
||||||
|
@ -208,7 +253,18 @@ vt100_esc_pound ent
|
||||||
dw :e ; 8
|
dw :e ; 8
|
||||||
dw :rts ; 9
|
dw :rts ; 9
|
||||||
|
|
||||||
:e rts
|
:e
|
||||||
|
* TODO - does this reset DECOM?
|
||||||
|
ext fill_screen
|
||||||
|
stz x
|
||||||
|
stz y
|
||||||
|
stz DECTM
|
||||||
|
lda #23
|
||||||
|
sta DECBM
|
||||||
|
jsr recalc_cursor
|
||||||
|
|
||||||
|
lda #"E"
|
||||||
|
jmp fill_screen
|
||||||
|
|
||||||
|
|
||||||
vt100_esc_lparen ent
|
vt100_esc_lparen ent
|
||||||
|
@ -227,14 +283,14 @@ vt100_esc_rparen ent
|
||||||
* not currently supported.
|
* not currently supported.
|
||||||
|
|
||||||
ldx #st_vt100
|
ldx #st_vt100
|
||||||
sta state
|
stx state
|
||||||
|
|
||||||
cmp #'0'
|
cmp #'0'
|
||||||
blt :bad
|
blt :bad
|
||||||
rts
|
rts
|
||||||
|
|
||||||
:bad ldx #st_vt100_esc_bad
|
:bad ldx #st_vt100_esc_bad
|
||||||
sta state
|
stx state
|
||||||
:rts rts
|
:rts rts
|
||||||
|
|
||||||
sav vt100.esc.L
|
sav vt100.esc.L
|
||||||
|
|
Loading…
Reference in New Issue