fixes.
This commit is contained in:
parent
dfdf608018
commit
6abf2574e3
|
@ -0,0 +1,24 @@
|
||||||
|
|
||||||
|
|
||||||
|
debug mac
|
||||||
|
brl ]eom
|
||||||
|
dw $7771
|
||||||
|
str ']1'
|
||||||
|
]eom
|
||||||
|
<<<
|
||||||
|
|
||||||
|
*debuglab mac
|
||||||
|
*]1
|
||||||
|
* brl ]eom
|
||||||
|
* dw $7771
|
||||||
|
* str ']1'
|
||||||
|
*]eom
|
||||||
|
* <<<
|
||||||
|
|
||||||
|
*debugent mac
|
||||||
|
*]1 ent
|
||||||
|
* brl ]eom
|
||||||
|
* dw $7771
|
||||||
|
* str ']1'
|
||||||
|
*]eom
|
||||||
|
* <<<
|
|
@ -6,6 +6,7 @@
|
||||||
|
|
||||||
mx %11
|
mx %11
|
||||||
use vt.equ
|
use vt.equ
|
||||||
|
use debug
|
||||||
|
|
||||||
ext dispatch
|
ext dispatch
|
||||||
|
|
||||||
|
@ -24,6 +25,7 @@ kmOption equ %0100_0000
|
||||||
kmCommand equ %1000_0000
|
kmCommand equ %1000_0000
|
||||||
|
|
||||||
keypress ent
|
keypress ent
|
||||||
|
debug keypress
|
||||||
lda KBD
|
lda KBD
|
||||||
bmi :key
|
bmi :key
|
||||||
rts
|
rts
|
||||||
|
@ -50,6 +52,7 @@ keypress ent
|
||||||
|
|
||||||
asl
|
asl
|
||||||
tax
|
tax
|
||||||
|
lsr ; restore
|
||||||
jmp (special,x)
|
jmp (special,x)
|
||||||
|
|
||||||
:ctrl
|
:ctrl
|
||||||
|
@ -290,9 +293,9 @@ arrow
|
||||||
lda #ESC
|
lda #ESC
|
||||||
jsr dispatch
|
jsr dispatch
|
||||||
|
|
||||||
tsb DECANM
|
bit DECANM
|
||||||
bmi :vt52
|
bpl :vt52
|
||||||
tsb DECCKM
|
bit DECCKM
|
||||||
bmi :cursor
|
bmi :cursor
|
||||||
|
|
||||||
lda #'['
|
lda #'['
|
||||||
|
|
|
@ -2,7 +2,7 @@
|
||||||
ovr all
|
ovr all
|
||||||
* binary linker
|
* binary linker
|
||||||
lkv 0
|
lkv 0
|
||||||
org $6000
|
org $2000
|
||||||
|
|
||||||
* asm boot.S
|
* asm boot.S
|
||||||
* asm vt100.ctrl.S
|
* asm vt100.ctrl.S
|
||||||
|
@ -33,4 +33,5 @@
|
||||||
lnk vt100.modem.L
|
lnk vt100.modem.L
|
||||||
lnk vt100.key.L
|
lnk vt100.key.L
|
||||||
|
|
||||||
sav vt100.bin
|
typ $ff
|
||||||
|
sav vt100.sys
|
||||||
|
|
16
vt100.main.S
16
vt100.main.S
|
@ -6,6 +6,7 @@
|
||||||
|
|
||||||
mx %11
|
mx %11
|
||||||
use vt.equ
|
use vt.equ
|
||||||
|
use debug
|
||||||
|
|
||||||
ext scroll_down
|
ext scroll_down
|
||||||
ext recalc_cursor,recalc_cursor_x,recalc_cursor_y
|
ext recalc_cursor,recalc_cursor_x,recalc_cursor_y
|
||||||
|
@ -19,7 +20,7 @@ TXTSET equ $c051
|
||||||
VGCINT equ $c023
|
VGCINT equ $c023
|
||||||
SCANINT equ $c032
|
SCANINT equ $c032
|
||||||
|
|
||||||
main
|
main debug main
|
||||||
|
|
||||||
clc
|
clc
|
||||||
xce
|
xce
|
||||||
|
@ -76,6 +77,11 @@ init
|
||||||
|
|
||||||
lda #23
|
lda #23
|
||||||
sta DECBM
|
sta DECBM
|
||||||
|
lda #$80
|
||||||
|
sta LOCAL
|
||||||
|
|
||||||
|
lda #st_vt52
|
||||||
|
sta state
|
||||||
|
|
||||||
jsr erase_screen
|
jsr erase_screen
|
||||||
jsr init_modem
|
jsr init_modem
|
||||||
|
@ -174,8 +180,8 @@ ctrl_1b ; escape -
|
||||||
* vt100 - aborts current escape sequence and starts a new one.
|
* vt100 - aborts current escape sequence and starts a new one.
|
||||||
* vt52 - esc esc aborts and starts new
|
* vt52 - esc esc aborts and starts new
|
||||||
* vt50 - esc esc aborts
|
* vt50 - esc esc aborts
|
||||||
lda DECANM
|
bit DECANM
|
||||||
bne :vt52
|
bpl :vt52
|
||||||
lda #st_vt100_esc
|
lda #st_vt100_esc
|
||||||
sta state
|
sta state
|
||||||
rts
|
rts
|
||||||
|
@ -190,8 +196,8 @@ ctrl_1a
|
||||||
* vt100 - abort current escape sequence
|
* vt100 - abort current escape sequence
|
||||||
* and display error character.
|
* and display error character.
|
||||||
* TODO - display error character (mouse text)
|
* TODO - display error character (mouse text)
|
||||||
lda DECANM
|
bit DECANM
|
||||||
bne :vt52
|
bpl :vt52
|
||||||
lda #st_vt100
|
lda #st_vt100
|
||||||
sta state
|
sta state
|
||||||
rts
|
rts
|
||||||
|
|
|
@ -16,7 +16,7 @@ SCCADATA equ $c03b
|
||||||
|
|
||||||
|
|
||||||
init_modem ent
|
init_modem ent
|
||||||
sep #$30
|
* sep #$30
|
||||||
* reset channel B (modem port)
|
* reset channel B (modem port)
|
||||||
ldx #9
|
ldx #9
|
||||||
lda #%01010001
|
lda #%01010001
|
||||||
|
|
|
@ -258,6 +258,7 @@ fill_screen ent
|
||||||
* fill the entire screen with the a register.
|
* fill the entire screen with the a register.
|
||||||
* text screen is out of order, so this doesn't use much code but
|
* text screen is out of order, so this doesn't use much code but
|
||||||
* it's not linear either.
|
* it's not linear either.
|
||||||
|
* +64 bytes of screen hole data.
|
||||||
mx %11
|
mx %11
|
||||||
|
|
||||||
sta >$000400
|
sta >$000400
|
||||||
|
@ -268,13 +269,13 @@ fill_screen ent
|
||||||
|
|
||||||
ldx #$0400
|
ldx #$0400
|
||||||
ldy #$0401
|
ldy #$0401
|
||||||
lda #40*24-2
|
lda #40*24+64-2
|
||||||
mvn $01,$01
|
mvn $010000,$010000
|
||||||
|
|
||||||
ldx #$0400
|
ldx #$0400
|
||||||
ldy #$0401
|
ldy #$0401
|
||||||
lda #40*24-2
|
lda #40*24+64-2
|
||||||
mvn $00,$00
|
mvn $000000,$000000
|
||||||
|
|
||||||
* not needed since $0,$0 last
|
* not needed since $0,$0 last
|
||||||
* phk
|
* phk
|
||||||
|
@ -318,13 +319,13 @@ scroll_up ent
|
||||||
lda #40
|
lda #40
|
||||||
ldx #]1
|
ldx #]1
|
||||||
ldy #]2
|
ldy #]2
|
||||||
mvn $1,$1
|
mvn $010000,$010000
|
||||||
|
|
||||||
lda #$40
|
lda #$40
|
||||||
lda #40
|
lda #40
|
||||||
ldx #]1
|
ldx #]1
|
||||||
ldy #]2
|
ldy #]2
|
||||||
mvn $0,$0
|
mvn $000000,$000000
|
||||||
|
|
||||||
dec r0
|
dec r0
|
||||||
bne *+5
|
bne *+5
|
||||||
|
@ -412,13 +413,13 @@ scroll_down ent
|
||||||
lda #40
|
lda #40
|
||||||
ldx #]1
|
ldx #]1
|
||||||
ldy #]2
|
ldy #]2
|
||||||
mvn $1,$1
|
mvn $010000,$010000
|
||||||
|
|
||||||
lda #$40
|
lda #$40
|
||||||
lda #40
|
lda #40
|
||||||
ldx #]1
|
ldx #]1
|
||||||
ldy #]2
|
ldy #]2
|
||||||
mvn $0,$0
|
mvn $000000,$000000
|
||||||
|
|
||||||
dec r0
|
dec r0
|
||||||
bne *+5
|
bne *+5
|
||||||
|
|
|
@ -110,11 +110,11 @@ esc_A ; cursor up.
|
||||||
|
|
||||||
esc_B ; cursor down
|
esc_B ; cursor down
|
||||||
lda y
|
lda y
|
||||||
cmp #79
|
cmp #23
|
||||||
beq :rts
|
beq :rts
|
||||||
cmp DECBM
|
cmp DECBM
|
||||||
beq :rts
|
beq :rts
|
||||||
iny y
|
inc y
|
||||||
jmp recalc_cursor_y
|
jmp recalc_cursor_y
|
||||||
|
|
||||||
:rts rts
|
:rts rts
|
||||||
|
@ -225,6 +225,8 @@ vt52_dca ent
|
||||||
sta y
|
sta y
|
||||||
:update
|
:update
|
||||||
stz :tmp
|
stz :tmp
|
||||||
|
lda #st_vt52
|
||||||
|
sta state
|
||||||
jmp recalc_cursor
|
jmp recalc_cursor
|
||||||
|
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue