mirror of
https://github.com/ksherlock/itty-bitty-vtty.git
synced 2025-02-09 04:30:53 +00:00
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.
|
||||
|
||||
:simple
|
||||
cmp #23
|
||||
beq :rts
|
||||
inc y
|
||||
jmp recalc_cursor_y
|
||||
|
||||
:rts rts
|
||||
|
||||
ctrl_0d ; carriage return - cursor to column 0.
|
||||
stz x
|
||||
jmp recalc_cursor_x
|
||||
|
102
vt100.screen.S
102
vt100.screen.S
@ -288,7 +288,12 @@ draw_char ent
|
||||
rts
|
||||
|
||||
|
||||
* erase screen commands are not affected by origin or scrolling region.
|
||||
|
||||
erase_screen ent
|
||||
erase_screen_2 ent
|
||||
* erase the entire screen.
|
||||
|
||||
mx %11
|
||||
lda erase_char
|
||||
* fall through
|
||||
@ -618,10 +623,99 @@ erase_line_1 ent
|
||||
:exit plp
|
||||
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.
|
||||
* erase screen
|
||||
* erase start -> cursor
|
||||
* erase cursor -> end
|
||||
lda y
|
||||
inc
|
||||
cmp #24
|
||||
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
|
||||
|
27
vt100.vt52.S
27
vt100.vt52.S
@ -17,7 +17,7 @@
|
||||
|
||||
ext write_modem,draw_char
|
||||
ext advance_x,recalc_cursor,recalc_cursor_x,recalc_cursor_y
|
||||
|
||||
ext scroll_up,scroll_down
|
||||
|
||||
vt52_esc ent
|
||||
* ABCDFGHIJKYZ<>=
|
||||
@ -142,18 +142,31 @@ esc_D ; cursor left
|
||||
esc_I ; cursor up w/ line scroll
|
||||
* based on testing, scrolling only occurs within the
|
||||
* scroll region.
|
||||
rts
|
||||
esc_J rts
|
||||
esc_K rts
|
||||
lda y
|
||||
cmp DECTM
|
||||
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
|
||||
; based on testing, does not respect scrolling region but does
|
||||
; respect origin mode.
|
||||
stz x
|
||||
* stz y
|
||||
* bit DECOM
|
||||
* bpl :go
|
||||
lda DECTM
|
||||
sta y
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user