vt52 might be more or less complete now.
This commit is contained in:
parent
73722a2c02
commit
63cac578bd
|
@ -259,9 +259,13 @@ ctrl_0c ; form feed.
|
||||||
* if LNM mode, need to update cursor as well.
|
* if LNM mode, need to update cursor as well.
|
||||||
|
|
||||||
:simple
|
:simple
|
||||||
|
cmp #23
|
||||||
|
beq :rts
|
||||||
inc y
|
inc y
|
||||||
jmp recalc_cursor_y
|
jmp recalc_cursor_y
|
||||||
|
|
||||||
|
:rts rts
|
||||||
|
|
||||||
ctrl_0d ; carriage return - cursor to column 0.
|
ctrl_0d ; carriage return - cursor to column 0.
|
||||||
stz x
|
stz x
|
||||||
jmp recalc_cursor_x
|
jmp recalc_cursor_x
|
||||||
|
|
102
vt100.screen.S
102
vt100.screen.S
|
@ -288,7 +288,12 @@ draw_char ent
|
||||||
rts
|
rts
|
||||||
|
|
||||||
|
|
||||||
|
* erase screen commands are not affected by origin or scrolling region.
|
||||||
|
|
||||||
erase_screen ent
|
erase_screen ent
|
||||||
|
erase_screen_2 ent
|
||||||
|
* erase the entire screen.
|
||||||
|
|
||||||
mx %11
|
mx %11
|
||||||
lda erase_char
|
lda erase_char
|
||||||
* fall through
|
* fall through
|
||||||
|
@ -618,10 +623,99 @@ erase_line_1 ent
|
||||||
:exit plp
|
:exit plp
|
||||||
rts
|
rts
|
||||||
|
|
||||||
|
erase_screen_0 ent
|
||||||
|
* erase cursor to end of screen.
|
||||||
|
mx %11
|
||||||
|
jsr erase_line_0
|
||||||
|
php
|
||||||
|
rep #$30
|
||||||
|
|
||||||
* erase screen commands are not affected by origin or scrolling region.
|
lda y
|
||||||
* erase screen
|
inc
|
||||||
* erase start -> cursor
|
cmp #24
|
||||||
* erase cursor -> end
|
bcs :exit
|
||||||
|
asl
|
||||||
|
tay
|
||||||
|
lda erase_char
|
||||||
|
|
||||||
|
:loop
|
||||||
|
|
||||||
|
sty r0
|
||||||
|
ldx text,y
|
||||||
|
ldy #19
|
||||||
|
:loop0
|
||||||
|
sta >$000000,x
|
||||||
|
inx
|
||||||
|
inx
|
||||||
|
dey
|
||||||
|
bpl :loop0
|
||||||
|
|
||||||
|
ldy r0
|
||||||
|
ldx text,y
|
||||||
|
ldy #19
|
||||||
|
:loop1
|
||||||
|
sta >$010000,x
|
||||||
|
inx
|
||||||
|
inx
|
||||||
|
dey
|
||||||
|
bpl :loop1
|
||||||
|
|
||||||
|
ldy r0
|
||||||
|
iny
|
||||||
|
iny
|
||||||
|
cpy #24*2
|
||||||
|
bcc :loop
|
||||||
|
|
||||||
|
:exit
|
||||||
|
plp
|
||||||
|
rts
|
||||||
|
|
||||||
|
erase_screen_1 ent
|
||||||
|
* erase beginning of screen to cursor.
|
||||||
|
mx %11
|
||||||
|
jsr erase_line_1
|
||||||
|
|
||||||
|
php
|
||||||
|
rep #$30
|
||||||
|
|
||||||
|
lda y
|
||||||
|
dec
|
||||||
|
bmi :exit
|
||||||
|
asl
|
||||||
|
tay
|
||||||
|
lda erase_char
|
||||||
|
|
||||||
|
:loop
|
||||||
|
|
||||||
|
sty r0
|
||||||
|
ldx text,y
|
||||||
|
ldy #19
|
||||||
|
:loop0
|
||||||
|
sta >$000000,x
|
||||||
|
inx
|
||||||
|
inx
|
||||||
|
dey
|
||||||
|
bpl :loop0
|
||||||
|
|
||||||
|
ldy r0
|
||||||
|
ldx text,y
|
||||||
|
ldy #19
|
||||||
|
:loop1
|
||||||
|
sta >$010000,x
|
||||||
|
inx
|
||||||
|
inx
|
||||||
|
dey
|
||||||
|
bpl :loop1
|
||||||
|
|
||||||
|
ldy r0
|
||||||
|
dey
|
||||||
|
dey
|
||||||
|
bpl :loop
|
||||||
|
|
||||||
|
|
||||||
|
:exit
|
||||||
|
plp
|
||||||
|
rts
|
||||||
|
rts
|
||||||
|
|
||||||
sav vt100.screen.L
|
sav vt100.screen.L
|
||||||
|
|
27
vt100.vt52.S
27
vt100.vt52.S
|
@ -17,7 +17,7 @@
|
||||||
|
|
||||||
ext write_modem,draw_char
|
ext write_modem,draw_char
|
||||||
ext advance_x,recalc_cursor,recalc_cursor_x,recalc_cursor_y
|
ext advance_x,recalc_cursor,recalc_cursor_x,recalc_cursor_y
|
||||||
|
ext scroll_up,scroll_down
|
||||||
|
|
||||||
vt52_esc ent
|
vt52_esc ent
|
||||||
* ABCDFGHIJKYZ<>=
|
* ABCDFGHIJKYZ<>=
|
||||||
|
@ -142,18 +142,31 @@ esc_D ; cursor left
|
||||||
esc_I ; cursor up w/ line scroll
|
esc_I ; cursor up w/ line scroll
|
||||||
* based on testing, scrolling only occurs within the
|
* based on testing, scrolling only occurs within the
|
||||||
* scroll region.
|
* scroll region.
|
||||||
rts
|
lda y
|
||||||
esc_J rts
|
cmp DECTM
|
||||||
esc_K rts
|
beq :scroll
|
||||||
|
cmp #0
|
||||||
|
beq :rts
|
||||||
|
dec y
|
||||||
|
jmp recalc_cursor_y
|
||||||
|
|
||||||
|
:scroll jmp scroll_up
|
||||||
|
:rts rts
|
||||||
|
|
||||||
|
esc_J
|
||||||
|
* erase cursor to end of screen.
|
||||||
|
ext erase_screen_0
|
||||||
|
jmp erase_screen_0
|
||||||
|
rts
|
||||||
|
esc_K
|
||||||
|
* erase cursor to end of line
|
||||||
|
ext erase_line_0
|
||||||
|
jmp erase_line_0
|
||||||
|
|
||||||
esc_H ; cursor home
|
esc_H ; cursor home
|
||||||
; based on testing, does not respect scrolling region but does
|
; based on testing, does not respect scrolling region but does
|
||||||
; respect origin mode.
|
; respect origin mode.
|
||||||
stz x
|
stz x
|
||||||
* stz y
|
|
||||||
* bit DECOM
|
|
||||||
* bpl :go
|
|
||||||
lda DECTM
|
lda DECTM
|
||||||
sta y
|
sta y
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue