-
Notifications
You must be signed in to change notification settings - Fork 85
/
ob6src
177 lines (177 loc) · 1.87 KB
/
ob6src
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
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
.PAG 'TAPE WRITE & INIT'
WRITE LDA OCHAR
LSR A
LDA #96
BCC WRT1
WRTW LDA #176
WRT1 LDX #0
WRTX STA T2L
STX T2H
LDA PIA
EOR #8
STA PIA
AND #8
RTS
WRTL3 SEC
ROR SAH
BMI WRT3
WRTN LDA RER
BNE WRTN1
LDA #16
LDX #1
JSR WRTX
BNE WRT3
INC RER
LDA SAH
BPL WRT3
JMP WRNC
WRTN1 LDA REZ
BNE WRTN2
JSR WRTW
BNE WRT3
INC REZ
BNE WRT3
WRTN2 JSR WRITE
BNE WRT3
LDA FIRT
EOR #1
STA FIRT
BEQ WRT2
LDA OCHAR
EOR #1
STA OCHAR
AND #1
EOR PRTY
STA PRTY
WRT3 JMP PREND
WRT2 LSR OCHAR
DEC PCNTR
LDA PCNTR
BEQ WRT4
BPL WRT3
WRTS JSR NEWCH
CLI
LDA CNTDN
BEQ WRT6
LDX #0
STX DATA
WRTS1 DEC CNTDN
LDX FSBLK
CPX #2
BNE WRT61
ORA #$80
WRT61 STA OCHAR
BNE WRT3
WRT6 JSR WRT62
BCC WRT7
BNE WRTL3
INC SAH
LDA DATA
STA OCHAR
BCS WRT3
WRT7 LDY #0
LDA (SAL)Y
STA OCHAR
EOR DATA
STA DATA
INC SAL
BNE WRT3
INC SAH
BNE WRT3
WRT4 LDA PRTY
EOR #1
STA OCHAR
WRTBK JMP PREND
WRNC DEC FSBLK
BNE WREND
JSR TNOF
WREND LDA #80
STA SHCNL
LDX #8
SEI
JSR BSIV
BNE WRTBK
WRTZ LDA #120
JSR WRT1
BNE WRTBK
DEC SHCNL
BNE WRTBK
JSR NEWCH
DEC SHCNH
BPL WRTBK
LDX #10
JSR BSIV
CLI
INC SHCNH
LDA FSBLK
BEQ STKY
JSR RD300
LDX #9
STX CNTDN
BNE WRTS
TNIF PHP
SEI
JSR TNOF
LDA #$7F
STA IER
LDA #$3C
STA PIAL1
LDA #$3D
STA PIAS
LDX #12
JSR BSIV
PLP
RTS
STKY JSR TNIF
BEQ WRTBK
BSIV LDA BSIT,X
STA CINV
LDA BSIT+1,X
STA CINV+1
RTS
TNOF LDA #$3C
STA PIAS
LDA PIA
ORA #$10
STA PIA
RTS
VPRTY LDA (SAL)Y
EOR SHCNH
STA SHCNH
INC SAL
BNE VP10
INC SAH
VP10 JSR WRT62
BNE VPRTY
RTS
WRT62 LDA SAH
CMP EAH
BNE WRT64
LDA SAL
CMP EAL
WRT64 RTS
START LDX #$FF
TXS
CLD
JSR CINT
LDA #<READY
STA NMINV
LDA #>READY
STA NMINV+1
LDA #<BRKE
STA CBINV
LDA #>BRKE
STA CBINV+1
LDA #<ERROPR
STA USRCMD
LDA #>ERROPR
STA USRCMD+1
CLI
LDA PIAL
BMI *+5
JMP CALLE
JMP INIT
NMI JMP (NMINV)
BSIT .WOR 0,0,0,0 ;BSYI1,BCI1,0,BCI2
.WOR WRTZ,WRTN,KEY,READ
.FIL CALLE