-
Notifications
You must be signed in to change notification settings - Fork 0
/
vt100.ctrl.S
122 lines (104 loc) · 1.36 KB
/
vt100.ctrl.S
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
lst off
cas se
rel
xc
xc
use vt.equ
*control chars
ext draw_char,update_cursor
control ent
asl
tax
jmp (:table,x)
:table
dw :rts ; ^@
dw :rts ; ^A
dw :rts ; ^B
dw :rts ; ^C
dw :rts ; ^D
dw enq ; ^E
dw :rts ; ^F
dw bel ; ^G
dw bs ; ^H
dw tab ; ^I
dw lf ; ^J
dw vt ; ^K
dw ff ; ^L
dw cr ; ^M
dw so ; ^N
dw si ; ^O
dw :rts ; ^P
dw xon ; ^Q
dw :rts ; ^R
dw xoff ; ^S
dw :rts ; ^T
dw :rts ; ^U
dw :rts ; ^V
dw :rts ; ^W
dw can ; ^X
dw :rts ; ^Y
dw sub ; ^Z
dw esc ; ^[
dw :rts ; ^\
dw :rts ; ^]
dw :rts ; ^^
dw :rts ; ^_
:rts rts
enq
* send answer back message.
* answer back message is a user-controllable string of text sent as-is
* (with no specific terminator character)
rts
bel
* todo - trigger nice ensoniq beep.
rts
bs
* backspace, no wrap
lda x
beq :rts
and #$7f
dec
sta x
jmp update_cursor
:rts rts
tab
* go to next tab stop
* tab at 80 does not reset overflow.
rts
lf
vt
ff
* vt and ff interpreted as lf
* LNM: also do cr.
bit LNM
bpl :lnm
stz x
:lnm
lda y
cmp BM ; bottom margin
bne :iny
jmp scroll_up
:iny inc y
jmp update_cursor
cr
stz x
jmp update_cursor
so ; G1 character set
si ; G0 character set
rts
xon
xoff
* flow control...
rts
can
sub
ext draw_char_raw
* cancel esc sequence and display error character
stz state
lda #$57 ; mouse text block
jmp draw_char_raw
rts
esc
lda #st_esc
sta state
rts