-
Notifications
You must be signed in to change notification settings - Fork 85
/
oa2src
247 lines (247 loc) · 2.92 KB
/
oa2src
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
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
.PAG 'SCREEN EDITOR & I/O'
SCROL SEI
LDY #0
STY POINT-1
LDA #$80
STA SAH
STA POINT
LDA #40
BIT LDTB1+1
BMI SCRL1
LDA #80
SCRL1 STA SAL
LDA #$34
STA PIAL1
MLP1 LDA (SAL)Y
STA (POINT-1)Y
INY
BNE MLP1
INC SAH
INC POINT
LDA #$84
CMP SAH
BNE MLP1
LDA #232
STA PNT
DEC POINT
LDA #'
MLP2 DEC PNT
DEC SAL
STA (PNT)Y
BNE MLP2
LDX #25
STX TBLX
SCRL4 LDX #0
DEC TBLX
SCRL5 LDA LDTB1,X
AND #$7F
LDY LDTB1+1,X
BPL SCRL3
ORA #$80
SCRL3 STA LDTB1,X
INX
CPX #25
BNE SCRL5
LDA #$83
STA LDTB1+24
LDA LDTB1
BPL SCRL4
LDA #$3C
STA PIAL1
CLI
LDA #$FE
CMP PIAK
BNE MLP42
LDY #8
MLP4 STA TIH
MLP41 BIT IFR
BVC MLP41
DEY
BNE MLP4
STY NDX
MLP42 LDX TBLX
RTS
NEWLN LDX TBLX
INX
SEI
LDA #$34
STA PIAL1
CPX #24
BEQ BLKLN
BCC NEWLX
JMP SCRL
NEWLX LDX #23
NEWL1 LDA LDTB1+1,X
ORA #$80
STA SAH
LDY LDTB1,X
BMI NEWLA
AND #$7F
NEWLA STA LDTB1+1,X
TYA
ORA #$80
STA POINT
LDY #39
LDA LDTB2+1,X
STA SAL
LDA LDTB2,X
STA PNT
NELL LDA (PNT)Y
STA (SAL)Y
DEY
BPL NELL
DEX
CPX TBLX
BNE NEWL1
INX
BLKLN LDA LDTB1,X
ORA #$80
STA POINT
AND #$7F
STA LDTB1,X
LDA LDTB2,X
STA PNT
LDY #39
LDA #'
BLKL STA (PNT)Y
DEY
BPL BLKL
LDA #$3C
STA PIAL1
CLI
JMP STUPT
PULS PHA
TXA
PHA
TYA
PHA
TSX
LDA $104,X
AND #$10
BEQ PULS1
JMP (CBINV)
PULS1 JMP (CINV)
KEY JSR KUDTIM
LDA BLNSW
BNE KEY4
DEC BLNCT
BNE KEY4
LDA #20
STA BLNCT
LDY PNTR
LSR BLNON
LDA (POINT-1)Y
BCS KEY5
INC BLNON
STA GDBLN
KEY5 EOR #$80
STA (POINT-1)Y
KEY4 LDX #$FF
STX SFDX
INX
STX SFST
LDX #80
LDA PIAL
AND #$F0
STA PIAL
LDY #0
LDA PIAL
ASL A
ASL A
ASL A
BPL KEY3
STY CAS1
LDA #$3D
BNE KL24
KEY3 LDA CAS1
BNE KL2
LDA #$35
KL24 STA PIAS
KL2 BCC KL23
STY CAS2
LDA PIA
ORA #$10
BNE KL25
KL23 LDA CAS2
BNE KL22
LDA PIA
AND #$EF
KL25 STA PIA
KL22 LDY #8
LDA PIAK
CMP PIAK
BNE KL22
KL1 LSR A
BCS CKIT
PHA
LDA CHAR-1,X
BNE CKIS1
LDA #1
STA SFST
BNE CKUT
CKIS1 CMP #$FF
BEQ CKUT
CMP #$3C
BNE SPCK
BIT PIAL1
BMI CKUT
SPCK STX SFDX
CKUT PLA
CKIT DEX
BEQ CKIT1
DEY
BNE KL1
INC PIAL
BNE KL22
CKIT1 LDA SFDX
CMP LSTX
BEQ PREND
STA LSTX
TAX
BMI PREND
LDA CHAR-1,X
LSR SFST
BCC KN1
ORA #$80
KN1 LDX NDX
STA KEYD,X
INX
CPX #10
BNE KEYF
LDX #0
KEYF STX NDX
PREND PLA
TAY
PLA
TAX
PLA
RTI
DSPP TAY
DSPP1 LDA PIA
AND #$20
BNE DSPP1
TYA
LDY PNTR
STA (POINT-1)Y
RTS
CHAR .BYT $3D,$2E
.BYT $FF,$3,$3C,$20,$5B,$12
.BYT $2D,$30,0,$3E,$FF,$5D,$40,0
.BYT $2B,$32,$FF,$3F,$2C,$4E,$56,$58
.BYT $33,$31,$D,$3B,$4D,$42,$43,$5A
.BYT $2A,$35,$FF,$3A,$4B,$48,$46,$53
.BYT $36,$34,$FF,$4C,$4A,$47,$44,$41
.BYT $2F,$38,$FF,$50,$49,$59,$52,$57
.BYT $39,$37,$5E,$4F,$55,$54,$45,$51
.BYT $14,$11,$FF,$29,$5C,$27,$24,$22
.BYT $1D,$13,$5F,$28,$26,$25,$23,$21
LDTB2 .BYT 0,40,80,120,160,200
.BYT 240,280-256,320-256,360-256
.BYT 400-256,440-256,480-256
.BYT 520-512,560-512
.BYT 600-512,640-512,680-512
.BYT 720-512,760-512,800-768
.BYT 840-768,880-768,920-768,960-768
RUNTB .BYT 'LOAD',$D,'RUN',$D
;
.FILE UTILIT