/[projet1]/users/dbug/rom_test/basic11b.tas
Defence Force logotype

Contents of /users/dbug/rom_test/basic11b.tas

Parent Directory Parent Directory | Revision Log Revision Log


Revision 1097 - (show annotations)
Sat Feb 1 09:11:46 2014 UTC (6 years, 2 months ago) by dbug
File size: 132791 byte(s)
Oric 1.1 ROM disassembled with Regenerator 1.3 http://csdb.dk/release/index.php?id=118900
Slightly modified to assemble cleanly with XA (did a binary compare with the original ROM and it matches 100%)

1
2 *=$c000
3
4 ;
5 ; **** ZP FIELDS ****
6 ;
7 f00 = $00
8 f01 = $01
9 f02 = $02
10 f03 = $03
11 f04 = $04
12 f0B = $0B
13 f35 = $35
14 f44 = $44
15 f98 = $98
16 fC6 = $C6
17 fCC = $CC
18 fCF = $CF
19 fD0 = $D0
20 fD7 = $D7
21 fD8 = $D8
22 fE1 = $E1
23
24 ;
25 ; **** ZP POINTERS ****
26 ;
27 p0C = $0C
28 p0E = $0E
29 p10 = $10
30 p12 = $12
31 p14 = $14
32 p18 = $18
33 p1D = $1D
34 p1F = $1F
35 p33 = $33
36 p46 = $46
37 p91 = $91
38 p93 = $93
39 p9A = $9A
40 pA4 = $A4
41 pB2 = $B2
42 pB6 = $B6
43 pB8 = $B8
44 pBD = $BD
45 pBF = $BF
46 pC7 = $C7
47 pC9 = $C9
48 pCE = $CE
49 pD1 = $D1
50 pD3 = $D3
51 pDB = $DB
52 pDE = $DE
53 pE0 = $E0
54 pE9 = $E9
55 ;
56 ; **** FIELDS ****
57 ;
58 f0001 = $0001
59 f0002 = $0002
60 f0003 = $0003
61 f0004 = $0004
62 f000B = $000B
63 f0030 = $0030
64 f0031 = $0031
65 f0032 = $0032
66 f0033 = $0033
67 f00FF = $00FF
68 f0100 = $0100
69 f0101 = $0101
70 f0102 = $0102
71 f0103 = $0103
72 f0104 = $0104
73 f0109 = $0109
74 f010F = $010F
75 f0110 = $0110
76 f0111 = $0111
77 f0112 = $0112
78 f0238 = $0238
79 f026B = $026B
80 f0272 = $0272
81 f0273 = $0273
82 f0277 = $0277
83 f027F = $027F
84 f0293 = $0293
85 f02A7 = $02A7
86 f02E1 = $02E1
87 f02E2 = $02E2
88 fBB7F = $BB7F
89 fBB80 = $BB80
90 fBFDE = $BFDE
91 fBFDF = $BFDF
92 ;
93 ; **** ABSOLUTE ADRESSES ****
94 ;
95 a00A0 = $00A0
96 a00A2 = $00A2
97 a00A9 = $00A9
98 a0200 = $0200
99 a0201 = $0201
100 a0202 = $0202
101 a0203 = $0203
102 a0204 = $0204
103 a0208 = $0208
104 a0209 = $0209
105 a020A = $020A
106 a020C = $020C
107 a020D = $020D
108 a020E = $020E
109 a0210 = $0210
110 a0211 = $0211
111 a0212 = $0212
112 a0213 = $0213
113 a0214 = $0214
114 a0215 = $0215
115 a0216 = $0216
116 a0217 = $0217
117 a0218 = $0218
118 a0219 = $0219
119 a021A = $021A
120 a021B = $021B
121 a021C = $021C
122 a021D = $021D
123 a021E = $021E
124 a021F = $021F
125 a0220 = $0220
126 a024D = $024D
127 a024E = $024E
128 a024F = $024F
129 a0251 = $0251
130 a0252 = $0252
131 a0253 = $0253
132 a0256 = $0256
133 a0257 = $0257
134 a0258 = $0258
135 a0259 = $0259
136 a025A = $025A
137 a025B = $025B
138 a025C = $025C
139 a025D = $025D
140 a025E = $025E
141 a025F = $025F
142 a0260 = $0260
143 a0261 = $0261
144 a0262 = $0262
145 a0263 = $0263
146 a0264 = $0264
147 a0265 = $0265
148 a0268 = $0268
149 a0269 = $0269
150 a026A = $026A
151 a026C = $026C
152 a0271 = $0271
153 a0278 = $0278
154 a0279 = $0279
155 a027A = $027A
156 a027B = $027B
157 a027C = $027C
158 a027D = $027D
159 a027E = $027E
160 a02A9 = $02A9
161 a02AA = $02AA
162 a02AB = $02AB
163 a02AC = $02AC
164 a02AD = $02AD
165 a02AE = $02AE
166 a02AF = $02AF
167 a02B0 = $02B0
168 a02B1 = $02B1
169 a02C0 = $02C0
170 a02C1 = $02C1
171 a02C2 = $02C2
172 a02C3 = $02C3
173 a02DF = $02DF
174 a02E0 = $02E0
175 a02E3 = $02E3
176 a02E4 = $02E4
177 a02E5 = $02E5
178 a02E6 = $02E6
179 a02E7 = $02E7
180 a02E8 = $02E8
181 a02F0 = $02F0
182 a02F1 = $02F1
183 a02F2 = $02F2
184 a02F4 = $02F4
185 a02F6 = $02F6
186 a02F8 = $02F8
187 a02FB = $02FB
188 a02FC = $02FC
189 a02FD = $02FD
190 a0300 = $0300
191 a0301 = $0301
192 a0302 = $0302
193 a0303 = $0303
194 a0304 = $0304
195 a0305 = $0305
196 a0306 = $0306
197 a0307 = $0307
198 a0309 = $0309
199 a030B = $030B
200 a030C = $030C
201 a030D = $030D
202 a030E = $030E
203 a030F = $030F
204 a08A9 = $08A9
205 a11A9 = $11A9
206 a1410 = $1410
207 a20A9 = $20A9
208 a28A9 = $28A9
209 a2CA9 = $2CA9
210 a35A2 = $35A2
211 a3FA9 = $3FA9
212 a4500 = $4500
213 a5AA2 = $5AA2
214 aA000 = $A000
215 ;
216 ; **** POINTERS ****
217 ;
218 p17 = $0017
219 p88 = $0088
220 p0091 = $0091
221 pD0 = $00D0
222 p02F5 = $02F5
223 p0420 = $0420
224 p0500 = $0500
225 p1B04 = $1B04
226 p2850 = $2850
227 pB900 = $B900
228 ;
229 ; **** EXTERNAL JUMPS ****
230 ;
231 e001A = $001A
232 e00C3 = $00C3
233 e00E2 = $00E2
234 e00E8 = $00E8
235 e023B = $023B
236 e023E = $023E
237 e024A = $024A
238
239 * = $C000
240
241 JMP StartBASIC
242
243 JMP jC471
244
245 JumpTab .BYTE $72
246 fC007 .BYTE $C9,$91,$C6,$86,$E9,$D0,$E9,$15
247 .BYTE $CD,$18,$CD,$11,$CA,$50,$DA,$A0
248 .BYTE $DA,$DD,$D9,$66,$D9,$84,$DA,$A0
249 .BYTE $DA,$54,$C8,$FC,$C7,$08,$C8,$97
250 .BYTE $CE,$3B,$CA,$54,$CD,$7D,$D1,$CD
251 .BYTE $CC,$88,$CD,$1B,$CB,$E4,$C9,$BC
252 .BYTE $C9,$6F,$CA,$51,$C9,$C7,$C9,$11
253 .BYTE $CA,$98,$CA,$CD,$EB,$E6,$EB,$0B
254 .BYTE $EC,$20,$EC,$32,$EC,$B4,$FA,$CA
255 .BYTE $FA,$E0,$FA,$9E,$FA,$FB,$EA,$FB
256 .BYTE $EA,$FB,$EA,$EF,$EA,$EF,$EA,$EF
257 .BYTE $EA,$EF,$EA,$EF,$EA,$EF,$EA,$EF
258 .BYTE $EA,$FB,$EA,$FB,$EA,$70,$C9,$C1
259 .BYTE $CA,$57,$D9,$5A,$E8,$08,$E9,$B9
260 .BYTE $D4,$4E,$D9,$AA,$CB,$9F,$C9,$47
261 .BYTE $C7,$0C,$C7,$45,$CD,$45,$E9,$12
262 .BYTE $CD,$ED,$C6,$21,$DF,$BD,$DF,$49
263 .BYTE $DF,$21,$00,$7E,$D4,$A6,$D4,$B5
264 .BYTE $D9,$FB,$02,$2E,$E2,$4F,$E3,$AF
265 .BYTE $DC,$AA,$E2,$8B,$E3,$92,$E3,$DB
266 .BYTE $E3,$3F,$E4,$38,$D9,$83,$D9,$D4
267 .BYTE $DD,$A6,$D8,$93,$D5,$D7,$D8,$B5
268 .BYTE $D8,$16,$D8,$77,$DE,$0F,$DF,$0B
269 .BYTE $DF,$DA,$DA,$3F,$DA,$45,$EC,$2A
270 .BYTE $D8,$56,$D8,$61,$D8
271 fC0CC .BYTE $79
272 fC0CD .BYTE $24
273 fC0CE .BYTE $DB,$79,$0D,$DB,$7B,$EF,$DC,$7B
274 .BYTE $E6,$DD,$7F,$37,$E2,$50,$E5,$D0
275 .BYTE $46,$E2,$D0,$7D,$70,$E2,$5A,$3B
276 .BYTE $D0,$64,$12
277 pC0E9 .BYTE $D1
278 Keywords .BYTE $45,$4E,$C4,$45,$44,$49,$D4,$53
279 .BYTE $54,$4F,$52,$C5,$52,$45,$43,$41
280 .BYTE $4C,$CC,$54,$52,$4F,$CE,$54,$52
281 .BYTE $4F,$46,$C6,$50,$4F,$D0,$50,$4C
282 .BYTE $4F,$D4,$50,$55,$4C,$CC,$4C,$4F
283 .BYTE $52,$45,$D3,$44,$4F,$4B,$C5,$52
284 .BYTE $45,$50,$45,$41,$D4,$55,$4E,$54
285 .BYTE $49,$CC,$46,$4F,$D2,$4C,$4C,$49
286 .BYTE $53,$D4,$4C,$50,$52,$49,$4E,$D4
287 .BYTE $4E,$45,$58,$D4,$44,$41,$54,$C1
288 .BYTE $49,$4E,$50,$55,$D4,$44,$49,$CD
289 .BYTE $43,$4C,$D3,$52,$45,$41,$C4,$4C
290 .BYTE $45,$D4,$47,$4F,$54,$CF,$52,$55
291 .BYTE $CE,$49,$C6,$52,$45,$53,$54,$4F
292 .BYTE $52,$C5,$47,$4F,$53,$55,$C2,$52
293 .BYTE $45,$54,$55,$52,$CE,$52,$45,$CD
294 .BYTE $48,$49,$4D,$45,$CD,$47,$52,$41
295 .BYTE $C2,$52,$45,$4C,$45,$41,$53,$C5
296 .BYTE $54,$45,$58,$D4,$48,$49,$52,$45
297 .BYTE $D3,$53,$48,$4F,$4F,$D4,$45,$58
298 .BYTE $50,$4C,$4F,$44,$C5,$5A,$41,$D0
299 .BYTE $50,$49,$4E,$C7,$53,$4F,$55,$4E
300 .BYTE $C4,$4D,$55,$53,$49,$C3,$50,$4C
301 .BYTE $41,$D9,$43,$55,$52,$53,$45,$D4
302 .BYTE $43,$55,$52,$4D,$4F,$D6,$44,$52
303 .BYTE $41,$D7,$43,$49,$52,$43,$4C,$C5
304 .BYTE $50,$41,$54,$54,$45,$52,$CE,$46
305 .BYTE $49,$4C,$CC,$43,$48,$41,$D2,$50
306 .BYTE $41,$50,$45,$D2,$49,$4E,$CB,$53
307 .BYTE $54,$4F,$D0,$4F,$CE,$57,$41,$49
308 .BYTE $D4,$43,$4C,$4F,$41,$C4,$43,$53
309 .BYTE $41,$56,$C5,$44,$45,$C6,$50,$4F
310 .BYTE $4B,$C5,$50,$52,$49,$4E,$D4,$43
311 .BYTE $4F,$4E,$D4,$4C,$49,$53,$D4,$43
312 .BYTE $4C,$45,$41,$D2,$47,$45,$D4,$43
313 .BYTE $41,$4C,$CC,$A1,$4E,$45,$D7,$54
314 .BYTE $41,$42,$A8,$54,$CF,$46,$CE,$53
315 .BYTE $50,$43,$A8,$C0,$41,$55,$54,$CF
316 .BYTE $45,$4C,$53,$C5,$54,$48,$45,$CE
317 .BYTE $4E,$4F,$D4,$53,$54,$45,$D0,$AB
318 .BYTE $AD,$AA,$AF,$DE,$41,$4E,$C4,$4F
319 .BYTE $D2,$BE,$BD,$BC,$53,$47,$CE,$49
320 .BYTE $4E,$D4,$41,$42,$D3,$55,$53,$D2
321 .BYTE $46,$52,$C5,$50,$4F,$D3,$48,$45
322 .BYTE $58,$A4,$A6,$53,$51,$D2,$52,$4E
323 .BYTE $C4,$4C,$CE,$45,$58,$D0,$43,$4F
324 .BYTE $D3,$53,$49,$CE,$54,$41,$CE,$41
325 .BYTE $54,$CE,$50,$45,$45,$CB,$44,$45
326 .BYTE $45,$CB,$4C,$4F,$C7,$4C,$45,$CE
327 .BYTE $53,$54,$52,$A4,$56,$41,$CC,$41
328 .BYTE $53,$C3,$43,$48,$52,$A4,$50,$C9
329 .BYTE $54,$52,$55,$C5,$46,$41,$4C,$53
330 .BYTE $C5,$4B,$45,$59,$A4,$53,$43,$52
331 .BYTE $CE,$50,$4F,$49,$4E,$D4,$4C,$45
332 .BYTE $46,$54,$A4,$52,$49,$47,$48,$54
333 .BYTE $A4,$4D,$49,$44,$A4,$00
334 ErrorMsgs .BYTE $4E,$45,$58,$54,$20,$57,$49,$54
335 .BYTE $48,$4F,$55,$54,$20,$46,$4F,$D2
336 .BYTE $53,$59,$4E,$54,$41,$D8,$52,$45
337 .BYTE $54,$55,$52,$4E,$20,$57,$49,$54
338 .BYTE $48,$4F,$55,$54,$20,$47,$4F,$53
339 .BYTE $55,$C2,$4F,$55,$54,$20,$4F,$46
340 .BYTE $20,$44,$41,$54,$C1,$49,$4C,$4C
341 .BYTE $45,$47,$41,$4C,$20,$51,$55,$41
342 .BYTE $4E,$54,$49,$54,$D9,$4F,$56,$45
343 .BYTE $52,$46,$4C,$4F,$D7,$4F,$55,$54
344 .BYTE $20,$4F,$46,$20,$4D,$45,$4D,$4F
345 .BYTE $52,$D9,$55,$4E,$44,$45,$46,$27
346 .BYTE $44,$20,$53,$54,$41,$54,$45,$4D
347 .BYTE $45,$4E,$D4,$42,$41,$44,$20,$53
348 .BYTE $55,$42,$53,$43,$52,$49,$50,$D4
349 .BYTE $52,$45,$44,$49,$4D,$27,$44,$20
350 .BYTE $41,$52,$52,$41,$D9,$44,$49,$56
351 .BYTE $49,$53,$49,$4F,$4E,$20,$42,$59
352 .BYTE $20,$5A,$45,$52,$CF,$49,$4C,$4C
353 .BYTE $45,$47,$41,$4C,$20,$44,$49,$52
354 .BYTE $45,$43,$D4,$44,$49,$53,$50,$20
355 .BYTE $54,$59,$50,$45,$20,$4D,$49,$53
356 .BYTE $4D,$41,$54,$43,$C8,$53,$54,$52
357 .BYTE $49,$4E,$47,$20,$54,$4F,$4F,$20
358 .BYTE $4C,$4F,$4E,$C7,$46,$4F,$52,$4D
359 .BYTE $55,$4C,$41,$20,$54,$4F,$4F,$20
360 .BYTE $43,$4F,$4D,$50,$4C,$45,$D8,$43
361 .BYTE $41,$4E,$27,$54,$20,$43,$4F,$4E
362 .BYTE $54,$49,$4E,$55,$C5,$55,$4E,$44
363 .BYTE $45,$46,$27,$44,$20,$46,$55,$4E
364 .BYTE $43,$54,$49,$4F,$CE,$42,$41,$44
365 .BYTE $20,$55,$4E,$54,$49,$CC,$20,$45
366 .BYTE $52,$52,$4F,$52,$00,$20,$49,$4E
367 .BYTE $20,$00,$0D,$0A,$52,$65,$61,$64
368 .BYTE $79,$20,$0D,$0A,$00,$0D,$0A,$20
369 .BYTE $42,$52,$45,$41,$4B,$00
370 FindForVar TSX
371 INX
372 INX
373 INX
374 INX
375 bC3CB LDA f0101,X
376 CMP #$8D
377 BNE bC3F3
378 LDA $B9
379 BNE bC3E0
380 LDA f0102,X
381 STA $B8
382 LDA f0103,X
383 STA $B9
384 bC3E0 CMP f0103,X
385 BNE bC3EC
386 LDA $B8
387 CMP f0102,X
388 BEQ bC3F3
389 bC3EC TXA
390 CLC
391 ADC #$12
392 TAX
393 BNE bC3CB
394 bC3F3 RTS
395
396 VarAlloc JSR FreeMemCheck
397 STA $A0
398 STY $A1
399 sC3FB SEC
400 LDA $C9
401 SBC $CE
402 STA $91
403 TAY
404 LDA $CA
405 SBC $CF
406 TAX
407 INX
408 TYA
409 BEQ bC42F
410 LDA $C9
411 SEC
412 SBC $91
413 STA $C9
414 BCS bC418
415 DEC $CA
416 SEC
417 bC418 LDA $C7
418 SBC $91
419 STA $C7
420 BCS bC428
421 DEC $C8
422 BCC bC428
423 bC424 LDA (pC9),Y
424 STA (pC7),Y
425 bC428 DEY
426 BNE bC424
427 LDA (pC9),Y
428 STA (pC7),Y
429 bC42F DEC $CA
430 DEC $C8
431 DEX
432 BNE bC428
433 RTS
434
435 sC437 ASL
436 ADC #$3E
437 BCS PrintError
438 STA $91
439 TSX
440 CPX $91
441 BCC PrintError
442 RTS
443
444 FreeMemCheck CPY $A3
445 BCC bC470
446 BNE bC44E
447 CMP $A2
448 BCC bC470
449 bC44E PHA
450 LDX #$09
451 TYA
452 bC452 PHA
453 LDA fC6,X
454 DEX
455 BPL bC452
456 JSR GarbageCollect
457 LDX #$F7
458 bC45D PLA
459 STA fD0,X
460 INX
461 BMI bC45D
462 PLA
463 TAY
464 PLA
465 CPY $A3
466 BCC bC470
467 BNE PrintError
468 CMP $A2
469 BCS PrintError
470 bC470 RTS
471
472 jC471 LDA $02C0
473 AND #$FE
474 STA $02C0
475 JMP BackToBASIC
476
477 PrintError LDX #$4D
478 jC47E JSR SetScreen
479 LSR $2E
480 JSR NewLine
481 JSR sCCD7
482 bC489 LDA ErrorMsgs,X
483 PHA
484 AND #$7F
485 JSR sCCD9
486 INX
487 PLA
488 BPL bC489
489 JSR sC726
490 LDA #$A6
491 LDY #$C3
492 jC49D JSR PrintString
493 LDY $A9
494 INY
495 BEQ BackToBASIC
496 JSR sE0BA
497 BackToBASIC LSR $0252
498 LSR $2E
499 LSR $02F2
500 LDA #$B2
501 LDY #$C3
502 JSR $001A
503 bC4B7 JSR SetScreen
504 JSR GetLine
505 STX $E9
506 STY $EA
507 JSR $00E2
508 TAX
509 BEQ bC4B7
510 LDX #$FF
511 STX $A9
512 BCC InsDelLine
513 JSR TokeniseLine
514 JMP jC90C
515
516 InsDelLine JSR Txt2Int
517 JSR TokeniseLine
518 STY $26
519 JSR FindLine
520 BCC InsertLine
521 DeleteLine LDY #$01
522 LDA (pCE),Y
523 STA $92
524 LDA $9C
525 STA $91
526 LDA $CF
527 STA $94
528 LDA $CE
529 DEY
530 SBC (pCE),Y
531 CLC
532 ADC $9C
533 STA $9C
534 STA $93
535 LDA $9D
536 ADC #$FF
537 STA $9D
538 SBC $CF
539 TAX
540 SEC
541 LDA $CE
542 SBC $9C
543 TAY
544 BCS bC50E
545 INX
546 DEC $94
547 bC50E CLC
548 ADC $91
549 BCC bC516
550 DEC $92
551 CLC
552 bC516 LDA (p91),Y
553 STA (p93),Y
554 INY
555 BNE bC516
556 INC $92
557 INC $94
558 DEX
559 BNE bC516
560 InsertLine JSR sC708
561 JSR SetLineLinkPtrs
562 LDA $35
563 BEQ bC4B7
564 CLC
565 LDA $9C
566 STA $C9
567 ADC $26
568 STA $C7
569 LDY $9D
570 STY $CA
571 BCC bC53E
572 INY
573 bC53E STY $C8
574 JSR VarAlloc
575 LDA $A0
576 LDY $A1
577 STA $9C
578 STY $9D
579 LDY $26
580 DEY
581 bC54E LDA f0031,Y
582 STA (pCE),Y
583 DEY
584 BPL bC54E
585 JSR sC708
586 JSR SetLineLinkPtrs
587 JMP bC4B7
588
589 SetLineLinkPtrs LDA $9A
590 LDY $9B
591 STA $91
592 STY $92
593 CLC
594 bC568 LDY #$01
595 LDA (p91),Y
596 BEQ bC58B
597 LDY #$04
598 bC570 INY
599 LDA (p91),Y
600 BNE bC570
601 INY
602 TYA
603 ADC $91
604 TAX
605 LDY #$00
606 STA (p91),Y
607 LDA $92
608 ADC #$00
609 INY
610 STA (p91),Y
611 STX $91
612 STA $92
613 BCC bC568
614 bC58B RTS
615
616 bC58C DEX
617 BPL bC594
618 bC58F JSR NewLine
619 GetLine LDX #$00
620 bC594 JSR ReadKey
621 CMP #$01
622 BNE bC5A8
623 LDY $0269
624 LDA (p12),Y
625 AND #$7F
626 CMP #$20
627 BCS bC5A8
628 LDA #$09
629 bC5A8 PHA
630 JSR sCCD9
631 PLA
632 CMP #$7F
633 BEQ bC58C
634 CMP #$0D
635 BEQ bC5E5
636 CMP #$03
637 BEQ bC5E1
638 CMP #$18
639 BEQ bC5C8
640 CMP #$20
641 BCC bC594
642 STA f35,X
643 INX
644 CPX #$4F
645 BCC bC5CF
646 bC5C8 LDA #$5C
647 JSR sCCD9
648 BNE bC58F
649 bC5CF CPX #$4C
650 BCC bC594
651 TXA
652 PHA
653 TYA
654 PHA
655 JSR PING
656 PLA
657 TAY
658 PLA
659 TAX
660 JMP bC594
661
662 bC5E1 INC $17
663 LDX #$00
664 bC5E5 JMP jCBEA
665
666 ReadKey JSR e023B
667 BPL ReadKey
668 CMP #$0F
669 BNE bC5F9
670 PHA
671 LDA $2E
672 EOR #$FF
673 STA $2E
674 PLA
675 bC5F9 RTS
676
677 TokeniseLine LDX $E9
678 LDY #$04
679 STY $2A
680 bC600 LDA f00,X
681 CMP #$20
682 BEQ bC647
683 STA $25
684 CMP #$22
685 BEQ bC66B
686 BIT $2A
687 BVS bC647
688 CMP #$3F
689 BNE bC618
690 LDA #$BA
691 BNE bC647
692 bC618 CMP #$30
693 BCC bC620
694 CMP #$3C
695 BCC bC647
696 bC620 STY $E0
697 LDY #$00
698 STY $26
699 LDA #<pC0E9
700 STA $18
701 LDA #>pC0E9
702 STA $19
703 STX $E9
704 DEX
705 bC631 INX
706 INC $18
707 BNE bC638
708 INC $19
709 bC638 LDA f00,X
710 SEC
711 SBC (p18),Y
712 BEQ bC631
713 CMP #$80
714 BNE bC672
715 ORA $26
716 bC645 LDY $E0
717 bC647 INX
718 INY
719 STA f0030,Y
720 LDA f0030,Y
721 BEQ bC68A
722 SEC
723 SBC #$3A
724 BEQ bC65A
725 CMP #$57
726 BNE bC65C
727 bC65A STA $2A
728 bC65C SEC
729 SBC #$63
730 BNE bC600
731 STA $25
732 bC663 LDA f00,X
733 BEQ bC647
734 CMP $25
735 BEQ bC647
736 bC66B INY
737 STA f0030,Y
738 INX
739 BNE bC663
740 bC672 LDX $E9
741 INC $26
742 bC676 LDA (p18),Y
743 PHP
744 INC $18
745 BNE bC67F
746 INC $19
747 bC67F PLP
748 BPL bC676
749 LDA (p18),Y
750 BNE bC638
751 LDA f00,X
752 BPL bC645
753 bC68A STA f0032,Y
754 LDA #$34
755 STA $E9
756 RTS
757
758 EDIT JSR Txt2Int
759 JSR FindLine
760 BCC bC6B0
761 ROR $02F2
762 JSR sC76C
763 aC6A2 =*+$02
764 LSR $02F2
765 JSR NewLine
766 LDA #$0B
767 JSR sCCD9
768 PLA
769 PLA
770 JMP bC4B7
771
772 bC6B0 JMP jCA23
773
774 FindLine LDA #$00
775 STA $1D
776 STA $1E
777 LDA $9A
778 LDX $9B
779 bC6BD LDY #$01
780 STA $CE
781 STX $CF
782 LDA (pCE),Y
783 BEQ bC6EC
784 INY
785 INY
786 INC $1D
787 BNE bC6CF
788 INC $1E
789 bC6CF LDA $34
790 CMP (pCE),Y
791 BCC bC6ED
792 BEQ bC6DA
793 DEY
794 BNE bC6E3
795 bC6DA LDA $33
796 DEY
797 CMP (pCE),Y
798 BCC bC6ED
799 BEQ bC6ED
800 bC6E3 DEY
801 LDA (pCE),Y
802 TAX
803 DEY
804 LDA (pCE),Y
805 BCS bC6BD
806 bC6EC CLC
807 bC6ED RTS
808
809 NEW BNE bC6ED
810 sC6F0 LDA #$00
811 LSR $02F4
812 TAY
813 STA (p9A),Y
814 INY
815 STA (p9A),Y
816 LDA $9A
817 CLC
818 ADC #$02
819 STA $9C
820 LDA $9B
821 ADC #$00
822 STA $9D
823 sC708 JSR sC73A
824 LDA #$00
825 CLEAR BNE bC739
826 sC70F LDA $A6
827 LDY $A7
828 STA $A2
829 STY $A3
830 LDA $9C
831 LDY $9D
832 STA $9E
833 STY $9F
834 STA $A0
835 STY $A1
836 JSR RESTORE
837 sC726 LDX #$88
838 STX $85
839 PLA
840 TAY
841 PLA
842 LDX #$FE
843 TXS
844 PHA
845 TYA
846 PHA
847 LDA #$00
848 STA $AD
849 STA $2B
850 bC739 RTS
851
852 sC73A CLC
853 LDA $9A
854 ADC #$FF
855 STA $E9
856 LDA $9B
857 ADC #$FF
858 STA $EA
859 RTS
860
861 LIST PHP
862 JSR Txt2Int
863 JSR FindLine
864 PLP
865 BEQ bC766
866 JSR $00E8
867 BEQ sC76C
868 CMP #$CD
869 BNE bC6ED
870 JSR $00E2
871 BEQ bC766
872 JSR Txt2Int
873 BEQ sC76C
874 RTS
875
876 bC766 LDA #$FF
877 STA $33
878 STA $34
879 sC76C LDY #$01
880 LDA (pCE),Y
881 BEQ bC7BF
882 JSR sC962
883 CMP #$20
884 BNE bC787
885 LSR $02DF
886 bC77C LDA $02DF
887 BPL bC77C
888 JSR sC962
889 LSR $02DF
890 bC787 INY
891 LDA (pCE),Y
892 TAX
893 INY
894 LDA (pCE),Y
895 CMP $34
896 BNE bC796
897 CPX $33
898 BEQ bC798
899 bC796 BCS bC7BF
900 bC798 STY $B8
901 PHA
902 JSR NewLine
903 PLA
904 JSR PrintInt
905 LDA #$20
906 bC7A4 LDY $B8
907 AND #$7F
908 bC7A8 JSR sCCD9
909 INY
910 BEQ bC7BF
911 LDA (pCE),Y
912 BNE bC7D0
913 TAY
914 LDA (pCE),Y
915 TAX
916 INY
917 LDA (pCE),Y
918 STX $CE
919 STA $CF
920 BNE sC76C
921 bC7BF BIT $02F2
922 BPL bC7C5
923 RTS
924
925 bC7C5 JSR NewLine
926 JSR SetScreen
927 PLA
928 PLA
929 JMP BackToBASIC
930
931 bC7D0 BPL bC7A8
932 SEC
933 SBC #$7F
934 TAX
935 STY $B8
936 LDY #$00
937 LDA #<pC0E9
938 STA $18
939 LDA #>pC0E9
940 STA $19
941 jC7E2 DEX
942 BEQ bC7F2
943 bC7E5 INC $18
944 BNE bC7EB
945 INC $19
946 bC7EB LDA (p18),Y
947 BPL bC7E5
948 JMP jC7E2
949
950 bC7F2 INY
951 LDA (p18),Y
952 BMI bC7A4
953 JSR sCCD9
954 JMP bC7F2
955
956 LLIST JSR SetPrinter
957 LSR $02F2
958 JSR $00E8
959 JMP LIST
960
961 LPRINT JSR SetPrinter
962 JSR $00E8
963 JSR PRINT
964 JSR SetScreen
965 RTS
966
967 SetPrinter BIT $02F1
968 BMI bC854
969 LDA $30
970 STA $0259
971 LDA $0258
972 STA $30
973 SEC
974 ROR $02F1
975 LDA $0256
976 JMP jC844
977
978 SetScreen BIT $02F1
979 BPL bC854
980 LDA $30
981 STA $0258
982 LDA $0259
983 STA $30
984 sC83E LSR $02F1
985 LDA $0257
986 jC844 STA $31
987 bC846 SEC
988 SBC #$08
989 BCS bC846
990 EOR #$FF
991 SBC #$06
992 CLC
993 ADC $31
994 STA $32
995 bC854 RTS
996
997 FOR LDA #$80
998 STA $2B
999 JSR LET
1000 JSR FindForVar
1001 BNE bC866
1002 TXA
1003 ADC #$0F
1004 TAX
1005 TXS
1006 bC866 PLA
1007 PLA
1008 LDA #$09
1009 JSR sC437
1010 JSR FindEndOfStatement
1011 CLC
1012 TYA
1013 ADC $E9
1014 PHA
1015 LDA $EA
1016 ADC #$00
1017 PHA
1018 LDA $A9
1019 PHA
1020 LDA $A8
1021 PHA
1022 LDA #$C3
1023 JSR sD067
1024 JSR sCF06
1025 JSR GetExpr
1026 LDA $D5
1027 ORA #$7F
1028 AND $D1
1029 STA $D1
1030 LDA #<pC89E
1031 LDY #>pC89E
1032 STA $91
1033 STY $92
1034 JMP jCFC0
1035
1036 pC89E LDA #$81
1037 LDY #$DC
1038 JSR sDE7B
1039 JSR $00E8
1040 CMP #$CB
1041 BNE bC8B2
1042 JSR $00E2
1043 JSR GetExpr
1044 bC8B2 JSR GetSign
1045 JSR sCFB1
1046 LDA $B9
1047 PHA
1048 LDA $B8
1049 PHA
1050 LDA #$8D
1051 PHA
1052 DoNextLine JSR sC962
1053 LDA $E9
1054 LDY $EA
1055 BEQ bC8D0
1056 STA $AC
1057 STY $AD
1058 LDY #$00
1059 bC8D0 LDA (pE9),Y
1060 BNE bC92F
1061 LSR $0252
1062 LDY #$02
1063 LDA (pE9),Y
1064 CLC
1065 BNE bC8E1
1066 JMP jC98A
1067
1068 bC8E1 INY
1069 LDA (pE9),Y
1070 STA $A8
1071 INY
1072 LDA (pE9),Y
1073 STA $A9
1074 TYA
1075 ADC $E9
1076 STA $E9
1077 BCC bC8F4
1078 INC $EA
1079 bC8F4 BIT $02F4
1080 BPL jC90C
1081 PHA
1082 LDA #$5B
1083 JSR sCCFB
1084 LDA $A9
1085 LDX $A8
1086 JSR PrintInt
1087 LDA #$5D
1088 JSR sCCFB
1089 PLA
1090 jC90C JSR $00E2
1091 JSR DoStatement
1092 JMP DoNextLine
1093
1094 DoStatement BEQ bC960
1095 jC917 SBC #$80
1096 BCC bC92C
1097 CMP #$42
1098 BCS bC94F
1099 ASL
1100 TAY
1101 LDA fC007,Y
1102 PHA
1103 LDA JumpTab,Y
1104 PHA
1105 JMP $00E2
1106
1107 bC92C JMP LET
1108
1109 bC92F CMP #$3A
1110 BEQ bC8F4
1111 CMP #$C8
1112 BNE bC945
1113 BIT $0252
1114 BPL bC94F
1115 JSR sCAB1
1116 LSR $0252
1117 JMP DoNextLine
1118
1119 bC945 CMP #$27
1120 BNE bC94F
1121 JSR REM
1122 JMP DoNextLine
1123
1124 bC94F JMP jD070
1125
1126 RESTORE SEC
1127 LDA $9A
1128 SBC #$01
1129 LDY $9B
1130 BCS bC95C
1131 DEY
1132 bC95C STA $B0
1133 STY $B1
1134 bC960 RTS
1135
1136 bC961 RTS
1137
1138 sC962 LDA $02DF
1139 BPL bC960
1140 AND #$7F
1141 LDX #$08
1142 CMP #$03
1143 BNE bC961
1144 CMP #$03
1145 BCS bC974
1146 CLC
1147 bC974 BNE bC9B9
1148 LDA $E9
1149 LDY $EA
1150 BEQ bC988
1151 STA $AC
1152 STY $AD
1153 jC980 LDA $A8
1154 LDY $A9
1155 STA $AA
1156 STY $AB
1157 bC988 PLA
1158 PLA
1159 jC98A LDA #$BD
1160 LDY #$C3
1161 LDX #$00
1162 STX $02F1
1163 STX $02DF
1164 STX $2E
1165 BCC bC99D
1166 JMP jC49D
1167
1168 bC99D JMP BackToBASIC
1169
1170 CONT BNE bC9B9
1171 LDX #$D7
1172 LDY $AD
1173 BNE bC9AB
1174 JMP jC47E
1175
1176 bC9AB LDA $AC
1177 STA $E9
1178 STY $EA
1179 LDA $AA
1180 LDY $AB
1181 STA $A8
1182 STY $A9
1183 bC9B9 RTS
1184
1185 JMP jD336
1186
1187 RUN BNE bC9C2
1188 JMP sC708
1189
1190 bC9C2 JSR sC70F
1191 JMP jC9DC
1192
1193 GOSUB LDA #$03
1194 JSR sC437
1195 LDA $EA
1196 PHA
1197 LDA $E9
1198 PHA
1199 LDA $A9
1200 PHA
1201 LDA $A8
1202 PHA
1203 LDA #$9B
1204 PHA
1205 jC9DC JSR $00E8
1206 JSR GOTO
1207 JMP DoNextLine
1208
1209 GOTO JSR sE853
1210 JSR FindEOL
1211 LDA $A9
1212 CMP $34
1213 BCS bC9FC
1214 TYA
1215 SEC
1216 ADC $E9
1217 LDX $EA
1218 BCC bCA00
1219 INX
1220 BCS bCA00
1221 bC9FC LDA $9A
1222 LDX $9B
1223 bCA00 JSR bC6BD
1224 BCC jCA23
1225 LDA $CE
1226 SBC #$01
1227 STA $E9
1228 LDA $CF
1229 SBC #$00
1230 STA $EA
1231 bCA11 RTS
1232
1233 RETURN BNE bCA11
1234 LDA #$FF
1235 STA $B9
1236 JSR FindForVar
1237 TXS
1238 CMP #$9B
1239 BEQ bCA2B
1240 LDX #$16
1241 jCA23 =*+$01
1242 BIT $5AA2
1243 JMP jC47E
1244
1245 JMP jD070
1246
1247 bCA2B PLA
1248 PLA
1249 CPY #$0C
1250 BEQ bCA4A
1251 STA $A8
1252 PLA
1253 STA $A9
1254 PLA
1255 STA $E9
1256 PLA
1257 STA $EA
1258 sCA3C JSR FindEndOfStatement
1259 bCA3F TYA
1260 CLC
1261 ADC $E9
1262 STA $E9
1263 BCC bCA49
1264 INC $EA
1265 bCA49 RTS
1266
1267 bCA4A PLA
1268 PLA
1269 PLA
1270 RTS
1271
1272 FindEndOfStatement LDX #$3A
1273 FindEOL =*+$01
1274 BIT !$00A2 ; Force absolute mode
1275 STX $24
1276 LDY #$00
1277 STY $25
1278 bCA59 LDA $25
1279 LDX $24
1280 STA $24
1281 STX $25
1282 bCA61 LDA (pE9),Y
1283 BEQ bCA49
1284 CMP $25
1285 BEQ bCA49
1286 INY
1287 CMP #$22
1288 BNE bCA61
1289 BEQ bCA59
1290 IF JSR EvalExpr
1291 JSR $00E8
1292 CMP #$97
1293 BEQ bCA7F
1294 LDA #$C9
1295 JSR sD067
1296 bCA7F LDA $D0
1297 BNE bCA88
1298 JSR sCA9E
1299 BEQ bCA3F
1300 bCA88 JSR $00E8
1301 BCS bCA90
1302 JMP GOTO
1303
1304 bCA90 PHP
1305 SEC
1306 ROR $0252
1307 PLP
1308 JMP DoStatement
1309
1310 REM JSR FindEOL
1311 BEQ bCA3F
1312 sCA9E LDY #$00
1313 bCAA0 LDA (pE9),Y
1314 BEQ bCAB0
1315 INY
1316 CMP #$C9
1317 BEQ REM
1318 CMP #$C8
1319 BNE bCAA0
1320 JMP bCA3F
1321
1322 bCAB0 RTS
1323
1324 sCAB1 LDY #$FF
1325 bCAB3 INY
1326 LDA (pE9),Y
1327 BEQ bCABC
1328 CMP #$3A
1329 BNE bCAB3
1330 bCABC JMP bCA3F
1331
1332 bCABF JMP jD070
1333
1334 ON JSR sD8C8
1335 PHA
1336 CMP #$9B
1337 BEQ bCACE
1338 bCACA CMP #$97
1339 BNE bCABF
1340 bCACE DEC $D4
1341 BNE bCAD6
1342 PLA
1343 JMP jC917
1344
1345 bCAD6 JSR $00E2
1346 JSR Txt2Int
1347 CMP #$2C
1348 BEQ bCACE
1349 PLA
1350 bCAE1 RTS
1351
1352 Txt2Int LDX #$00
1353 STX $33
1354 STX $34
1355 jCAE8 BCS bCAE1
1356 SBC #$2F
1357 STA $24
1358 LDA $34
1359 STA $91
1360 CMP #$19
1361 BCS bCACA
1362 LDA $33
1363 ASL
1364 ROL $91
1365 ASL
1366 ROL $91
1367 ADC $33
1368 STA $33
1369 LDA $91
1370 ADC $34
1371 STA $34
1372 ASL $33
1373 ROL $34
1374 LDA $33
1375 ADC $24
1376 STA $33
1377 BCC bCB16
1378 INC $34
1379 bCB16 JSR $00E2
1380 JMP jCAE8
1381
1382 LET JSR GetVarFromText
1383 STA $B8
1384 STY $B9
1385 LDA #$D4
1386 JSR sD067
1387 LDA $29
1388 PHA
1389 LDA $28
1390 PHA
1391 JSR EvalExpr
1392 PLA
1393 ROL
1394 JSR sCF09
1395 BNE bCB50
1396 PLA
1397 sCB39 BPL bCB4D
1398 JSR RoundFPA
1399 JSR sD2A9
1400 LDY #$00
1401 LDA $D3
1402 STA (pB8),Y
1403 INY
1404 LDA $D4
1405 STA (pB8),Y
1406 RTS
1407
1408 bCB4D JMP jDEA9
1409
1410 bCB50 PLA
1411 sCB51 LDY #$02
1412 LDA (pD3),Y
1413 CMP $A3
1414 BCC bCB70
1415 BNE bCB62
1416 DEY
1417 LDA (pD3),Y
1418 CMP $A2
1419 BCC bCB70
1420 bCB62 LDY $D4
1421 CPY $9D
1422 BCC bCB70
1423 BNE bCB77
1424 LDA $D3
1425 CMP $9C
1426 BCS bCB77
1427 bCB70 LDA $D3
1428 LDY $D4
1429 JMP jCB8D
1430
1431 bCB77 LDY #$00
1432 LDA (pD3),Y
1433 JSR SetupString
1434 LDA $BF
1435 LDY $C0
1436 STA $DE
1437 STY $DF
1438 JSR sD7A4
1439 LDA #<pD0
1440 LDY #>pD0
1441 jCB8D STA $BF
1442 STY $C0
1443 JSR sD805
1444 LDY #$00
1445 LDA (pBF),Y
1446 STA (pB8),Y
1447 INY
1448 LDA (pBF),Y
1449 STA (pB8),Y
1450 INY
1451 LDA (pBF),Y
1452 STA (pB8),Y
1453 RTS
1454
1455 bCBA5 JSR sCCB3
1456 bCBA8 JSR $00E8
1457 PRINT BEQ NewLine
1458 jCBAD BEQ bCC0B
1459 CMP #$C2
1460 BEQ bCC2E
1461 CMP #$C5
1462 CLC
1463 BEQ bCC2E
1464 CMP #$2C
1465 BEQ bCC0C
1466 CMP #$3B
1467 BEQ bCC2B
1468 CMP #$C6
1469 BNE bCBC7
1470 JMP SetCursor
1471
1472 bCBC7 JSR EvalExpr
1473 BIT $28
1474 BMI bCBA5
1475 JSR sE0D5
1476 JSR GetString
1477 LDY #$00
1478 LDA (pD3),Y
1479 CLC
1480 ADC $30
1481 CMP $31
1482 BCC bCBE2
1483 JSR NewLine
1484 bCBE2 JSR sCCB3
1485 JSR sCCD4
1486 BNE bCBA8
1487 jCBEA LDY #$00
1488 STY f35,X
1489 LDX #$34
1490 NewLine LDA $30
1491 PHA
1492 LDA #$0D
1493 JSR sCCD9
1494 PLA
1495 BIT $02F1
1496 BMI bCC02
1497 CMP $31
1498 BEQ bCC0B
1499 bCC02 LDA #$00
1500 STA $30
1501 LDA #$0A
1502 JSR sCCD9
1503 bCC0B RTS
1504
1505 bCC0C LDA $30
1506 BIT $02F1
1507 BMI bCC17
1508 SEC
1509 SBC $0253
1510 bCC17 SEC
1511 bCC18 SBC #$08
1512 BCS bCC18
1513 EOR #$FF
1514 ADC #$01
1515 TAX
1516 CLC
1517 ADC $30
1518 CMP $31
1519 BCC bCC47
1520 JSR NewLine
1521 bCC2B JMP jCC4B
1522
1523 bCC2E PHP
1524 JSR GetByteExpr
1525 CMP #$29
1526 BNE bCC56
1527 PLP
1528 BCC bCC47
1529 TXA
1530 CMP $31
1531 BCC bCC41
1532 JMP jD336
1533
1534 bCC41 SEC
1535 SBC $30
1536 BCC jCC4B
1537 TAX
1538 bCC47 INX
1539 bCC48 DEX
1540 BNE bCC51
1541 jCC4B JSR $00E2
1542 JMP jCBAD
1543
1544 bCC51 JSR sCCD4
1545 BNE bCC48
1546 bCC56 JMP jD070
1547
1548 SetCursor BIT $02F1
1549 BMI bCC56
1550 LDX $021F
1551 BEQ bCC66
1552 JMP jEAF7
1553
1554 bCC66 JSR GetByteExpr
1555 CPX #$28
1556 BCS bCCAD
1557 STX $0C
1558 JSR sD065
1559 JSR sD8C8
1560 INX
1561 CPX #$1C
1562 BCS bCCAD
1563 LDA $026A
1564 PHA
1565 AND #$FE
1566 STA $026A
1567 LDA #$00
1568 JSR sF801
1569 LDA $0C
1570 STA $0269
1571 TXA
1572 STA $0268
1573 JSR RowCalc
1574 LDA $1F
1575 LDY $20
1576 STA $12
1577 STY $13
1578 PLA
1579 STA $026A
1580 LDA #$01
1581 JSR sF801
1582 LDA #$3B
1583 JSR sD067
1584 JMP jCBAD
1585
1586 bCCAD JMP jD8C2
1587
1588 PrintString JSR GetString
1589 sCCB3 JSR sD7D0
1590 TAX
1591 LDY #$00
1592 INX
1593 bCCBA DEX
1594 BEQ bCCCD
1595 LDA (p91),Y
1596 JSR sCCD9
1597 INY
1598 CMP #$0D
1599 BNE bCCBA
1600 JSR bCC0B
1601 JMP bCCBA
1602
1603 bCCCD RTS
1604
1605 ClrScr LDA #$0C
1606 BIT $11A9
1607 sCCD4 =*+$01
1608 BIT $20A9
1609 sCCD7 =*+$01
1610 BIT $3FA9
1611 sCCD9 BIT $2E
1612 BMI bCD10
1613 PHA
1614 CMP #$20
1615 BCC bCCED
1616 LDA $30
1617 CMP $31
1618 BNE bCCEB
1619 JSR NewLine
1620 bCCEB INC $30
1621 bCCED PLA
1622 BIT $02F1
1623 BPL sCCFB
1624 PHA
1625 JSR e023E
1626 PLA
1627 AND #$FF
1628 RTS
1629
1630 sCCFB STX $27
1631 TAX
1632 JSR Char2Scr
1633 CMP #$20
1634 BCC bCD09
1635 CMP #$7F
1636 BNE bCD0E
1637 bCD09 LDX $0269
1638 STX $30
1639 bCD0E LDX $27
1640 bCD10 AND #$FF
1641 RTS
1642
1643 JMP (p02F5)
1644
1645 TRON LDA #$80
1646 BIT !$00A9
1647 STA $02F4
1648 RTS
1649
1650 jCD1F LDA $2C
1651 BEQ bCD36
1652 BMI bCD29
1653 LDY #$FF
1654 BNE bCD2D
1655 bCD29 LDA $AE
1656 LDY $AF
1657 bCD2D STA $A8
1658 STY $A9
1659 LDX #$A8
1660 JMP jC47E
1661
1662 bCD36 LDA #$85
1663 LDY #$CE
1664 JSR PrintString
1665 LDA $AC
1666 LDY $AD
1667 STA $E9
1668 STY $EA
1669 RTS
1670
1671 GET JSR sD4D2
1672 LDX #$36
1673 LDY #$00
1674 STY $36
1675 LDA #$40
1676 JSR sCD8F
1677 RTS
1678
1679 INPUT LSR $2E
1680 CMP #$22
1681 BNE bCD66
1682 JSR sD025
1683 LDA #$3B
1684 JSR sD067
1685 JSR sCCB3
1686 bCD66 JSR sD4D2
1687 LDA #$2C
1688 STA $34
1689 bCD6D LDA #$00
1690 STA $17
1691 JSR sCD80
1692 LDA $35
1693 BNE bCD8E
1694 LDA $17
1695 BEQ bCD6D
1696 CLC
1697 JMP jC980
1698
1699 sCD80 JSR sCCD7
1700 JSR sCCD4
1701 JMP GetLine
1702
1703 READ LDX $B0
1704 LDY $B1
1705 bCD8E =*+$01
1706 LDA #$98
1707 sCD8F STA $2C
1708 STX $B2
1709 STY $B3
1710 jCD95 JSR GetVarFromText
1711 STA $B8
1712 STY $B9
1713 LDA $E9
1714 LDY $EA
1715 STA $BA
1716 STY $BB
1717 LDX $B2
1718 LDY $B3
1719 STX $E9
1720 STY $EA
1721 JSR $00E8
1722 BNE bCDCE
1723 BIT $2C
1724 BVC bCDC2
1725 bCDB5 JSR CheckKbd
1726 BPL bCDB5
1727 STA $35
1728 LDX #$34
1729 LDY #$00
1730 BEQ bCDCA
1731 bCDC2 BMI bCE35
1732 JSR sCCD7
1733 JSR sCD80
1734 bCDCA STX $E9
1735 STY $EA
1736 bCDCE JSR $00E2
1737 BIT $28
1738 BPL bCE06
1739 BIT $2C
1740 BVC bCDE2
1741 INX
1742 STX $E9
1743 LDA #$00
1744 STA $24
1745 BEQ bCDEE
1746 bCDE2 STA $24
1747 CMP #$22
1748 BEQ bCDEF
1749 LDA #$3A
1750 STA $24
1751 LDA #$2C
1752 bCDEE CLC
1753 bCDEF STA $25
1754 LDA $E9
1755 LDY $EA
1756 ADC #$00
1757 BCC bCDFA
1758 INY
1759 bCDFA JSR sD5BB
1760 JSR sD90D
1761 JSR sCB51
1762 JMP jCE0E
1763
1764 bCE06 JSR GetNumber
1765 LDA $29
1766 JSR sCB39
1767 jCE0E JSR $00E8
1768 BEQ bCE1A
1769 CMP #$2C
1770 BEQ bCE1A
1771 JMP jCD1F
1772
1773 bCE1A LDA $E9
1774 LDY $EA
1775 STA $B2
1776 STY $B3
1777 LDA $BA
1778 LDY $BB
1779 STA $E9
1780 STY $EA
1781 JSR $00E8
1782 BEQ bCE5B
1783 JSR sD065
1784 JMP jCD95
1785
1786 bCE35 JSR FindEndOfStatement
1787 INY
1788 TAX
1789 BNE bCE4E
1790 LDX #$2A
1791 INY
1792 LDA (pE9),Y
1793 BEQ bCEAC
1794 INY
1795 LDA (pE9),Y
1796 STA $AE
1797 INY
1798 LDA (pE9),Y
1799 INY
1800 STA $AF
1801 bCE4E LDA (pE9),Y
1802 TAX
1803 JSR bCA3F
1804 CPX #$91
1805 BNE bCE35
1806 JMP bCDCE
1807
1808 bCE5B LDA $B2
1809 LDY $B3
1810 LDX $2C
1811 BPL bCE66
1812 JMP bC95C
1813
1814 bCE66 LDY #$00
1815 LDA (pB2),Y
1816 BEQ bCE73
1817 LDA #$74
1818 LDY #$CE
1819 JMP PrintString
1820
1821 bCE73 RTS
1822
1823 .BYTE $3F,$45,$58,$54,$52,$41,$20,$49
1824 .BYTE $47,$4E,$4F,$52,$45,$44,$0D,$0A
1825 .BYTE $00,$3F,$52,$45,$44,$4F,$20,$46
1826 .BYTE $52,$4F,$4D,$20,$53,$54,$41,$52
1827 .BYTE $54,$0D,$0A,$00
1828 NEXT BNE bCE9E
1829 LDY #$00
1830 BEQ bCEA1
1831 bCE9E JSR GetVarFromText
1832 bCEA1 STA $B8
1833 STY $B9
1834 JSR FindForVar
1835 BEQ bCEAE
1836 LDX #$00
1837 bCEAC BEQ bCF14
1838 bCEAE TXS
1839 TXA
1840 CLC
1841 ADC #$04
1842 PHA
1843 ADC #$06
1844 STA $93
1845 PLA
1846 LDY #$01
1847 JSR sDE7B
1848 TSX
1849 LDA f0109,X
1850 STA $D5
1851 LDA $B8
1852 LDY $B9
1853 JSR sDB22
1854 JSR jDEA9
1855 LDY #$01
1856 JSR sDF4E
1857 TSX
1858 SEC
1859 SBC f0109,X
1860 BEQ bCEF1
1861 LDA f010F,X
1862 STA $A8
1863 LDA f0110,X
1864 STA $A9
1865 LDA f0112,X
1866 STA $E9
1867 LDA f0111,X
1868 STA $EA
1869 bCEEE JMP DoNextLine
1870
1871 bCEF1 TXA
1872 ADC #$11
1873 TAX
1874 TXS
1875 JSR $00E8
1876 CMP #$2C
1877 BNE bCEEE
1878 JSR $00E2
1879 JSR bCE9E
1880 GetExpr JSR EvalExpr
1881 sCF06 CLC
1882 sCF08 =*+$01
1883 BIT $38
1884 sCF09 BIT $28
1885 BMI bCF10
1886 BCS bCF12
1887 bCF0F RTS
1888
1889 bCF10 BCS bCF0F
1890 bCF12 LDX #$A8
1891 bCF14 JMP jC47E
1892
1893 EvalExpr LDX $E9
1894 BNE bCF1D
1895 DEC $EA
1896 bCF1D DEC $E9
1897 LDX #$00
1898 jCF22 =*+$01
1899 BIT $48
1900 TXA
1901 PHA
1902 LDA #$01
1903 JSR sC437
1904 JSR GetItem
1905 LDA #$00
1906 STA $BC
1907 jCF31 JSR $00E8
1908 jCF34 SEC
1909 SBC #$D3
1910 BCC bCF50
1911 CMP #$03
1912 BCS bCF50
1913 CMP #$01
1914 ROL
1915 EOR #$01
1916 EOR $BC
1917 CMP $BC
1918 BCC bCFA9
1919 STA $BC
1920 JSR $00E2
1921 JMP jCF34
1922
1923 bCF50 LDX $BC
1924 BNE bCF80
1925 BCS bCFD5
1926 ADC #$07
1927 BCC bCFD5
1928 ADC $28
1929 BNE bCF61
1930 JMP StrCat
1931
1932 bCF61 ADC #$FF
1933 STA $91
1934 ASL
1935 ADC $91
1936 TAY
1937 bCF69 PLA
1938 CMP fC0CC,Y
1939 BCS bCFDA
1940 JSR sCF06
1941 bCF72 PHA
1942 jCF73 JSR sCF99
1943 PLA
1944 LDY $BA
1945 BPL bCF92
1946 TAX
1947 BEQ bCFD8
1948 BNE bCFE3
1949 bCF80 LSR $28
1950 TXA
1951 ROL
1952 LDX $E9
1953 BNE bCF8A
1954 DEC $EA
1955 bCF8A DEC $E9
1956 LDY #$1B
1957 STA $BC
1958 BNE bCF69
1959 bCF92 CMP fC0CC,Y
1960 BCS bCFE3
1961 BCC bCF72
1962 sCF99 LDA fC0CE,Y
1963 PHA
1964 LDA fC0CD,Y
1965 PHA
1966 JSR DoOper
1967 LDA $BC
1968 JMP jCF22
1969
1970 bCFA9 JMP jD070
1971
1972 DoOper LDA $D5
1973 LDX fC0CC,Y
1974 sCFB1 TAY
1975 PLA
1976 STA $91
1977 PLA
1978 STA $92
1979 INC $91
1980 BNE bCFBE
1981 INC $92
1982 bCFBE TYA
1983 PHA
1984 jCFC0 JSR RoundFPA
1985 LDA $D4
1986 PHA
1987 LDA $D3
1988 PHA
1989 LDA $D2
1990 PHA
1991 LDA $D1
1992 PHA
1993 LDA $D0
1994 PHA
1995 JMP (p0091)
1996
1997 bCFD5 LDY #$FF
1998 PLA
1999 bCFD8 BEQ bCFFD
2000 bCFDA CMP #$64
2001 BEQ bCFE1
2002 JSR sCF06
2003 bCFE1 STY $BA
2004 bCFE3 PLA
2005 LSR
2006 STA $2D
2007 PLA
2008 STA $D8
2009 PLA
2010 STA $D9
2011 PLA
2012 STA $DA
2013 PLA
2014 STA $DB
2015 PLA
2016 STA $DC
2017 PLA
2018 STA $DD
2019 EOR $D5
2020 STA $DE
2021 bCFFD LDA $D0
2022 RTS
2023
2024 GetItem LDA #$00
2025 STA $28
2026 bD004 JSR $00E2
2027 BCS bD00C
2028 bD009 JMP GetNumber
2029
2030 bD00C JSR sD216
2031 BCS GetVarVal
2032 CMP #$2E
2033 BEQ bD009
2034 CMP #$23
2035 BEQ bD009
2036 CMP #$CD
2037 BEQ bD075
2038 CMP #$CC
2039 BEQ bD004
2040 CMP #$22
2041 BNE bD034
2042 sD025 LDA $E9
2043 LDY $EA
2044 ADC #$00
2045 BCC bD02E
2046 INY
2047 bD02E JSR GetString
2048 JMP sD90D
2049
2050 bD034 CMP #$CA
2051 BNE bD04B
2052 LDY #$18
2053 BNE bD077
2054 NOT JSR sD2A9
2055 LDA $D4
2056 EOR #$FF
2057 TAY
2058 LDA $D3
2059 EOR #$FF
2060 JMP jD499
2061
2062 bD04B CMP #$C4
2063 BNE bD052
2064 JMP jD522
2065
2066 bD052 CMP #$D6
2067 BCC EvalBracket
2068 JMP jD0A0
2069
2070 EvalBracket JSR sD062
2071 JSR EvalExpr
2072 sD05F LDA #$29
2073 sD062 =*+$01
2074 BIT $28A9
2075 sD065 =*+$01
2076 BIT $2CA9
2077 sD067 LDY #$00
2078 CMP (pE9),Y
2079 BNE jD070
2080 JMP $00E2
2081
2082 jD070 LDX #$10
2083 JMP jC47E
2084
2085 bD075 LDY #$15
2086 bD077 PLA
2087 PLA
2088 JMP jCF73
2089
2090 GetVarVal JSR GetVarFromText
2091 STA $D3
2092 STY $D4
2093 LDX $28
2094 BEQ bD08C
2095 LDX #$00
2096 STX $DF
2097 RTS
2098
2099 bD08C LDX $29
2100 BPL bD09D
2101 LDY #$00
2102 LDA (pD3),Y
2103 TAX
2104 INY
2105 LDA (pD3),Y
2106 TAY
2107 TXA
2108 JMP jD499
2109
2110 bD09D JMP sDE7B
2111
2112 jD0A0 ASL
2113 PHA
2114 TAX
2115 JSR $00E2
2116 CPX #$DB
2117 BCC bD0CE
2118 CPX #$E7
2119 BCC bD0D1
2120 JSR sD062
2121 JSR EvalExpr
2122 JSR sD065
2123 JSR sCF08
2124 PLA
2125 TAX
2126 LDA $D4
2127 PHA
2128 LDA $D3
2129 PHA
2130 TXA
2131 PHA
2132 JSR sD8C8
2133 PLA
2134 TAY
2135 TXA
2136 PHA
2137 JMP jD0D3
2138
2139 bD0CE JSR EvalBracket
2140 bD0D1 PLA
2141 TAY
2142 jD0D3 LDA fBFDE,Y
2143 STA $C4
2144 LDA fBFDF,Y
2145 STA $C5
2146 JSR $00C3
2147 JMP sCF06
2148
2149 LDY #$FF
2150 BIT !$00A0
2151 STY $26
2152 JSR sD2A9
2153 LDA $D3
2154 EOR $26
2155 STA $24
2156 LDA $D4
2157 EOR $26
2158 STA $25
2159 JSR sDED5
2160 JSR sD2A9
2161 LDA $D4
2162 EOR $26
2163 AND $25
2164 EOR $26
2165 TAY
2166 LDA $D3
2167 EOR $26
2168 AND $24
2169 EOR $26
2170 JMP jD499
2171
2172 Compare JSR sCF09
2173 BCS bD12B
2174 LDA $DD
2175 ORA #$7F
2176 AND $D9
2177 STA $D9
2178 LDA #$D8
2179 LDY #$00
2180 JSR CompareFPA
2181 TAX
2182 JMP jD15E
2183
2184 bD12B LDA #$00
2185 STA $28
2186 DEC $BC
2187 JSR sD7D0
2188 STA $D0
2189 STX $D1
2190 STY $D2
2191 LDA $DB
2192 LDY $DC
2193 JSR sD7D4
2194 STX $DB
2195 STY $DC
2196 TAX
2197 SEC
2198 SBC $D0
2199 BEQ bD153
2200 LDA #$01
2201 BCC bD153
2202 LDX $D0
2203 LDA #$FF
2204 bD153 STA $D5
2205 LDY #$FF
2206 INX
2207 bD158 INY
2208 DEX
2209 BNE bD163
2210 LDX $D5
2211 jD15E BMI bD16F
2212 CLC
2213 BCC bD16F
2214 bD163 LDA (pDB),Y
2215 CMP (pD1),Y
2216 BEQ bD158
2217 LDX #$FF
2218 BCS bD16F
2219 LDX #$01
2220 bD16F INX
2221 TXA
2222 ROL
2223 AND $2D
2224 BEQ bD178
2225 LDA #$FF
2226 bD178 JMP jDF24
2227
2228 bD17B JSR sD065
2229 DIM TAX
2230 JSR sD18D
2231 JSR $00E8
2232 BNE bD17B
2233 RTS
2234
2235 GetVarFromText LDX #$00
2236 JSR $00E8
2237 sD18D STX $27
2238 sD18F STA $B4
2239 JSR $00E8
2240 JSR sD216
2241 BCS bD19C
2242 bD199 JMP jD070
2243
2244 bD19C LDX #$00
2245 STX $28
2246 STX $29
2247 JSR $00E2
2248 BCC bD1AC
2249 JSR sD216
2250 BCC bD1B7
2251 bD1AC TAX
2252 bD1AD JSR $00E2
2253 BCC bD1AD
2254 JSR sD216
2255 BCS bD1AD
2256 bD1B7 CMP #$24
2257 BNE bD1C1
2258 LDA #$FF
2259 STA $28
2260 BNE bD1D1
2261 bD1C1 CMP #$25
2262 BNE bD1D8
2263 LDA $2B
2264 BMI bD199
2265 LDA #$80
2266 STA $29
2267 ORA $B4
2268 STA $B4
2269 bD1D1 TXA
2270 ORA #$80
2271 TAX
2272 JSR $00E2
2273 bD1D8 STX $B5
2274 SEC
2275 ORA $2B
2276 SBC #$28
2277 BNE bD1E4
2278 bD1E1 JMP jD2BB
2279
2280 bD1E4 BIT $2B
2281 BVS bD1E1
2282 LDA #$00
2283 STA $2B
2284 LDA $9C
2285 LDX $9D
2286 LDY #$00
2287 bD1F2 STX $CF
2288 bD1F4 STA $CE
2289 CPX $9F
2290 BNE bD1FE
2291 CMP $9E
2292 BEQ bD222
2293 bD1FE LDA $B4
2294 CMP (pCE),Y
2295 BNE bD20C
2296 LDA $B5
2297 INY
2298 CMP (pCE),Y
2299 BEQ bD277
2300 DEY
2301 bD20C CLC
2302 LDA $CE
2303 ADC #$07
2304 BCC bD1F4
2305 INX
2306 BNE bD1F2
2307 sD216 CMP #$41
2308 BCC bD221
2309 SBC #$5B
2310 SEC
2311 SBC #$A5
2312 BCS bD221
2313 bD221 RTS
2314
2315 bD222 PLA
2316 PHA
2317 CMP #$7E
2318 BNE bD235
2319 TSX
2320 LDA f0102,X
2321 CMP #$D0
2322 BNE bD235
2323 LDA #$07
2324 LDY #$E2
2325 RTS
2326
2327 bD235 LDA $9E
2328 LDY $9F
2329 STA $CE
2330 STY $CF
2331 LDA $A0
2332 LDY $A1
2333 STA $C9
2334 STY $CA
2335 CLC
2336 ADC #$07
2337 BCC bD24B
2338 INY
2339 bD24B STA $C7
2340 STY $C8
2341 JSR VarAlloc
2342 LDA $C7
2343 LDY $C8
2344 INY
2345 STA $9E
2346 STY $9F
2347 LDY #$00
2348 LDA $B4
2349 STA (pCE),Y
2350 INY
2351 LDA $B5
2352 STA (pCE),Y
2353 LDA #$00
2354 INY
2355 STA (pCE),Y
2356 INY
2357 STA (pCE),Y
2358 INY
2359 STA (pCE),Y
2360 INY
2361 STA (pCE),Y
2362 INY
2363 STA (pCE),Y
2364 bD277 LDA $CE
2365 CLC
2366 ADC #$02
2367 LDY $CF
2368 BCC bD281
2369 INY
2370 bD281 STA $B6
2371 STY $B7
2372 RTS
2373
2374 sD286 LDA $26
2375 sD288 ASL
2376 ADC #$05
2377 ADC $CE
2378 LDY $CF
2379 BCC bD292
2380 INY
2381 bD292 STA $C7
2382 STY $C8
2383 RTS
2384
2385 .BYTE $90,$80,$00,$00,$00
2386 sD29C JSR $00E2
2387 JSR EvalExpr
2388 sD2A2 JSR sCF06
2389 LDA $D5
2390 BMI bD2B6
2391 sD2A9 LDA $D0
2392 CMP #$90
2393 BCC bD2B8
2394 LDA #$97
2395 LDY #$D2
2396 JSR CompareFPA
2397 bD2B6 BNE jD336
2398 bD2B8 JMP FPA2Int
2399
2400 jD2BB LDA $2B
2401 BNE bD306
2402 LDA $27
2403 ORA $29
2404 PHA
2405 LDA $28
2406 PHA
2407 LDY #$00
2408 bD2C9 TYA
2409 PHA
2410 LDA $B5
2411 PHA
2412 LDA $B4
2413 PHA
2414 JSR sD29C
2415 PLA
2416 STA $B4
2417 PLA
2418 STA $B5
2419 PLA
2420 TAY
2421 TSX
2422 LDA f0102,X
2423 PHA
2424 LDA f0101,X
2425 PHA
2426 LDA $D3
2427 STA f0102,X
2428 LDA $D4
2429 STA f0101,X
2430 INY
2431 JSR $00E8
2432 CMP #$2C
2433 BEQ bD2C9
2434 STY $26
2435 JSR sD05F
2436 PLA
2437 STA $28
2438 PLA
2439 STA $29
2440 AND #$7F
2441 STA $27
2442 bD306 LDX $9E
2443 LDA $9F
2444 bD30A STX $CE
2445 STA $CF
2446 CMP $A1
2447 BNE bD316
2448 CPX $A0
2449 BEQ bD355
2450 bD316 LDY #$00
2451 LDA (pCE),Y
2452 INY
2453 CMP $B4
2454 BNE bD325
2455 LDA $B5
2456 CMP (pCE),Y
2457 BEQ bD33B
2458 bD325 INY
2459 LDA (pCE),Y
2460 CLC
2461 ADC $CE
2462 TAX
2463 INY
2464 LDA (pCE),Y
2465 ADC $CF
2466 BCC bD30A
2467 bD333 LDX #$6B
2468 jD336 =*+$01
2469 BIT $35A2
2470 bD338 JMP jC47E
2471
2472 bD33B LDX #$78
2473 LDA $27
2474 BNE bD338
2475 LDA $2B
2476 BEQ bD347
2477 SEC
2478 RTS
2479
2480 bD347 JSR sD286
2481 LDA $26
2482 LDY #$04
2483 CMP (pCE),Y
2484 BNE bD333
2485 JMP GetArrayElement
2486
2487 bD355 LDA $2B
2488 BEQ DimArray
2489 JSR sE93D
2490 LDX #$2A
2491 JMP jC47E
2492
2493 DimArray JSR sD286
2494 JSR FreeMemCheck
2495 LDA #$00
2496 TAY
2497 STA $E1
2498 LDX #$05
2499 LDA $B4
2500 STA (pCE),Y
2501 BPL bD375
2502 DEX
2503 bD375 INY
2504 LDA $B5
2505 STA (pCE),Y
2506 BPL bD37E
2507 DEX
2508 DEX
2509 bD37E STX $E0
2510 LDA $26
2511 INY
2512 INY
2513 INY
2514 STA (pCE),Y
2515 bD387 LDX #$0B
2516 LDA #$00
2517 BIT $27
2518 BVC bD397
2519 PLA
2520 CLC
2521 ADC #$01
2522 TAX
2523 PLA
2524 ADC #$00
2525 bD397 INY
2526 STA (pCE),Y
2527 INY
2528 TXA
2529 STA (pCE),Y
2530 JSR sD44D
2531 STX $E0
2532 STA $E1
2533 LDY $91
2534 DEC $26
2535 BNE bD387
2536 ADC $C8
2537 BCS bD40C
2538 STA $C8
2539 TAY
2540 TXA
2541 ADC $C7
2542 BCC bD3BA
2543 INY
2544 BEQ bD40C
2545 bD3BA JSR FreeMemCheck
2546 STA $A0
2547 STY $A1
2548 LDA #$00
2549 INC $E1
2550 LDY $E0
2551 BEQ bD3CE
2552 bD3C9 DEY
2553 STA (pC7),Y
2554 BNE bD3C9
2555 bD3CE DEC $C8
2556 DEC $E1
2557 BNE bD3C9
2558 INC $C8
2559 SEC
2560 LDA $A0
2561 SBC $CE
2562 LDY #$02
2563 STA (pCE),Y
2564 LDA $A1
2565 INY
2566 SBC $CF
2567 STA (pCE),Y
2568 LDA $27
2569 BNE bD44C
2570 INY
2571 GetArrayElement LDA (pCE),Y
2572 STA $26
2573 LDA #$00
2574 STA $E0
2575 bD3F3 STA $E1
2576 INY
2577 PLA
2578 TAX
2579 STA $D3
2580 PLA
2581 STA $D4
2582 CMP (pCE),Y
2583 BCC bD40F
2584 BNE bD409
2585 INY
2586 TXA
2587 CMP (pCE),Y
2588 BCC bD410
2589 bD409 JMP bD333
2590
2591 bD40C JMP PrintError
2592
2593 bD40F INY
2594 bD410 LDA $E1
2595 ORA $E0
2596 CLC
2597 BEQ bD421
2598 JSR sD44D
2599 TXA
2600 ADC $D3
2601 TAX
2602 TYA
2603 LDY $91
2604 bD421 ADC $D4
2605 STX $E0
2606 DEC $26
2607 BNE bD3F3
2608 STA $E1
2609 LDX #$05
2610 LDA $B4
2611 BPL bD432
2612 DEX
2613 bD432 LDA $B5
2614 BPL bD438
2615 DEX
2616 DEX
2617 bD438 STX $97
2618 LDA #$00
2619 JSR sD456
2620 TXA
2621 ADC $C7
2622 STA $B6
2623 TYA
2624 ADC $C8
2625 STA $B7
2626 TAY
2627 LDA $B6
2628 bD44C RTS
2629
2630 sD44D STY $91
2631 LDA (pCE),Y
2632 STA $97
2633 DEY
2634 LDA (pCE),Y
2635 sD456 STA $98
2636 LDA #$10
2637 STA $CC
2638 LDX #$00
2639 LDY #$00
2640 bD460 TXA
2641 ASL
2642 TAX
2643 TYA
2644 ROL
2645 TAY
2646 BCS bD40C
2647 ASL $E0
2648 ROL $E1
2649 BCC bD479
2650 CLC
2651 TXA
2652 ADC $97
2653 TAX
2654 TYA
2655 ADC $98
2656 TAY
2657 BCS bD40C
2658 bD479 DEC $CC
2659 BNE bD460
2660 RTS
2661
2662 FRE LDA $28
2663 BEQ bD485
2664 JSR sD7D0
2665 bD485 JSR GarbageCollect
2666 SEC
2667 LDA $A2
2668 SBC $A0
2669 TAY
2670 LDA $A3
2671 SBC $A1
2672 LDX #$00
2673 STX $28
2674 JMP jDF40
2675
2676 jD499 LDX #$00
2677 STX $28
2678 STA $D1
2679 STY $D2
2680 LDX #$90
2681 JMP jDF2C
2682
2683 POS JSR sD8CB
2684 TXA
2685 BEQ bD4B4
2686 LDY $0258
2687 BIT $02F1
2688 BPL bD4B6
2689 bD4B4 LDY $30
2690 bD4B6 LDA #$00
2691 BEQ jD499
2692 DEF CMP #$D9
2693 BNE bD4DF
2694 JSR $00E2
2695 LDA #$D4
2696 JSR sD067
2697 JSR sE853
2698 LDA $33
2699 LDY $34
2700 STA $22
2701 STY $23
2702 bD4D1 RTS
2703
2704 sD4D2 LDX $A9
2705 INX
2706 BNE bD4D1
2707 LDX #$95
2708 bD4DA =*+$01
2709 BIT $E5A2
2710 JMP jC47E
2711
2712 bD4DF JSR sD50D
2713 JSR sD4D2
2714 JSR sD062
2715 LDA #$80
2716 STA $2B
2717 JSR GetVarFromText
2718 JSR sCF06
2719 JSR sD05F
2720 LDA #$D4
2721 JSR sD067
2722 PHA
2723 LDA $B7
2724 PHA
2725 LDA $B6
2726 PHA
2727 LDA $EA
2728 PHA
2729 LDA $E9
2730 PHA
2731 JSR sCA3C
2732 JMP jD57D
2733
2734 sD50D LDA #$C4
2735 JSR sD067
2736 ORA #$80
2737 LDX #$80
2738 STX $2B
2739 JSR sD18F
2740 STA $BD
2741 STY $BE
2742 JMP sCF06
2743
2744 jD522 JSR sD50D
2745 LDA $BE
2746 PHA
2747 LDA $BD
2748 PHA
2749 JSR EvalBracket
2750 JSR sCF06
2751 PLA
2752 STA $BD
2753 PLA
2754 STA $BE
2755 LDY #$02
2756 LDA (pBD),Y
2757 STA $B6
2758 TAX
2759 INY
2760 LDA (pBD),Y
2761 BEQ bD4DA
2762 STA $B7
2763 INY
2764 bD546 LDA (pB6),Y
2765 PHA
2766 DEY
2767 BPL bD546
2768 LDY $B7
2769 JSR sDEAD
2770 LDA $EA
2771 PHA
2772 LDA $E9
2773 PHA
2774 LDA (pBD),Y
2775 STA $E9
2776 INY
2777 LDA (pBD),Y
2778 STA $EA
2779 LDA $B7
2780 PHA
2781 LDA $B6
2782 PHA
2783 JSR GetExpr
2784 PLA
2785 STA $BD
2786 PLA
2787 STA $BE
2788 JSR $00E8
2789 BEQ bD577
2790 JMP jD070
2791
2792 bD577 PLA
2793 STA $E9
2794 PLA
2795 STA $EA
2796 jD57D LDY #$00
2797 PLA
2798 STA (pBD),Y
2799 PLA
2800 INY
2801 STA (pBD),Y
2802 PLA
2803 INY
2804 STA (pBD),Y
2805 PLA
2806 INY
2807 STA (pBD),Y
2808 PLA
2809 INY
2810 STA (pBD),Y
2811 RTS
2812
2813 STR JSR sCF06
2814 LDY #$00
2815 JSR sE0D7
2816 jD59B PLA
2817 PLA
2818 LDA #$FF
2819 LDY #$00
2820 BEQ GetString
2821 SetupString LDX $D3
2822 LDY $D4
2823 STX $BF
2824 STY $C0
2825 sD5AB JSR sD61E
2826 STX $D1
2827 STY $D2
2828 STA $D0
2829 RTS
2830
2831 GetString LDX #$22
2832 STX $24
2833 STX $25
2834 sD5BB STA $DE
2835 STY $DF
2836 STA $D1
2837 STY $D2
2838 LDY #$FF
2839 bD5C5 INY
2840 LDA (pDE),Y
2841 BEQ bD5D6
2842 CMP $24
2843 BEQ bD5D2
2844 CMP $25
2845 BNE bD5C5
2846 bD5D2 CMP #$22
2847 BEQ bD5D7
2848 bD5D6 CLC
2849 bD5D7 STY $D0
2850 TYA
2851 ADC $DE
2852 STA $E0
2853 LDX $DF
2854 BCC bD5E3
2855 INX
2856 bD5E3 STX $E1
2857 LDA $DF
2858 BNE bD5F4
2859 TYA
2860 JSR SetupString
2861 LDX $DE
2862 LDY $DF
2863 JSR sD7B2
2864 bD5F4 LDX $85
2865 CPX #$91
2866 BNE bD5FF
2867 LDX #$C4
2868 bD5FC JMP jC47E
2869
2870 bD5FF LDA $D0
2871 STA f00,X
2872 LDA $D1
2873 STA f01,X
2874 LDA $D2
2875 STA f02,X
2876 LDY #$00
2877 STX $D3
2878 STY $D4
2879 STY $DF
2880 DEY
2881 STY $28
2882 STX $86
2883 INX
2884 INX
2885 INX
2886 STX $85
2887 RTS
2888
2889 sD61E LSR $2A
2890 bD620 PHA
2891 EOR #$FF
2892 SEC
2893 ADC $A2
2894 LDY $A3
2895 BCS bD62B
2896 DEY
2897 bD62B CPY $A1
2898 BCC bD640
2899 BNE bD635
2900 CMP $A0
2901 BCC bD640
2902 bD635 STA $A2
2903 STY $A3
2904 STA $A4
2905 STY $A5
2906 TAX
2907 PLA
2908 RTS
2909
2910 bD640 LDX #$4D
2911 LDA $2A
2912 BMI bD5FC
2913 JSR GarbageCollect
2914 LDA #$80
2915 STA $2A
2916 PLA
2917 BNE bD620
2918 GarbageCollect LDX $A6
2919 LDA $A7
2920 jD654 STX $A2
2921 STA $A3
2922 LDY #$00
2923 STY $BE
2924 STY $BD
2925 LDA $A0
2926 LDX $A1
2927 STA $CE
2928 STX $CF
2929 LDA #<p88
2930 LDX #>p88
2931 STA $91
2932 STX $92
2933 bD66E CMP $85
2934 BEQ bD677
2935 JSR sD6F1
2936 BEQ bD66E
2937 bD677 LDA #$07
2938 STA $C2
2939 LDA $9C
2940 LDX $9D
2941 STA $91
2942 STX $92
2943 bD683 CPX $9F
2944 BNE bD68B
2945 CMP $9E
2946 BEQ bD690
2947 bD68B JSR sD6E7
2948 BEQ bD683
2949 bD690 STA $C7
2950 STX $C8
2951 LDA #$03
2952 STA $C2
2953 bD698 LDA $C7
2954 LDX $C8
2955 bD69C CPX $A1
2956 BNE bD6A7
2957 CMP $A0
2958 BNE bD6A7
2959 JMP CopyString
2960
2961 bD6A7 STA $91
2962 STX $92
2963 LDY #$00
2964 LDA (p91),Y
2965 TAX
2966 INY
2967 LDA (p91),Y
2968 PHP
2969 INY
2970 LDA (p91),Y
2971 ADC $C7
2972 STA $C7
2973 INY
2974 LDA (p91),Y
2975 ADC $C8
2976 STA $C8
2977 PLP
2978 BPL bD698
2979 TXA
2980 BMI bD698
2981 INY
2982 LDA (p91),Y
2983 LDY #$00
2984 ASL
2985 ADC #$05
2986 ADC $91
2987 STA $91
2988 BCC bD6D8
2989 INC $92
2990 bD6D8 LDX $92
2991 bD6DA CPX $C8
2992 BNE bD6E2
2993 CMP $C7
2994 BEQ bD69C
2995 bD6E2 JSR sD6F1
2996 BEQ bD6DA
2997 sD6E7 LDA (p91),Y
2998 BMI bD720
2999 INY
3000 LDA (p91),Y
3001 BPL bD720
3002 INY
3003 sD6F1 LDA (p91),Y
3004 BEQ bD720
3005 INY
3006 LDA (p91),Y
3007 TAX
3008 INY
3009 LDA (p91),Y
3010 CMP $A3
3011 BCC bD706
3012 BNE bD720
3013 CPX $A2
3014 BCS bD720
3015 bD706 CMP $CF
3016 BCC bD720
3017 BNE bD710
3018 CPX $CE
3019 BCC bD720
3020 bD710 STX $CE
3021 STA $CF
3022 LDA $91
3023 LDX $92
3024 STA $BD
3025 STX $BE
3026 LDA $C2
3027 STA $C4
3028 bD720 LDA $C2
3029 CLC
3030 ADC $91
3031 STA $91
3032 BCC bD72B
3033 INC $92
3034 bD72B LDX $92
3035 LDY #$00
3036 RTS
3037
3038 CopyString LDA $BE
3039 ORA $BD
3040 BEQ bD72B
3041 LDA $C4
3042 AND #$04
3043 LSR
3044 TAY
3045 STA $C4
3046 LDA (pBD),Y
3047 ADC $CE
3048 STA $C9
3049 LDA $CF
3050 ADC #$00
3051 STA $CA
3052 LDA $A2
3053 LDX $A3
3054 STA $C7
3055 STX $C8
3056 JSR sC3FB
3057 LDY $C4
3058 INY
3059 LDA $C7
3060 STA (pBD),Y
3061 TAX
3062 INC $C8
3063 LDA $C8
3064 INY
3065 STA (pBD),Y
3066 JMP jD654
3067
3068 StrCat LDA $D4
3069 PHA
3070 LDA $D3
3071 PHA
3072 JSR GetItem
3073 JSR sCF08
3074 PLA
3075 STA $DE
3076 PLA
3077 STA $DF
3078 LDY #$00
3079 LDA (pDE),Y
3080 CLC
3081 ADC (pD3),Y
3082 BCC bD787
3083 LDX #$B5
3084 JMP jC47E
3085
3086 bD787 JSR SetupString
3087 JSR sD7A4
3088 LDA $BF
3089 LDY $C0
3090 JSR sD7D4
3091 JSR sD7B6
3092 LDA $DE
3093 LDY $DF
3094 JSR sD7D4
3095 JSR bD5F4
3096 JMP jCF31
3097
3098 sD7A4 LDY #$00
3099 LDA (pDE),Y
3100 PHA
3101 INY
3102 LDA (pDE),Y
3103 TAX
3104 INY
3105 LDA (pDE),Y
3106 TAY
3107 PLA
3108 sD7B2 STX $91
3109 STY $92
3110 sD7B6 TAY
3111 BEQ bD7C3
3112 PHA
3113 bD7BA DEY
3114 LDA (p91),Y
3115 STA (pA4),Y
3116 TYA
3117 BNE bD7BA
3118 PLA
3119 bD7C3 CLC
3120 ADC $A4
3121 STA $A4
3122 BCC bD7CC
3123 INC $A5
3124 bD7CC RTS
3125
3126 sD7CD JSR sCF08
3127 sD7D0 LDA $D3
3128 LDY $D4
3129 sD7D4 STA $91
3130 STY $92
3131 JSR sD805
3132 PHP
3133 LDY #$00
3134 LDA (p91),Y
3135 PHA
3136 INY
3137 LDA (p91),Y
3138 TAX
3139 INY
3140 LDA (p91),Y
3141 TAY
3142 PLA
3143 PLP
3144 BNE bD800
3145 CPY $A3
3146 BNE bD800
3147 CPX $A2
3148 BNE bD800
3149 PHA
3150 CLC
3151 ADC $A2
3152 STA $A2
3153 BCC bD7FF
3154 INC $A3
3155 bD7FF PLA
3156 bD800 STX $91
3157 STY $92
3158 RTS
3159
3160 sD805 CPY $87
3161 BNE bD815
3162 CMP $86
3163 BNE bD815
3164 STA $85
3165 SBC #$03
3166 STA $86
3167 LDY #$00
3168 bD815 RTS
3169
3170 CHR JSR sD8CB
3171 TXA
3172 PHA
3173 LDA #$01
3174 JSR sD5AB
3175 PLA
3176 LDY #$00
3177 STA (pD1),Y
3178 PLA
3179 PLA
3180 JMP bD5F4
3181
3182 LEFT JSR sD88B
3183 CMP (pBF),Y
3184 TYA
3185 jD830 BCC bD836
3186 LDA (pBF),Y
3187 TAX
3188 TYA
3189 bD836 PHA
3190 bD837 TXA
3191 bD838 PHA
3192 JSR sD5AB
3193 LDA $BF
3194 LDY $C0
3195 JSR sD7D4
3196 PLA
3197 TAY
3198 PLA
3199 CLC
3200 ADC $91
3201 STA $91
3202 BCC bD84F
3203 INC $92
3204 bD84F TYA
3205 JSR sD7B6
3206 JMP bD5F4
3207
3208 RIGHT JSR sD88B
3209 CLC
3210 SBC (pBF),Y
3211 EOR #$FF
3212 JMP jD830
3213
3214 MID LDA #$FF
3215 STA $D4
3216 JSR $00E8
3217 CMP #$29
3218 BEQ bD872
3219 JSR sD065
3220 JSR sD8C8
3221 bD872 JSR sD88B
3222 BEQ jD8C2
3223 DEX
3224 TXA
3225 PHA
3226 CLC
3227 LDX #$00
3228 SBC (pBF),Y
3229 BCS bD837
3230 EOR #$FF
3231 CMP $D4
3232 BCC bD838
3233 LDA $D4
3234 BCS bD838
3235 sD88B JSR sD05F
3236 PLA
3237 TAY
3238 PLA
3239 STA $C4
3240 PLA
3241 PLA
3242 PLA
3243 TAX
3244 PLA
3245 STA $BF
3246 PLA
3247 STA $C0
3248 LDA $C4
3249 PHA
3250 TYA
3251 PHA
3252 LDY #$00
3253 TXA
3254 RTS
3255
3256 LEN JSR sD8AC
3257 JMP bD4B6
3258
3259 sD8AC JSR sD7CD
3260 LDX #$00
3261 STX $28
3262 TAY
3263 RTS
3264
3265 ASC JSR sD8AC
3266 BEQ jD8C2
3267 LDY #$00
3268 LDA (p91),Y
3269 TAY
3270 JMP bD4B6
3271
3272 jD8C2 JMP jD336
3273
3274 GetByteExpr JSR $00E2
3275 sD8C8 JSR GetExpr
3276 sD8CB JSR sD2A2
3277 LDX $D3
3278 BNE jD8C2
3279 LDX $D4
3280 JMP $00E8
3281
3282 JSR sD8AC
3283 BNE bD8DF
3284 JMP jDBB2
3285
3286 bD8DF LDX $E9
3287 LDY $EA
3288 STX $E0
3289 STY $E1
3290 LDX $91
3291 STX $E9
3292 CLC
3293 ADC $91
3294 STA $93
3295 LDX $92
3296 STX $EA
3297 BCC bD8F7
3298 INX
3299 bD8F7 STX $94
3300 LDY #$00
3301 LDA (p93),Y
3302 PHA
3303 LDA #$00
3304 STA (p93),Y
3305 JSR $00E8
3306 JSR GetNumber
3307 PLA
3308 LDY #$00
3309 STA (p93),Y
3310 sD90D LDX $E0
3311 LDY $E1
3312 STX $E9
3313 STY $EA
3314 RTS
3315
3316 sD916 JSR GetExpr
3317 JSR FP2Int
3318 JSR sD065
3319 JMP sD8C8
3320
3321 FP2Int LDA $D5
3322 BMI jD8C2
3323 LDA $D0
3324 CMP #$91
3325 sD92A BCS jD8C2
3326 JSR FPA2Int
3327 LDA $D3
3328 LDY $D4
3329 STY $33
3330 STA $34
3331 RTS
3332
3333 PEEK LDA $34
3334 PHA
3335 LDA $33
3336 PHA
3337 JSR FP2Int
3338 LDY #$00
3339 LDA (p33),Y
3340 TAY
3341 PLA
3342 STA $33
3343 PLA
3344 STA $34
3345 JMP bD4B6
3346
3347 POKE JSR sD916
3348 TXA
3349 LDY #$00
3350 STA (p33),Y
3351 RTS
3352
3353 WAIT JSR GetExpr
3354 JSR FP2Int
3355 LDY $33
3356 LDX $34
3357 LDA #$02
3358 JMP Delay
3359
3360 DOKE JSR sE853
3361 LDA $33
3362 LDY $34
3363 STA $1D
3364 STY $1E
3365 JSR sD065
3366 JSR sE853
3367 LDY #$01
3368 bD97A LDA f0033,Y
3369 STA (p1D),Y
3370 DEY
3371 BPL bD97A
3372 RTS
3373
3374 DEEK JSR FP2Int
3375 LDY #$01
3376 LDA (p33),Y
3377 PHA
3378 DEY
3379 LDA (p33),Y
3380 TAY
3381 PLA
3382 JMP jDF40
3383
3384 Byte2Hex PHA
3385 LSR
3386 LSR
3387 LSR
3388 LSR
3389 JSR sD99C
3390 PLA
3391 sD99C AND #$0F
3392 ORA #$30
3393 CMP #$3A
3394 BCC bD9A6
3395 ADC #$06
3396 bD9A6 CMP #$30
3397 BNE bD9AE
3398 LDY $2F
3399 BEQ bD9B4
3400 bD9AE STA $2F
3401 STA f0100,X
3402 INX
3403 bD9B4 RTS
3404
3405 HEX JSR FP2Int
3406 LDX #$00
3407 STX $2F
3408 LDA #$23
3409 STA $FF
3410 LDA $34
3411 JSR Byte2Hex
3412 LDA $33
3413 JSR Byte2Hex
3414 TXA
3415 BNE bD9D3
3416 LDA #$30
3417 STA f0100,X
3418 INX
3419 bD9D3 LDA #$00
3420 STA f0100,X
3421 JMP jD59B
3422
3423 bD9DB JMP jD070
3424
3425 LORES JSR TEXT
3426 JSR sD8C8
3427 TXA
3428 BEQ bD9ED
3429 DEX
3430 BNE bD9DB
3431 LDA #$09
3432 bD9ED =*+$01
3433 BIT $08A9
3434 LDX #$10
3435 STX $02F8
3436 LDX #$1B
3437 bD9F6 PHA
3438 TXA
3439 JSR RowCalc
3440 LDA $02F8
3441 LDY #$27
3442 bDA00 STA (p1F),Y
3443 DEY
3444 BNE bDA00
3445 PLA
3446 STA (p1F),Y
3447 DEX
3448 BNE bD9F6
3449 RTS
3450
3451 RowCalc JSR sF731
3452 STY $20
3453 CLC
3454 ADC #$80
3455 PHA
3456 STA $1F
3457 LDA #$BB
3458 ADC $20
3459 STA $20
3460 PLA
3461 RTS
3462
3463 bDA1F JMP jD8C2
3464
3465 sDA22 JSR TxtTest
3466 JSR sD8C8
3467 CPX #$28
3468 BCS bDA1F
3469 STX $02F8
3470 JSR sD065
3471 JSR sD8C8
3472 CPX #$1B
3473 BCS bDA1F
3474 INX
3475 TXA
3476 JSR RowCalc
3477 RTS
3478
3479 SCRN JSR sD062
3480 JSR sDA22
3481 JSR sD05F
3482 LDY $02F8
3483 LDA (p1F),Y
3484 TAY
3485 JMP bD4B6
3486
3487 PLOT JSR sDA22
3488 JSR sD065
3489 JSR EvalExpr
3490 BIT $28
3491 BPL bDA7B
3492 JSR sD7D0
3493 TAX
3494 CLC
3495 LDA $02F8
3496 ADC $1F
3497 BCC bDA6C
3498 INC $20
3499 bDA6C STA $1F
3500 LDY #$00
3501 INX
3502 bDA71 DEX
3503 BEQ bDA84
3504 LDA (p91),Y
3505 STA (p1F),Y
3506 INY
3507 BNE bDA71
3508 bDA7B JSR sD8CB
3509 TXA
3510 LDY $02F8
3511 STA (p1F),Y
3512 bDA84 RTS
3513
3514 BNE bDA9E
3515 LDA #$03
3516 JSR sC437
3517 jDA8C LDA $EA
3518 PHA
3519 LDA $E9
3520 PHA
3521 LDA $A9
3522 PHA
3523 LDA $A8
3524 PHA
3525 LDA #$8B
3526 PHA
3527 JMP DoNextLine
3528
3529 bDA9E JMP jD070
3530
3531 UNTIL LDA #$FF
3532 STA $B9
3533 JSR FindForVar
3534 TXS
3535 CMP #$8B
3536 REPEAT BEQ bDAB2
3537 LDX #$F5
3538 JMP jC47E
3539
3540 bDAB2 CPY #$10
3541 BNE bDABB
3542 STY $D0
3543 TYA
3544 BNE bDAC1
3545 bDABB JSR $00E8
3546 JSR EvalExpr
3547 bDAC1 PLA
3548 LDA $D0
3549 BEQ bDACB
3550 PLA
3551 PLA
3552 PLA
3553 PLA
3554 RTS
3555
3556 bDACB PLA
3557 STA $A8
3558 PLA
3559 STA $A9
3560 PLA
3561 STA $E9
3562 PLA
3563 STA $EA
3564 JMP jDA8C
3565
3566 KEY JSR CheckKbd
3567 PHP
3568 PHA
3569 BPL bDAE4
3570 LDA #$01
3571 bDAE4 =*+$01
3572 BIT !$00A9
3573 JSR sD5AB
3574 PLA
3575 PLP
3576 BPL bDAF1
3577 LDY #$00
3578 STA (pD1),Y
3579 bDAF1 PLA
3580 PLA
3581 JMP bD5F4
3582
3583 TxtTest LDA $02C0
3584 AND #$01
3585 BEQ bDB02
3586 LDX #$A3
3587 JMP jC47E
3588
3589 bDB02 RTS
3590
3591 bDB03 RTS
3592
3593 sDB04 LDA #$05
3594 LDY #$E2
3595 JMP sDB22
3596
3597 sDB0B JSR UnpackFPA
3598 sDB0E LDA $D5
3599 EOR #$FF
3600 STA $D5
3601 EOR $DD
3602 STA $DE
3603 LDA $D0
3604 JMP jDB25
3605
3606 bDB1D JSR sDC54
3607 BCC bDB5E
3608 sDB22 JSR UnpackFPA
3609 jDB25 BNE bDB2A
3610 JMP sDED5
3611
3612 bDB2A LDX $DF
3613 STX $C5
3614 LDX #$D8
3615 LDA $D8
3616 sDB32 TAY
3617 BEQ bDB03
3618 SEC
3619 SBC $D0
3620 BEQ bDB5E
3621 BCC bDB4E
3622 STY $D0
3623 LDY $DD
3624 STY $D5
3625 EOR #$FF
3626 ADC #$00
3627 LDY #$00
3628 STY $C5
3629 LDX #$D0
3630 BNE bDB52
3631 bDB4E LDY #$00
3632 STY $DF
3633 bDB52 CMP #$F9
3634 BMI bDB1D
3635 TAY
3636 LDA $DF
3637 LSR f01,X
3638 JSR sDC6B
3639 bDB5E BIT $DE
3640 BPL AddMantissas
3641 LDY #$D0
3642 CPX #$D8
3643 BEQ bDB6A
3644 LDY #$D8
3645 bDB6A SEC
3646 EOR #$FF
3647 ADC $C5
3648 STA $DF
3649 LDA f0004,Y
3650 SBC f04,X
3651 STA $D4
3652 LDA f0003,Y
3653 SBC f03,X
3654 STA $D3
3655 LDA f0002,Y
3656 SBC f02,X
3657 STA $D2
3658 LDA f0001,Y
3659 SBC f01,X
3660 STA $D1
3661 jDB8D BCS Normalise
3662 JSR sDC02
3663 Normalise LDY #$00
3664 TYA
3665 CLC
3666 bDB96 LDX $D1
3667 BNE bDBE4
3668 LDX $D2
3669 STX $D1
3670 LDX $D3
3671 STX $D2
3672 LDX $D4
3673 STX $D3
3674 LDX $DF
3675 STX $D4
3676 STY $DF
3677 ADC #$08
3678 CMP #$28
3679 BNE bDB96
3680 jDBB2 LDA #$00
3681 jDBB4 STA $D0
3682 jDBB6 STA $D5
3683 RTS
3684
3685 AddMantissas ADC $C5
3686 STA $DF
3687 LDA $D4
3688 ADC $DC
3689 STA $D4
3690 LDA $D3
3691 ADC $DB
3692 STA $D3
3693 LDA $D2
3694 ADC $DA
3695 STA $D2
3696 LDA $D1
3697 ADC $D9
3698 STA $D1
3699 JMP jDBF1
3700
3701 bDBD8 ADC #$01
3702 ASL $DF
3703 ROL $D4
3704 ROL $D3
3705 ROL $D2
3706 ROL $D1
3707 bDBE4 BPL bDBD8
3708 SEC
3709 SBC $D0
3710 BCS jDBB2
3711 EOR #$FF
3712 ADC #$01
3713 STA $D0
3714 jDBF1 BCC bDC01
3715 jDBF3 INC $D0
3716 BEQ bDC39
3717 ROR $D1
3718 ROR $D2
3719 ROR $D3
3720 ROR $D4
3721 ROR $DF
3722 bDC01 RTS
3723
3724 sDC02 LDA $D5
3725 EOR #$FF
3726 STA $D5
3727 sDC08 LDA $D1
3728 EOR #$FF
3729 STA $D1
3730 LDA $D2
3731 EOR #$FF
3732 STA $D2
3733 LDA $D3
3734 EOR #$FF
3735 STA $D3
3736 LDA $D4
3737 EOR #$FF
3738 STA $D4
3739 LDA $DF
3740 EOR #$FF
3741 STA $DF
3742 INC $DF
3743 BNE bDC38
3744 sDC2A INC $D4
3745 BNE bDC38
3746 INC $D3
3747 BNE bDC38
3748 INC $D2
3749 BNE bDC38
3750 INC $D1
3751 bDC38 RTS
3752
3753 bDC39 LDX #$45
3754 JMP jC47E
3755
3756 jDC3E LDX #$94
3757 bDC40 LDY f04,X
3758 STY $DF
3759 LDY f03,X
3760 STY f04,X
3761 LDY f02,X
3762 STY f03,X
3763 LDY f01,X
3764 STY f02,X
3765 LDY $D7
3766 STY f01,X
3767 sDC54 ADC #$08
3768 BMI bDC40
3769 BEQ bDC40
3770 SBC #$08
3771 TAY
3772 LDA $DF
3773 BCS bDC75
3774 bDC61 ASL f01,X
3775 BCC bDC67
3776 INC f01,X
3777 bDC67 ROR f01,X
3778 ROR f01,X
3779 sDC6B ROR f02,X
3780 ROR f03,X
3781 ROR f04,X
3782 ROR
3783 INY
3784 BNE bDC61
3785 bDC75 CLC
3786 RTS
3787
3788 .BYTE $82,$13,$5D,$8D,$DE
3789 pDC7C .BYTE $82,$49,$0F,$DA,$9E,$81,$00,$00
3790 .BYTE $00,$00,$03,$7F,$5E,$56,$CB,$79
3791 .BYTE $80,$13,$9B,$0B,$64,$80,$76,$38
3792 .BYTE $93,$16,$82,$38,$AA,$3B,$20,$80
3793 .BYTE $35,$04,$F3,$34,$81,$35,$04,$F3
3794 .BYTE $34,$80,$80,$00,$00,$00,$80,$31
3795 .BYTE $72,$17,$F8
3796 LN JSR GetSign
3797 BEQ bDCB6
3798 BPL bDCB9
3799 bDCB6 JMP jD336
3800
3801 bDCB9 LDA $D0
3802 SBC #$7F
3803 PHA
3804 LDA #$80
3805 STA $D0
3806 LDA #$9B
3807 LDY #$DC
3808 JSR sDB22
3809 LDA #$A0
3810 LDY #$DC
3811 JSR sDDE4
3812 LDA #$81
3813 LDY #$DC
3814 JSR sDB0B
3815 LDA #$86
3816 LDY #$DC
3817 JSR sE2FD
3818 LDA #$A5
3819 LDY #$DC
3820 JSR sDB22
3821 PLA
3822 JSR AddToFPA
3823 LDA #$AA
3824 LDY #$DC
3825 sDCED JSR UnpackFPA
3826 BNE bDCF5
3827 JMP jDD50
3828
3829 bDCF5 JSR sDD7C
3830 LDA #$00
3831 STA $95
3832 STA $96
3833 STA $97
3834 STA $98
3835 LDA $DF
3836 JSR sDD1E
3837 LDA $D4
3838 JSR sDD1E
3839 LDA $D3
3840 JSR sDD1E
3841 LDA $D2
3842 JSR sDD1E
3843 LDA $D1
3844 JSR sDD23
3845 JMP jDE64
3846
3847 sDD1E BNE sDD23
3848 JMP jDC3E
3849
3850 sDD23 LSR
3851 ORA #$80
3852 bDD26 TAY
3853 BCC bDD42
3854 CLC
3855 LDA $98
3856 ADC $DC
3857 STA $98
3858 LDA $97
3859 ADC $DB
3860 STA $97
3861 LDA $96
3862 ADC $DA
3863 STA $96
3864 LDA $95
3865 ADC $D9
3866 STA $95
3867 bDD42 ROR $95
3868 ROR $96
3869 ROR $97
3870 ROR $98
3871 ROR $DF
3872 TYA
3873 LSR
3874 BNE bDD26
3875 jDD50 RTS
3876
3877 UnpackFPA STA $91
3878 STY $92
3879 LDY #$04
3880 LDA (p91),Y
3881 STA $DC
3882 DEY
3883 LDA (p91),Y
3884 STA $DB
3885 DEY
3886 LDA (p91),Y
3887 STA $DA
3888 DEY
3889 LDA (p91),Y
3890 STA $DD
3891 EOR $D5
3892 STA $DE
3893 LDA $DD
3894 ORA #$80
3895 STA $D9
3896 DEY
3897 LDA (p91),Y
3898 STA $D8
3899 LDA $D0
3900 RTS
3901
3902 sDD7C LDA $D8
3903 sDD7E BEQ bDD9F
3904 CLC
3905 ADC $D0
3906 BCC bDD89
3907 BMI bDDA4
3908 CLC
3909 bDD89 =*+$01
3910 BIT $1410
3911 ADC #$80
3912 STA $D0
3913 BNE bDD94
3914 JMP jDBB6
3915
3916 bDD94 LDA $DE
3917 STA $D5
3918 RTS
3919
3920 sDD99 LDA $D5
3921 EOR #$FF
3922 BMI bDDA4
3923 bDD9F PLA
3924 PLA
3925 JMP jDBB2
3926
3927 bDDA4 JMP bDC39
3928
3929 FPAMult10 JSR sDEE5
3930 TAX
3931 BEQ bDDBD
3932 CLC
3933 ADC #$02
3934 BCS bDDA4
3935 LDX #$00
3936 STX $DE
3937 JSR sDB32
3938 INC $D0
3939 BEQ bDDA4
3940 bDDBD RTS
3941
3942 .BYTE $84,$20,$00,$00,$00
3943 FPADiv10 JSR sDEE5
3944 LDA #$BE
3945 LDY #$DD
3946 LDX #$00
3947 sDDCC STX $DE
3948 JSR sDE7B
3949 JMP jDDE7
3950
3951 LOG JSR LN
3952 JSR sDEE5
3953 LDA #$77
3954 LDY #$DC
3955 JSR sDE7B
3956 JMP jDDE7
3957
3958 sDDE4 JSR UnpackFPA
3959 jDDE7 BEQ bDE5F
3960 JSR RoundFPA
3961 LDA #$00
3962 SEC
3963 SBC $D0
3964 STA $D0
3965 JSR sDD7C
3966 INC $D0
3967 BEQ bDDA4
3968 LDX #$FC
3969 LDA #$01
3970 bDDFE LDY $D9
3971 CPY $D1
3972 BNE bDE14
3973 LDY $DA
3974 CPY $D2
3975 BNE bDE14
3976 LDY $DB
3977 CPY $D3
3978 BNE bDE14
3979 LDY $DC
3980 CPY $D4
3981 bDE14 PHP
3982 ROL
3983 BCC bDE21
3984 INX
3985 STA f98,X
3986 BEQ bDE4F
3987 BPL bDE53
3988 LDA #$01
3989 bDE21 PLP
3990 BCS bDE32
3991 jDE24 ASL $DC
3992 ROL $DB
3993 ROL $DA
3994 ROL $D9
3995 BCS bDE14
3996 BMI bDDFE
3997 BPL bDE14
3998 bDE32 TAY
3999 LDA $DC
4000 SBC $D4
4001 STA $DC
4002 LDA $DB
4003 SBC $D3
4004 STA $DB
4005 LDA $DA
4006 SBC $D2
4007 STA $DA
4008 LDA $D9
4009 SBC $D1
4010 STA $D9
4011 TYA
4012 JMP jDE24
4013
4014 bDE4F LDA #$40
4015 BNE bDE21
4016 bDE53 ASL
4017 ASL
4018 ASL
4019 ASL
4020 ASL
4021 ASL
4022 STA $DF
4023 PLP
4024 JMP jDE64
4025
4026 bDE5F LDX #$85
4027 JMP jC47E
4028
4029 jDE64 LDA $95
4030 STA $D1
4031 LDA $96
4032 STA $D2
4033 LDA $97
4034 STA $D3
4035 LDA $98
4036 STA $D4
4037 JMP Normalise
4038
4039 PI LDA #<pDC7C
4040 LDY #>pDC7C
4041 sDE7B STA $91
4042 STY $92
4043 LDY #$04
4044 LDA (p91),Y
4045 STA $D4
4046 DEY
4047 LDA (p91),Y
4048 STA $D3
4049 DEY
4050 LDA (p91),Y
4051 STA $D2
4052 DEY
4053 LDA (p91),Y
4054 STA $D5
4055 ORA #$80
4056 STA $D1
4057 DEY
4058 LDA (p91),Y
4059 STA $D0
4060 STY $DF
4061 RTS
4062
4063 sDEA0 LDX #$CB
4064 sDEA3 =*+$01
4065 BIT $C6A2
4066 LDY #$00
4067 BEQ sDEAD
4068 jDEA9 LDX $B8
4069 LDY $B9
4070 sDEAD JSR RoundFPA
4071 STX $91
4072 STY $92
4073 LDY #$04
4074 LDA $D4
4075 STA (p91),Y
4076 DEY
4077 LDA $D3
4078 STA (p91),Y
4079 DEY
4080 LDA $D2
4081 STA (p91),Y
4082 DEY
4083 LDA $D5
4084 ORA #$7F
4085 AND $D1
4086 STA (p91),Y
4087 DEY
4088 LDA $D0
4089 STA (p91),Y
4090 STY $DF
4091 RTS
4092
4093 sDED5 LDA $DD
4094 sDED7 STA $D5
4095 LDX #$05
4096 bDEDB LDA fD7,X
4097 STA fCF,X
4098 DEX
4099 BNE bDEDB
4100 STX $DF
4101 RTS
4102
4103 sDEE5 JSR RoundFPA
4104 sDEE8 LDX #$06
4105 bDEEA LDA fCF,X
4106 STA fD7,X
4107 DEX
4108 BNE bDEEA
4109 STX $DF
4110 bDEF3 RTS
4111
4112 RoundFPA LDA $D0
4113 BEQ bDEF3
4114 ASL $DF
4115 BCC bDEF3
4116 sDEFC JSR sDC2A
4117 BNE bDEF3
4118 JMP jDBF3
4119
4120 JSR sD2A9
4121 LSR $D4
4122 BCS TRUE
4123 FALSE LDA #$00
4124 BEQ jDF24
4125 TRUE LDA #$FF
4126 BMI jDF24
4127 GetSign LDA $D0
4128 BEQ bDF20
4129 bDF17 LDA $D5
4130 jDF19 ROL
4131 LDA #$FF
4132 BCS bDF20
4133 LDA #$01
4134 bDF20 RTS
4135
4136 SGN JSR GetSign
4137 jDF24 STA $D1
4138 LDA #$00
4139 STA $D2
4140 LDX #$88
4141 jDF2C LDA $D1
4142 EOR #$FF
4143 ROL
4144 bDF31 LDA #$00
4145 STA $D4
4146 STA $D3
4147 STX $D0
4148 STA $DF
4149 STA $D5
4150 JMP jDB8D
4151
4152 jDF40 STA $D1
4153 STY $D2
4154 LDX #$90
4155 SEC
4156 BCS bDF31
4157 LSR $D5
4158 RTS
4159
4160 CompareFPA STA $93
4161 sDF4E STY $94
4162 LDY #$00
4163 LDA (p93),Y
4164 INY
4165 TAX
4166 BEQ GetSign
4167 LDA (p93),Y
4168 EOR $D5
4169 BMI bDF17
4170 CPX $D0
4171 BNE bDF83
4172 LDA (p93),Y
4173 ORA #$80
4174 CMP $D1
4175 BNE bDF83
4176 INY
4177 LDA (p93),Y
4178 CMP $D2
4179 BNE bDF83
4180 INY
4181 LDA (p93),Y
4182 CMP $D3
4183 BNE bDF83
4184 INY
4185 LDA #$7F
4186 CMP $DF
4187 LDA (p93),Y
4188 SBC $D4
4189 BEQ bDFAB
4190 bDF83 LDA $D5
4191 BCC bDF89
4192 EOR #$FF
4193 bDF89 JMP jDF19
4194
4195 FPA2Int LDA $D0
4196 BEQ bDFDA
4197 SEC
4198 SBC #$A0
4199 BIT $D5
4200 BPL bDFA0
4201 TAX
4202 LDA #$FF
4203 STA $D7
4204 JSR sDC08
4205 TXA
4206 bDFA0 LDX #$D0
4207 CMP #$F9
4208 BPL bDFAC
4209 JSR sDC54
4210 STY $D7
4211 bDFAB RTS
4212
4213 bDFAC TAY
4214 LDA $D5
4215 AND #$80
4216 LSR $D1
4217 ORA $D1
4218 STA $D1
4219 JSR sDC6B
4220 STY $D7
4221 RTS
4222
4223 INT LDA $D0
4224 CMP #$A0
4225 BCS bDFE3
4226 JSR FPA2Int
4227 STY $DF
4228 LDA $D5
4229 STY $D5
4230 EOR #$80
4231 ROL
4232 LDA #$A0
4233 STA $D0
4234 LDA $D4
4235 STA $24
4236 JMP jDB8D
4237
4238 bDFDA STA $D1
4239 STA $D2
4240 STA $D3
4241 STA $D4
4242 TAY
4243 bDFE3 RTS
4244
4245 bDFE4 JMP jE981
4246
4247 GetNumber LDY #$00
4248 LDX #$0A
4249 bDFEB STY fCC,X
4250 DEX
4251 BPL bDFEB
4252 BCC bE005
4253 CMP #$23
4254 BEQ bDFE4
4255 CMP #$2D
4256 BNE bDFFE
4257 STX $D6
4258 BEQ bE002
4259 bDFFE CMP #$2B
4260 BNE bE007
4261 bE002 JSR $00E2
4262 bE005 BCC bE062
4263 bE007 CMP #$2E
4264 BEQ bE039
4265 CMP #$45
4266 BNE bE03F
4267 JSR $00E2
4268 BCC bE02B
4269 CMP #$CD
4270 BEQ bE026
4271 CMP #$2D
4272 BEQ bE026
4273 CMP #$CC
4274 BEQ bE028
4275 CMP #$2B
4276 BEQ bE028
4277 BNE bE02D
4278 bE026 ROR $CF
4279 bE028 JSR $00E2
4280 bE02B BCC bE089
4281 bE02D BIT $CF
4282 BPL bE03F
4283 LDA #$00
4284 SEC
4285 SBC $CD
4286 JMP jE041
4287
4288 bE039 ROR $CE
4289 BIT $CE
4290 BVC bE002
4291 bE03F LDA $CD
4292 jE041 SEC
4293 SBC $CC
4294 STA $CD
4295 BEQ bE05A
4296 BPL bE053
4297 bE04A JSR FPADiv10
4298 INC $CD
4299 BNE bE04A
4300 BEQ bE05A
4301 bE053 JSR FPAMult10
4302 DEC $CD
4303 BNE bE053
4304 bE05A LDA $D6
4305 BMI bE05F
4306 RTS
4307
4308 bE05F JMP jE271
4309
4310 bE062 PHA
4311 BIT $CE
4312 BPL bE069
4313 INC $CC
4314 bE069 JSR FPAMult10
4315 PLA
4316 SEC
4317 SBC #$30
4318 JSR AddToFPA
4319 JMP bE002
4320
4321 AddToFPA PHA
4322 JSR sDEE5
4323 PLA
4324 JSR jDF24
4325 LDA $DD
4326 EOR $D5
4327 STA $DE
4328 LDX $D0
4329 JMP jDB25
4330
4331 bE089 LDA $CD
4332 CMP #$0A
4333 BCC bE098
4334 LDA #$64
4335 BIT $CF
4336 BMI bE0A6
4337 JMP bDC39
4338
4339 bE098 ASL
4340 ASL
4341 CLC
4342 ADC $CD
4343 ASL
4344 CLC
4345 LDY #$00
4346 ADC (pE9),Y
4347 SEC
4348 SBC #$30
4349 bE0A6 STA $CD
4350 JMP bE028
4351
4352 .BYTE $9B,$3E,$BC,$1F,$FD,$9E,$6E,$6B
4353 .BYTE $27,$FD,$9E,$6E,$6B,$28,$00
4354 sE0BA LDA #$AD
4355 LDY #$C3
4356 JSR sE0D2
4357 LDA $A9
4358 LDX $A8
4359 PrintInt STA $D1
4360 STX $D2
4361 LDX #$90
4362 SEC
4363 JSR bDF31
4364 JSR sE0D5
4365 sE0D2 JMP PrintString
4366
4367 sE0D5 LDY #$01
4368 sE0D7 LDA #$20
4369 BIT $D5
4370 BPL bE0DF
4371 LDA #$2D
4372 bE0DF STA f00FF,Y
4373 STA $D5
4374 STY $E0
4375 INY
4376 LDA #$30
4377 LDX $D0
4378 BNE bE0F0
4379 JMP jE1F8
4380
4381 bE0F0 LDA #$00
4382 CPX #$80
4383 BEQ bE0F8
4384 BCS bE101
4385 bE0F8 LDA #$B5
4386 LDY #$E0
4387 JSR sDCED
4388 LDA #$F7
4389 bE101 STA $CC
4390 bE103 LDA #$B0
4391 LDY #$E0
4392 JSR CompareFPA
4393 BEQ bE12A
4394 BPL bE120
4395 bE10E LDA #$AB
4396 LDY #$E0
4397 JSR CompareFPA
4398 BEQ bE119
4399 BPL bE127
4400 bE119 JSR FPAMult10
4401 DEC $CC
4402 BNE bE10E
4403 bE120 JSR FPADiv10
4404 INC $CC
4405 BNE bE103
4406 bE127 JSR sDB04
4407 bE12A JSR FPA2Int
4408 LDX #$01
4409 LDA $CC
4410 CLC
4411 ADC #$0A
4412 BMI bE13F
4413 CMP #$0B
4414 BCS bE140
4415 ADC #$FF
4416 TAX
4417 LDA #$02
4418 bE13F SEC
4419 bE140 SBC #$02
4420 STA $CD
4421 STX $CC
4422 TXA
4423 BEQ bE14B
4424 BPL bE15E
4425 bE14B LDY $E0
4426 LDA #$2E
4427 INY
4428 STA f00FF,Y
4429 TXA
4430 BEQ bE15C
4431 LDA #$30
4432 INY
4433 STA f00FF,Y
4434 bE15C STY $E0
4435 bE15E LDY #$00
4436 LDX #$80
4437 bE162 LDA $D4
4438 CLC
4439 ADC fE20D,Y
4440 STA $D4
4441 LDA $D3
4442 ADC fE20C,Y
4443 STA $D3
4444 LDA $D2
4445 ADC fE20B,Y
4446 STA $D2
4447 LDA $D1
4448 ADC fE20A,Y
4449 STA $D1
4450 INX
4451 BCS bE186
4452 BPL bE162
4453 BMI bE188
4454 bE186 BMI bE162
4455 bE188 TXA
4456 BCC bE18F
4457 EOR #$FF
4458 ADC #$0A
4459 bE18F ADC #$2F
4460 INY
4461 INY
4462 INY
4463 INY
4464 STY $B6
4465 LDY $E0
4466 INY
4467 TAX
4468 AND #$7F
4469 STA f00FF,Y
4470 DEC $CC
4471 BNE bE1AA
4472 LDA #$2E
4473 INY
4474 STA f00FF,Y
4475 bE1AA STY $E0
4476 LDY $B6
4477 TXA
4478 EOR #$FF
4479 AND #$80
4480 TAX
4481 CPY #$24
4482 BNE bE162
4483 LDY $E0
4484 bE1BA LDA f00FF,Y
4485 DEY
4486 CMP #$30
4487 BEQ bE1BA
4488 CMP #$2E
4489 BEQ bE1C7
4490 INY
4491 bE1C7 LDA #$2B
4492 LDX $CD
4493 BEQ bE1FB
4494 BPL bE1D7
4495 LDA #$00
4496 SEC
4497 SBC $CD
4498 TAX
4499 LDA #$2D
4500 bE1D7 STA f0101,Y
4501 LDA #$45
4502 STA f0100,Y
4503 TXA
4504 LDX #$2F
4505 SEC
4506 bE1E3 INX
4507 SBC #$0A
4508 BCS bE1E3
4509 ADC #$3A
4510 STA f0103,Y
4511 TXA
4512 STA f0102,Y
4513 LDA #$00
4514 STA f0104,Y
4515 BEQ bE200
4516 jE1F8 STA f00FF,Y
4517 bE1FB LDA #$00
4518 STA f0100,Y
4519 bE200 LDA #$00
4520 LDY #$01
4521 RTS
4522
4523 .BYTE $80,$00,$00,$00,$00
4524 fE20A .BYTE $FA
4525 fE20B .BYTE $0A
4526 fE20C .BYTE $1F
4527 fE20D .BYTE $00,$00,$98,$96,$80,$FF,$F0,$BD
4528 .BYTE $C0,$00,$01,$86,$A0,$FF,$FF,$D8
4529 .BYTE $F0,$00,$00,$03,$E8,$FF,$FF,$FF
4530 .BYTE $9C,$00,$00,$00,$0A
4531 EXP .BYTE $FF,$FF,$FF,$FF
4532 SQR JSR sDEE5
4533 LDA #$05
4534 LDY #$E2
4535 JSR sDE7B
4536 BEQ bE2AA
4537 LDA $D8
4538 BNE bE241
4539 JMP jDBB4
4540
4541 bE241 LDX #$BD
4542 LDY #$00
4543 JSR sDEAD
4544 LDA $DD
4545 BPL bE25B
4546 JSR INT
4547 LDA #$BD
4548 LDY #$00
4549 JSR CompareFPA
4550 BNE bE25B
4551 TYA
4552 LDY $24
4553 bE25B JSR sDED7
4554 TYA
4555 PHA
4556 JSR LN
4557 LDA #$BD
4558 LDY #$00
4559 JSR sDCED
4560 JSR bE2AA
4561 PLA
4562 LSR
4563 BCC bE27B
4564 jE271 LDA $D0
4565 BEQ bE27B
4566 LDA $D5
4567 EOR #$FF
4568 STA $D5
4569 bE27B RTS
4570
4571 ExpData .BYTE $81,$38,$AA,$3B,$29,$07,$71,$34
4572 .BYTE $58,$3E,$56,$74,$16,$7E,$B3,$1B
4573 .BYTE $77,$2F,$EE,$E3,$85,$7A,$1D,$84
4574 .BYTE $1C,$2A,$7C,$63,$59,$58,$0A,$7E
4575 .BYTE $75,$FD,$E7,$C6,$80,$31,$72,$18
4576 .BYTE $10,$81,$00,$00,$00,$00
4577 bE2AA LDA #$7C
4578 LDY #$E2
4579 JSR sDCED
4580 LDA $DF
4581 ADC #$50
4582 BCC bE2BA
4583 JSR sDEFC
4584 bE2BA STA $C5
4585 JSR sDEE8
4586 LDA $D0
4587 CMP #$88
4588 BCC bE2C8
4589 bE2C5 JSR sDD99
4590 bE2C8 JSR INT
4591 LDA $24
4592 CLC
4593 ADC #$81
4594 BEQ bE2C5
4595 SEC
4596 SBC #$01
4597 PHA
4598 LDX #$05
4599 bE2D8 LDA fD8,X
4600 LDY fD0,X
4601 STA fD0,X
4602 STY fD8,X
4603 DEX
4604 BPL bE2D8
4605 LDA $C5
4606 STA $DF
4607 JSR sDB0E
4608 JSR jE271
4609 LDA #$81
4610 LDY #$E2
4611 JSR SeriesEval
4612 LDA #$00
4613 STA $DE
4614 PLA
4615 JSR sDD7E
4616 RTS
4617
4618 sE2FD STA $E0
4619 STY $E1
4620 JSR sDEA3
4621 LDA #$C6
4622 JSR sDCED
4623 JSR sE317
4624 LDA #$C6
4625 LDY #$00
4626 JMP sDCED
4627
4628 SeriesEval STA $E0
4629 STY $E1
4630 sE317 JSR sDEA0
4631 LDA (pE0),Y
4632 STA $D6
4633 LDY $E0
4634 INY
4635 TYA
4636 BNE bE326
4637 INC $E1
4638 bE326 STA $E0
4639 LDY $E1
4640 bE32A JSR sDCED
4641 LDA $E0
4642 LDY $E1
4643 CLC
4644 ADC #$05
4645 BCC bE337
4646 INY
4647 bE337 STA $E0
4648 STY $E1
4649 JSR sDB22
4650 LDA #$CB
4651 LDY #$00
4652 DEC $D6
4653 BNE bE32A
4654 bE346 RTS
4655
4656 TYA
4657 AND f44,X
4658 .BYTE $7A
4659 PLA
4660 PLP
4661 LDA (p46),Y
4662 RND JSR GetSign
4663 TAX
4664 BMI bE36D
4665 LDA #$FA
4666 LDY #$00
4667 JSR sDE7B
4668 TXA
4669 BEQ bE346
4670 LDA #$47
4671 LDY #$E3
4672 JSR sDCED
4673 LDA #$4B
4674 LDY #$E3
4675 JSR sDB22
4676 bE36D LDX $D4
4677 LDA $D1
4678 STA $D4
4679 STX $D1
4680 LDA #$00
4681 STA $D5
4682 LDA $D0
4683 STA $DF
4684 LDA #$80
4685 STA $D0
4686 JSR Normalise
4687 LDX #$FA
4688 LDY #$00
4689 sE388 JMP sDEAD
4690
4691 COS LDA #$07
4692 LDY #$E4
4693 JSR sDB22
4694 SIN JSR sDEE5
4695 LDA #$0C
4696 LDY #$E4
4697 LDX $DD
4698 JSR sDDCC
4699 JSR sDEE5
4700 JSR INT
4701 LDA #$00
4702 STA $DE
4703 JSR sDB0E
4704 LDA #$11
4705 LDY #$E4
4706 JSR sDB0B
4707 LDA $D5
4708 PHA
4709 BPL bE3C4
4710 JSR sDB04
4711 LDA $D5
4712 BMI bE3C7
4713 LDA $2D
4714 EOR #$FF
4715 STA $2D
4716 bE3C4 JSR jE271
4717 bE3C7 LDA #$11
4718 LDY #$E4
4719 JSR sDB22
4720 PLA
4721 BPL bE3D4
4722 JSR jE271
4723 bE3D4 LDA #$16
4724 LDY #$E4
4725 JMP sE2FD
4726
4727 JSR sDEA3
4728 LDA #$00
4729 STA $2D
4730 JSR SIN
4731 LDX #$BD
4732 LDY #$00
4733 JSR sE388
4734 LDA #$C6
4735 LDY #$00
4736 JSR sDE7B
4737 LDA #$00
4738 STA $D5
4739 LDA $2D
4740 JSR sE403
4741 LDA #$BD
4742 LDY #$00
4743 JMP sDDE4
4744
4745 sE403 PHA
4746 JMP bE3C4
4747
4748 TrigData .BYTE $81,$49,$0F,$DA,$A2,$83,$49,$0F
4749 .BYTE $DA,$A2,$7F,$00,$00,$00,$00,$05
4750 .BYTE $84,$E6,$1A,$2D,$1B,$86,$28,$07
4751 .BYTE $FB,$F8,$87,$99,$68,$89,$01,$87
4752 .BYTE $23,$35,$DF,$E1,$86,$A5,$5D,$E7
4753 .BYTE $28,$83,$49,$0F,$DA,$A2,$A1,$54
4754 .BYTE $46,$8F,$13,$8F,$52,$43,$89,$CD
4755 ATN LDA $D5
4756 PHA
4757 BPL bE447
4758 JSR jE271
4759 bE447 LDA $D0
4760 PHA
4761 CMP #$81
4762 BCC bE455
4763 LDA #$81
4764 LDY #$DC
4765 JSR sDDE4
4766 bE455 LDA #$6F
4767 LDY #$E4
4768 JSR sE2FD
4769 PLA
4770 CMP #$81
4771 BCC bE468
4772 LDA #$07
4773 LDY #$E4
4774 JSR sDB0B
4775 bE468 PLA
4776 BPL bE46E
4777 JMP jE271
4778
4779 bE46E RTS
4780
4781 ATNData .BYTE $0B,$76,$B3,$83,$BD,$D3,$79,$1E
4782 .BYTE $F4,$A6,$F5,$7B,$83,$FC,$B0,$10
4783 .BYTE $7C,$0C,$1F,$67,$CA,$7C,$DE,$53
4784 .BYTE $CB,$C1,$7D,$14,$64,$70,$4C,$7D
4785 .BYTE $B7,$EA,$51,$7A,$7D,$63,$30,$88
4786 .BYTE $7E,$7E,$92,$44,$99,$3A,$7E,$4C
4787 .BYTE $CC,$91,$C7,$7F,$AA,$AA,$AA,$13
4788 .BYTE $81,$00,$00,$00,$00
4789 TapeSync JSR SyncTape
4790 bE4AF JSR GetTapeByte
4791 CMP #$24
4792 BNE bE4AF
4793 STX $02B1
4794 LDX #$09
4795 bE4BB JSR GetTapeByte
4796 STA f02A7,X
4797 DEX
4798 BNE bE4BB
4799 bE4C4 JSR GetTapeByte
4800 BEQ bE4D3
4801 CPX #$10
4802 BCS bE4C4
4803 STA f0293,X
4804 INX
4805 BNE bE4C4
4806 bE4D3 STA f0293,X
4807 JSR PrintFound
4808 JSR sE790
4809 TXA
4810 BNE TapeSync
4811 RTS
4812
4813 GetTapeData LDA $02A9
4814 LDY $02AA
4815 STA $33
4816 STY $34
4817 LDY #$00
4818 bE4EC JSR GetTapeByte
4819 LDX $025B
4820 VERIFY BNE bE4F9
4821 STA (p33),Y
4822 JMP jE505
4823
4824 bE4F9 CMP (p33),Y
4825 BEQ jE505
4826 INC $025C
4827 BNE jE505
4828 INC $025D
4829 jE505 JSR IncTapeCount
4830 BCC bE4EC
4831 RTS
4832
4833 .BYTE $10,$07,$53,$65,$61,$72,$63,$68
4834 .BYTE $69,$6E,$67,$20,$2E,$2E,$00,$10
4835 .BYTE $07,$4C,$6F,$61,$64,$69,$6E,$67
4836 .BYTE $20,$2E,$2E,$00,$0A,$0D,$45,$72
4837 .BYTE $72,$6F,$72,$73,$20,$66,$6F,$75
4838 .BYTE $6E,$64,$0D,$0A,$00,$10,$07,$46
4839 .BYTE $6F,$75,$6E,$64,$20,$2E,$2E,$00
4840 .BYTE $10,$07,$56,$65,$72,$69,$66,$79
4841 .BYTE $69,$6E,$67,$20,$2E,$2E,$00,$20
4842 .BYTE $56,$65,$72,$69,$66,$79,$20,$65
4843 .BYTE $72,$72,$6F,$72,$73,$20,$64,$65
4844 .BYTE $74,$65,$63,$74,$65,$64,$0D,$0A
4845 .BYTE $00
4846 IncTapeCount LDA $33
4847 CMP $02AB
4848 LDA $34
4849 SBC $02AC
4850 INC $33
4851 BNE bE57C
4852 INC $34
4853 bE57C RTS
4854
4855 PrintSearching LDA #$0B
4856 LDY #$E5
4857 JSR ClrStatus
4858 RTS
4859
4860 PrintSaving LDA #$45
4861 LDY #$E6
4862 JSR ClrStatus
4863 PrintFName LDA #$7F
4864 LDY #$02
4865 JSR PrintMsg
4866 RTS
4867
4868 PrintFound LDA #$38
4869 LDY #$E5
4870 JMP PrintVerifying
4871
4872 sE59B LDA $025B
4873 BNE bE5A7
4874 LDA #$1A
4875 aE5A2 LDY #$E5
4876 PrintLoading JMP PrintVerifying
4877
4878 bE5A7 LDA #$43
4879 LDY #$E5
4880 PrintVerifying JSR ClrStatus
4881 LDA #$93
4882 LDY #$02
4883 JSR PrintMsg
4884 RTS
4885
4886 PrintMsg JSR PrintStatus
4887 INX
4888 LDY #$00
4889 STY $025F
4890 LDA $02AE
4891 BEQ bE5D7
4892 INY
4893 BIT $02AE
4894 BMI bE5D7
4895 INY
4896 BIT $02AF
4897 BMI bE5D7
4898 INY
4899 BIT $02B0
4900 BMI bE5D7
4901 INY
4902 bE5D7 LDA fE5E5,Y
4903 STA $025E
4904 LDA #$5E
4905 LDY #$02
4906 JSR PrintStatus
4907 RTS
4908
4909 fE5E5 .BYTE $42,$43,$53,$49,$52
4910 ClrStatus JSR ClrTapeStatus
4911 LDX #$00
4912 JSR PrintStatus
4913 INX
4914 INX
4915 RTS
4916
4917 ClrTapeStatus PHA
4918 LDA $021F
4919 BNE bE605
4920 LDX #$22
4921 LDA #$10
4922 bE5FF STA fBB80,X
4923 DEX
4924 BPL bE5FF
4925 bE605 PLA
4926 RTS
4927
4928 WriteFileHeader JSR WriteLeader
4929 LDA #$24
4930 JSR PutTapeByte
4931 LDX #$09
4932 bE611 LDA f02A7,X
4933 JSR PutTapeByte
4934 DEX
4935 BNE bE611
4936 bE61A LDA f027F,X
4937 BEQ bE625
4938 JSR PutTapeByte
4939 INX
4940 BNE bE61A
4941 bE625 JSR PutTapeByte
4942 LDX #$00
4943 bE62A DEX
4944 BNE bE62A
4945 RTS
4946
4947 sE62E LDA $02A9
4948 LDY $02AA
4949 STA $33
4950 STY $34
4951 LDY #$00
4952 bE63A LDA (p33),Y
4953 JSR PutTapeByte
4954 JSR IncTapeCount
4955 BCC bE63A
4956 RTS
4957
4958 .BYTE $10,$07,$53,$61,$76,$69,$6E,$67
4959 .BYTE $20,$2E,$2E,$00
4960 sE651 LDA $02B1
4961 BEQ bE65D
4962 LDA #$27
4963 LDY #$E5
4964 JSR PrintString
4965 bE65D RTS
4966
4967 PutTapeByte STA $2F
4968 TXA
4969 PHA
4970 TYA
4971 PHA
4972 JSR sE6C0
4973 CLC
4974 LDY #$09
4975 LDA #$00
4976 BEQ bE674
4977 bE66E LSR $2F
4978 PHP
4979 ADC #$00
4980 PLP
4981 bE674 JSR sE68B
4982 DEY
4983 BNE bE66E
4984 EOR #$01
4985 LSR
4986 LDY #$04
4987 bE67F JSR sE68B
4988 SEC
4989 DEY
4990 BNE bE67F
4991 PLA
4992 TAY
4993 PLA
4994 TAX
4995 RTS
4996
4997 sE68B PHA
4998 PHP
4999 LDA $024D
5000 BNE bE69C
5001 SEC
5002 JSR sE6B2
5003 PLP
5004 JSR sE6B2
5005 PLA
5006 RTS
5007
5008 bE69C JSR sE6B2
5009 LDX #$0F
5010 PLP
5011 BCS bE6A6
5012 LDX #$07
5013 bE6A6 JSR sE6AB
5014 PLA
5015 RTS
5016
5017 sE6AB JSR sE6C0
5018 DEX
5019 BNE sE6AB
5020 RTS
5021
5022 sE6B2 LDA #$D0
5023 LDX #$00
5024 BCS bE6BA
5025 ASL
5026 INX
5027 bE6BA STA $0306
5028 STX $0307
5029 sE6C0 LDA $0304
5030 bE6C3 BIT $030D
5031 BVC bE6C3
5032 RTS
5033
5034 GetTapeByte TYA
5035 PHA
5036 TXA
5037 PHA
5038 JSR sE71C
5039 bE6D0 JSR sE71C
5040 BCS bE6D0
5041 JSR sE6FF
5042 BCS bE6F0
5043 LDA #$00
5044 LDY #$08
5045 bE6DE JSR sE6FC
5046 PHP
5047 ROR $2F
5048 PLP
5049 ADC #$00
5050 DEY
5051 BNE bE6DE
5052 JSR sE6FC
5053 SBC #$00
5054 LSR
5055 bE6F0 BCC bE6F5
5056 ROL $02B1
5057 bE6F5 PLA
5058 TAX
5059 PLA
5060 TAY
5061 LDA $2F
5062 RTS
5063
5064 sE6FC JSR sE71C
5065 sE6FF PHA
5066 LDA $024D
5067 BEQ bE71A
5068 JSR sE71C
5069 LDX #$02
5070 BCC bE70E
5071 LDX #$06
5072 bE70E LDA #$00
5073 bE710 JSR sE71C
5074 ADC #$00
5075 DEX
5076 BNE bE710
5077 CMP #$04
5078 bE71A PLA
5079 RTS
5080
5081 sE71C PHA
5082 LDA $0300
5083 bE720 LDA $030D
5084 AND #$10
5085 BEQ bE720
5086 LDA $0309
5087 PHA
5088 LDA #$FF
5089 STA $0309
5090 PLA
5091 CMP #$FE
5092 PLA
5093 RTS
5094
5095 SyncTape JSR sE6FC
5096 ROR $2F
5097 LDA #$16
5098 CMP $2F
5099 BNE SyncTape
5100 LDA $024D
5101 BEQ bE74D
5102 JSR sE71C
5103 bE748 JSR sE71C
5104 BCS bE748
5105 bE74D LDX #$03
5106 bE74F JSR GetTapeByte
5107 CMP #$16
5108 BNE SyncTape
5109 DEX
5110 BNE bE74F
5111 RTS
5112
5113 WriteLeader LDX #$02
5114 LDY #$03
5115 bE75E LDA #$16
5116 JSR PutTapeByte
5117 DEY
5118 BNE bE75E
5119 DEX
5120 BNE bE75E
5121 RTS
5122
5123 SetupTape JSR StopTimer
5124 LDY #$06
5125 SEI
5126 bE770 LDX fE782,Y
5127 LDA fE789,Y
5128 STA $0300,X
5129 DEY
5130 BPL bE770
5131 LDA #$40
5132 STA $0300
5133 RTS
5134
5135 fE782 .BYTE $05,$04,$0B,$02,$0C,$08,$0E
5136 fE789 .BYTE $00,$D0,$C0,$FF,$10,$F4,$7F
5137 sE790 LDY #$00
5138 LDX #$00
5139 LDA f027F
5140 BEQ bE7AE
5141 bE799 LDA f027F,Y
5142 CMP f0293,Y
5143 BEQ bE7A2
5144 INX
5145 bE7A2 STA f0293,Y
5146 INY
5147 CPY #$11
5148 BCS bE7AE
5149 PHA
5150 PLA
5151 BNE bE799
5152 bE7AE RTS
5153
5154 bE7AF JMP jD070
5155
5156 GetTapeParams LDA #$00
5157 STA $024D
5158 STA $02AD
5159 STA $02AE
5160 STA $025B
5161 STA $025A
5162 STA $025C
5163 STA $025D
5164 STA $02B1
5165 JSR EvalExpr
5166 BIT $28
5167 BPL bE7AF
5168 JSR sD7D0
5169 TAX
5170 LDY #$00
5171 INX
5172 bE7DA DEX
5173 BEQ bE7E7
5174 LDA (p91),Y
5175 STA f027F,Y
5176 INY
5177 CPY #$10
5178 BNE bE7DA
5179 bE7E7 LDA #$00
5180 STA f027F,Y
5181 bE7EC JSR $00E8
5182 BEQ bE852
5183 CMP #$2C
5184 BNE bE7AF
5185 bE7F5 JSR $00E2
5186 BEQ bE852
5187 CMP #$2C
5188 BEQ bE7F5
5189 CMP #$C7
5190 BNE bE807
5191 STA $02AD
5192 BCS bE7F5
5193 bE807 CMP #$53
5194 BNE bE810
5195 STA $024D
5196 BCS bE7F5
5197 bE810 CMP #$56
5198 BNE bE819
5199 STA $025B
5200 BCS bE7F5
5201 bE819 CMP #$4A
5202 BNE bE822
5203 STA $025A
5204 BCS bE7F5
5205 bE822 CMP #$41
5206 BEQ bE82A
5207 CMP #$45
5208 BNE bE871
5209 bE82A STA $0E
5210 JSR $00E2
5211 LDX #$80
5212 STX $02AE
5213 JSR sE853
5214 LDA $33
5215 LDY $34
5216 LDX $0E
5217 CPX #$41
5218 BNE bE849
5219 STA $02A9
5220 STY $02AA
5221 BCS bE7EC
5222 bE849 STA $02AB
5223 STY $02AC
5224 JMP bE7EC
5225
5226 bE852 RTS
5227
5228 sE853 JSR GetExpr
5229 JSR FP2Int
5230 CLC
5231 RTS
5232
5233 CLOAD PHP
5234 JSR GetTapeParams
5235 LDA $02AD
5236 ORA $02AE
5237 BNE bE871
5238 LDA $025A
5239 BEQ bE874
5240 LDA $025B
5241 BEQ bE874
5242 bE871 JMP jD070
5243
5244 bE874 JSR SetupTape
5245 JSR PrintSearching
5246 bE87A JSR TapeSync
5247 BIT $02AE
5248 BVS bE87A
5249 LDA $025A
5250 BEQ bE8B3
5251 LDA $02AE
5252 BNE bE87A
5253 LDA $9C
5254 LDY $9D
5255 SEC
5256 SBC #$02
5257 BCS bE896
5258 DEY
5259 bE896 STA $02A9
5260 STY $02AA
5261 SEC
5262 SBC $9A
5263 TAX
5264 TYA
5265 SBC $9B
5266 TAY
5267 CLC
5268 TXA
5269 ADC $02AB
5270 STA $02AB
5271 TYA
5272 ADC $02AC
5273 STA $02AC
5274 bE8B3 JSR sE59B
5275 JSR GetTapeData
5276 JSR sE93D
5277 PLP
5278 LDA $025B
5279 BEQ bE8D3
5280 LDX $025C
5281 LDA $025D
5282 JSR PrintInt
5283 LDA #$52
5284 LDY #$E5
5285 JSR PrintString
5286 RTS
5287
5288 bE8D3 JSR sE651
5289 LDA $02AE
5290 BEQ bE8E9
5291 LDA $02AD
5292 BEQ bE8E8
5293 LDA $02B1
5294 NOP
5295 NOP
5296 JMP (a02A9)
5297
5298 bE8E8 RTS
5299
5300 bE8E9 LDX $02AB
5301 LDA $02AC
5302 STX $9C
5303 STA $9D
5304 JSR SetLineLinkPtrs
5305 LDA $02AD
5306 BEQ bE903
5307 LDA $02B1
5308 NOP
5309 NOP
5310 JMP sC708
5311
5312 bE903 JSR sC708
5313 JMP BackToBASIC
5314
5315 CSAVE LDA $9A
5316 LDY $9B
5317 STA $02A9
5318 STY $02AA
5319 LDA $9C
5320 LDY $9D
5321 STA $02AB
5322 STY $02AC
5323 PHP
5324 JSR GetTapeParams
5325 LDA $025A
5326 ORA $025B
5327 BEQ bE92C
5328 JMP jD070
5329
5330 bE92C JSR SetupTape
5331 JSR PrintSaving
5332 JSR WriteFileHeader
5333 JSR sE62E
5334 JSR sE93D
5335 PLP
5336 RTS
5337
5338 sE93D JSR ClrTapeStatus
5339 JSR ResetVIA
5340 JMP SetupTimer
5341
5342 CALL JSR sE853
5343 JMP (f0033)
5344
5345 sE94C LDX #$00
5346 STX $0C
5347 STX $0D
5348 BEQ bE967
5349 bE954 LDX #$03
5350 ASL
5351 ASL
5352 ASL
5353 ASL
5354 bE95A ASL
5355 ROL $0C
5356 ROL $0D
5357 BCC bE964
5358 JMP bDC39
5359
5360 bE964 DEX
5361 BPL bE95A
5362 bE967 JSR $00E2
5363 CMP #$80
5364 BCS bE97C
5365 ORA #$80
5366 EOR #$B0
5367 CMP #$0A
5368 BCC bE954
5369 ADC #$88
5370 CMP #$FA
5371 BCS bE954
5372 bE97C LDA $0D
5373 LDY $0C
5374 RTS
5375
5376 jE981 JSR sE94C
5377 JMP jDF40
5378
5379 STORE PHP
5380 JSR sEA57
5381 LDA #$40
5382 STA $02AE
5383 LDA $28
5384 STA $02AF
5385 LDA $29
5386 STA $02B0
5387 JSR PrintSaving
5388 JSR WriteFileHeader
5389 JSR sEA9E
5390 JSR sE62E
5391 BIT $28
5392 BPL bE9CC
5393 bE9AA LDY #$00
5394 LDA (p0C),Y
5395 BEQ bE9C7
5396 TAX
5397 LDY #$02
5398 bE9B3 LDA (p0C),Y
5399 STA pD0,Y
5400 DEY
5401 BNE bE9B3
5402 INX
5403 bE9BC DEX
5404 BEQ bE9C7
5405 LDA (pD1),Y
5406 JSR PutTapeByte
5407 INY
5408 BNE bE9BC
5409 bE9C7 JSR sEA42
5410 BCC bE9AA
5411 bE9CC JSR sE93D
5412 PLP
5413 RTS
5414
5415 RECALL JSR GarbageCollect
5416 PHP
5417 JSR sEA57
5418 JSR PrintSearching
5419 bE9DB JSR TapeSync
5420 BIT $02AE
5421 BVC bE9DB
5422 LDA $02AF
5423 EOR $28
5424 BNE bE9DB
5425 LDA $02B0
5426 EOR $29
5427 BNE bE9DB
5428 JSR sE59B
5429 LDY #$02
5430 LDA (pCE),Y
5431 CMP $02A9
5432 INY
5433 LDA (pCE),Y
5434 SBC $02AA
5435 BCS bEA09
5436 JSR sE93D
5437 JMP PrintError
5438
5439 bEA09 JSR sEA9E
5440 JSR GetTapeData
5441 BIT $28
5442 BPL bEA3A
5443 bEA13 LDY #$00
5444 LDA (p0C),Y
5445 BEQ bEA35
5446 JSR sD5AB
5447 LDY #$00
5448 TAX
5449 INX
5450 bEA20 DEX
5451 BEQ bEA2B
5452 JSR GetTapeByte
5453 STA (pD1),Y
5454 INY
5455 BNE bEA20
5456 bEA2B LDY #$02
5457 bEA2D LDA pD0,Y
5458 STA (p0C),Y
5459 DEY
5460 BNE bEA2D
5461 bEA35 JSR sEA42
5462 BCC bEA13
5463 bEA3A JSR sE93D
5464 JSR sE651
5465 PLP
5466 RTS
5467
5468 sEA42 CLC
5469 LDA #$03
5470 ADC $0C
5471 STA $0C
5472 BCC bEA4D
5473 INC $0D
5474 bEA4D TAY
5475 LDA $0D
5476 CPY $02AB
5477 SBC $02AC
5478 RTS
5479
5480 sEA57 LDA #$40
5481 STA $2B
5482 JSR GetVarFromText
5483 LDA #$00
5484 aEA60 STA $2B
5485 LDY #$03
5486 LDA (pCE),Y
5487 STA $02AA
5488 DEY
5489 LDA (pCE),Y
5490 STA $02A9
5491 BNE bEA74
5492 DEC $02AA
5493 bEA74 DEC $02A9
5494 JSR sD065
5495 LDA $29
5496 PHA
5497 LDA $28
5498 PHA
5499 JSR GetTapeParams
5500 PLA
5501 STA $28
5502 PLA
5503 STA $29
5504 LDA $025B
5505 ORA $02AD
5506 ORA $02AE
5507 ORA $025A
5508 BEQ bEA9A
5509 JMP jD070
5510
5511 bEA9A JSR SetupTape
5512 RTS
5513
5514 sEA9E CLC
5515 LDA $CE
5516 ADC $02A9
5517 STA $02AB
5518 LDA $CF
5519 ADC $02AA
5520 STA $02AC
5521 LDY #$04
5522 LDA (pCE),Y
5523 JSR sD288
5524 STA $02A9
5525 STY $02AA
5526 STA $0C
5527 STY $0D
5528 RTS
5529
5530 fEAC1 .BYTE $3F
5531 fEAC2 .BYTE $FB,$17,$FC,$CF,$FB,$C7,$F0,$FC
5532 .BYTE $F0,$0F,$F1,$7E,$F3,$1C,$F1,$67
5533 .BYTE $F2,$2C,$F1,$03,$F2,$0F,$F2
5534 fEAD9 .BYTE $03,$04,$04,$03,$03,$03,$02,$01
5535 .BYTE $03,$03,$01,$01
5536 fEAE5 .BYTE $00,$00,$00,$00,$01,$01,$00,$00
5537 .BYTE $00,$00,$00
5538 HiresTest LDA $02C0
5539 AND #$01
5540 BNE bEAFC
5541 jEAF7 LDX #$A3
5542 JMP jC47E
5543
5544 bEAFC CPY #$4E
5545 BCS bEB03
5546 bEB00 JMP jD070
5547
5548 bEB03 CPY #$66
5549 BCS bEB00
5550 TYA
5551 SEC
5552 SBC #$4E
5553 TAY
5554 LDA fEAC2,Y
5555 PHA
5556 LDA fEAC1,Y
5557 PHA
5558 TYA
5559 LSR
5560 TAY
5561 LDA fEAD9,Y
5562 PHA
5563 LDA fEAE5,Y
5564 STA $02C3
5565 LDA #$00
5566 STA $02F0
5567 jEB26 JSR GetExpr
5568 LDA $02C3
5569 BNE bEB34
5570 JSR FP2Int
5571 JMP jEB3B
5572
5573 bEB34 LDA $D0
5574 CMP #$90
5575 JSR sD92A
5576 jEB3B LDY $02F0
5577 LDA $33
5578 STA f02E1,Y
5579 LDA $34
5580 STA f02E2,Y
5581 INY
5582 INY
5583 STY $02F0
5584 PLA
5585 TAY
5586 DEY
5587 BEQ bEB5A
5588 TYA
5589 PHA
5590 JSR sD065
5591 JMP jEB26
5592
5593 bEB5A LDA #$00
5594 STA $02E0
5595 PLA
5596 TAX
5597 PLA
5598 TAY
5599 LDA #$EB
5600 PHA
5601 LDA #$6D
5602 PHA
5603 TYA
5604 PHA
5605 TXA
5606 PHA
5607 bEB6D RTS
5608
5609 LDA #$01
5610 BIT $02E0
5611 BEQ bEB6D
5612 JMP jD336
5613
5614 CheckKbd LDA $02DF
5615 BPL bEB88
5616 PHP
5617 AND #$7F
5618 PHA
5619 LDA #$00
5620 STA $02DF
5621 PLA
5622 PLP
5623 bEB88 RTS
5624
5625 sEB89 CPY $9D
5626 BCS bEB8F
5627 bEB8D SEC
5628 bEB8E RTS
5629
5630 bEB8F BNE bEB97
5631 CMP $9C
5632 BCC bEB8E
5633 BEQ bEB8E
5634 bEB97 JSR sEBB5
5635 BCC bEB8E
5636 TAX
5637 LDA $02C0
5638 AND #$02
5639 PHP
5640 TXA
5641 PLP
5642 BNE bEB8D
5643 TYA
5644 PHA
5645 SEC
5646 SBC #$1C
5647 TAY
5648 TXA
5649 JSR sEBB5
5650 PLA
5651 TAY
5652 TXA
5653 RTS
5654
5655 sEBB5 CPY $02C2
5656 BCC bEBBC
5657 BEQ bEBBD
5658 bEBBC RTS
5659
5660 bEBBD CMP $02C1
5661 RTS
5662
5663 sEBC1 LDY $02C2
5664 LDA $02C1
5665 BNE bEBCA
5666 DEY
5667 bEBCA SEC
5668 SBC #$01
5669 RTS
5670
5671 HIMEM JSR GetExpr
5672 JSR FP2Int
5673 LDA $33
5674 LDY $34
5675 JSR sEB89
5676 BCC bEBE0
5677 bEBDD JMP PrintError
5678
5679 bEBE0 STA $A6
5680 STY $A7
5681 JMP sC70F
5682
5683 LDA $0260
5684 BNE bEBDD
5685 LDA $02C0
5686 PHA
5687 AND #$01
5688 BEQ bEBF9
5689 bEBF4 LDX #$A3
5690 JMP jC47E
5691
5692 bEBF9 PLA
5693 AND #$FD
5694 STA $02C0
5695 JSR sEBC1
5696 PHA
5697 TYA
5698 CLC
5699 ADC #$1C
5700 TAY
5701 PLA
5702 JMP bEBE0
5703
5704 RELEASE JSR sEBC1
5705 JSR sEB89
5706 BCS bEBDD
5707 PHA
5708 LDA $02C0
5709 ORA #$02
5710 STA $02C0
5711 PLA
5712 JMP bEBE0
5713
5714 TEXT LDA $02C0
5715 TAY
5716 AND #$01
5717 BEQ bEC32
5718 TYA
5719 AND #$FE
5720 STA $02C0
5721 JSR LoresMode
5722 bEC32 RTS
5723
5724 HIRES LDA $02C0
5725 PHA
5726 AND #$02
5727 BEQ bEBF4
5728 PLA
5729 ORA #$01
5730 STA $02C0
5731 JSR HiresMode
5732 RTS
5733
5734 POINT JSR sD062
5735 JSR EvalExpr
5736 LDA $34
5737 PHA
5738 LDA $33
5739 PHA
5740 JSR FP2Int
5741 LDA $33
5742 STA f02E1
5743 LDA $34
5744 STA f02E2
5745 PLA
5746 STA $33
5747 PLA
5748 STA $34
5749 JSR sD065
5750 JSR EvalExpr
5751 LDA $34
5752 PHA
5753 LDA $33
5754 PHA
5755 JSR FP2Int
5756 LDA $34
5757 STA $02E4
5758 LDA $33
5759 STA $02E3
5760 PLA
5761 STA $33
5762 PLA
5763 STA $34
5764 JSR sF1C8
5765 LDY f02E1
5766 LDA $02E0
5767 AND #$01
5768 BNE bEC99
5769 LDA f02E2
5770 JSR jD499
5771 JMP sD05F
5772
5773 fEC9B =*+$02
5774 bEC99 JMP jD8C2
5775
5776 bEC9C INC $E9
5777 BNE bECA2
5778 INC $EA
5779 bECA2 LDA $EA60
5780 CMP #$20
5781 BEQ bEC9C
5782 JSR sECB9
5783 RTS
5784
5785 BIT $EA60
5786 BIT $EA60
5787 RTS
5788
5789 .BYTE $80,$4F
5790 .BYTE $C7,$52
5791 CLI
5792 sECB9 CMP #$C8
5793 BEQ bECCB
5794 CMP #$27
5795 BEQ bECCB
5796 CMP #$3A
5797 BCS bECCB
5798 SEC
5799 SBC #$30
5800 SEC
5801 SBC #$D0
5802 bECCB RTS
5803
5804 StartBASIC CLD
5805 LDX #$FF
5806 STX $A9
5807 TXS
5808 LDA #<StartBASIC
5809 LDY #>StartBASIC
5810 STA $1B
5811 STY $1C
5812 LDA #$4C
5813 STA $1A
5814 STA $C3
5815 STA $21
5816 STA $02FB
5817 LDA #<jD336
5818 LDY #>jD336
5819 STA $22
5820 STY $23
5821 STA $02FC
5822 STY $02FD
5823 STA p02F5
5824 STY $02F6
5825 LDX #$1C
5826 bECFB LDA fEC9B,X
5827 STA fE1,X
5828 DEX
5829 BNE bECFB
5830 LDA #$03
5831 STA $C2
5832 TXA
5833 STA $D7
5834 STA $87
5835 STA $2F
5836 PHA
5837 STA $2E
5838 STA $02F2
5839 LDX #$88
5840 STX $85
5841 TAY
5842 LDA #$02
5843 STA $02C0
5844 LDA #>p2850
5845 STA $0257
5846 LDA #<p2850
5847 STA $0256
5848 LDA #$00
5849 STA $30
5850 STA $0258
5851 STA $0259
5852 JSR sC83E
5853 JSR ClrScr
5854 LDA #$96
5855 LDY #$ED
5856 JSR PrintString
5857 JSR NewLine
5858 LDX #<p0500
5859 LDY #>p0500
5860 STX $9A
5861 STY $9B
5862 LDY #$00
5863 TYA
5864 STA (p9A),Y
5865 INC $9A
5866 BNE bED55
5867 INC $9B
5868 bED55 JSR sC6F0
5869 LDA $9A
5870 LDY $9B
5871 JSR FreeMemCheck
5872 JSR NewLine
5873 LDA $A6
5874 SEC
5875 SBC $9A
5876 TAX
5877 LDA $A7
5878 SBC $9B
5879 JSR PrintInt
5880 LDA #$88
5881 LDY #$ED
5882 JSR PrintString
5883 LDA #<PrintString
5884 LDY #>PrintString
5885 STA $1B
5886 STY $1C
5887 LDA #$10
5888 STA $02F8
5889 JMP BackToBASIC
5890
5891 .BYTE $00,$00
5892 MessageBytesFree .BYTE $20,$42,$59,$54,$45,$53,$20,$46
5893 .BYTE $52,$45,$45,$0A,$0D,$00
5894 MessageOricExtendedBasic .BYTE $4F,$52,$49,$43,$20,$45,$58,$54
5895 .BYTE $45,$4E,$44,$45,$44,$20,$42,$41
5896 .BYTE $53,$49,$43,$20,$56,$31,$2E,$31
5897 .BYTE $0D,$0A,$60,$20,$31,$39,$38,$33
5898 .BYTE $20,$54,$41,$4E,$47,$45,$52,$49
5899 .BYTE $4E,$45,$0D,$0A,$00,$00
5900 CopyMem LDX #$00
5901 LDY #$00
5902 bEDC8 CPY $10
5903 BNE bEDD0
5904 CPX $11
5905 BEQ bEDDF
5906 bEDD0 LDA (p0C),Y
5907 STA (p0E),Y
5908 INY
5909 BNE bEDC8
5910 INC $0D
5911 INC $0F
5912 INX
5913 JMP bEDC8
5914
5915 bEDDF RTS
5916
5917 SetupTimer PHA
5918 JSR ResetTimer
5919 LDA #$00
5920 LDX #$00
5921 LDY #$03
5922 JSR SetTimer
5923 LDA #$01
5924 LDY #$19
5925 JSR SetTimer
5926 LDA #$00
5927 STA $0271
5928 LDA $030B
5929 AND #$7F
5930 ORA #$40
5931 STA $030B
5932 LDA #$C0
5933 STA $030E
5934 LDA #$10
5935 STA $0306
5936 STA $0304
5937 LDA #$27
5938 STA $0307
5939 STA $0305
5940 PLA
5941 RTS
5942
5943 StopTimer PHA
5944 LDA #$40
5945 STA $030E
5946 PLA
5947 RTS
5948
5949 IRQ PHA
5950 LDA $030D
5951 AND #$40
5952 BEQ bEE30
5953 STA $030D
5954 JSR sEE34
5955 bEE30 PLA
5956 JMP e024A
5957
5958 sEE34 PHA
5959 TXA
5960 PHA
5961 TYA
5962 PHA
5963 LDY #$00
5964 bEE3B LDA f0272,Y
5965 SEC
5966 SBC #$01
5967 STA f0272,Y
5968 INY
5969 LDA f0272,Y
5970 SBC #$00
5971 STA f0272,Y
5972 INY
5973 CPY #$06
5974 BNE bEE3B
5975 LDA #$00
5976 JSR GetTimer
5977 CPY #$00
5978 BNE bEE6B
5979 LDX #$00
5980 LDY #$03
5981 JSR SetTimer
5982 JSR ReadKbd
5983 TXA
5984 BPL bEE6B
5985 STX $02DF
5986 bEE6B LDA #$01
5987 JSR GetTimer
5988 CPY #$00
5989 BNE bEE86
5990 LDX #$00
5991 LDY #$19
5992 JSR SetTimer
5993 LDA $0271
5994 EOR #$01
5995 STA $0271
5996 JSR sF801
5997 bEE86 PLA
5998 TAY
5999 PLA
6000 TAX
6001 PLA
6002 RTS
6003
6004 ResetTimer PHA
6005 TYA
6006 PHA
6007 LDY #$05
6008 LDA #$00
6009 bEE93 STA f0272,Y
6010 DEY
6011 BPL bEE93
6012 PLA
6013 TAY
6014 PLA
6015 RTS
6016
6017 GetTimer PHA
6018 ASL
6019 TAY
6020 SEI
6021 LDA f0272,Y
6022 LDX f0273,Y
6023 CLI
6024 TAY
6025 PLA
6026 RTS
6027
6028 SetTimer PHA
6029 TXA
6030 PHA
6031 TYA
6032 PHA
6033 TSX
6034 LDA f0103,X
6035 ASL
6036 TAY
6037 PLA
6038 PHA
6039 SEI
6040 STA f0272,Y
6041 LDA f0102,X
6042 STA f0273,Y
6043 CLI
6044 PLA
6045 TAY
6046 PLA
6047 TAX
6048 PLA
6049 RTS
6050
6051 Delay JSR SetTimer
6052 bEECC JSR GetTimer
6053 CPY #$00
6054 BNE bEECC
6055 CPX #$00
6056 BNE bEECC
6057 RTS
6058
6059 sEED8 LDA $0213
6060 STA $0214
6061 sEEDE LSR $0212
6062 ROR $0212
6063 ROR $0212
6064 RTS
6065
6066 WritePixel PHA
6067 TYA
6068 PHA
6069 JSR sEEDE
6070 JSR sF049
6071 JSR sF024
6072 PLA
6073 TAY
6074 PLA
6075 RTS
6076
6077 DrawLine CLD
6078 JSR sEED8
6079 BIT f02E2
6080 BPL bEF0B
6081 LDA #$FF
6082 EOR f02E1
6083 TAX
6084 INX
6085 STX f02E1
6086 bEF0B BIT $02E4
6087 BPL bEF1A
6088 LDA #$FF
6089 EOR $02E3
6090 TAX
6091 INX
6092 STX $02E3
6093 bEF1A LDA f02E1
6094 CMP $02E3
6095 BCC bEF31
6096 LDX f02E1
6097 BEQ bEF30
6098 LDA $02E3
6099 JSR sEF40
6100 JSR sEF84
6101 bEF30 RTS
6102
6103 bEF31 LDX $02E3
6104 BEQ bEF3F
6105 LDA f02E1
6106 JSR sEF40
6107 JSR sEF5C
6108 bEF3F RTS
6109
6110 sEF40 STA $0D
6111 STX $0200
6112 LDA #$00
6113 STA $0C
6114 STA $0201
6115 JSR sEFC8
6116 JSR sEFFA
6117 LDA #$00
6118 STA $0E
6119 STA $0F
6120 STA $0200
6121 RTS
6122
6123 sEF5C BIT $02E4
6124 BPL bEF67
6125 JSR sF095
6126 JMP jEF6A
6127
6128 bEF67 JSR sF089
6129 jEF6A JSR sEFAC
6130 BEQ bEF7D
6131 BIT f02E2
6132 BPL bEF7A
6133 JSR sF0B2
6134 JMP bEF7D
6135
6136 bEF7A JSR sF0A1
6137 bEF7D JSR sF016
6138 DEX
6139 BNE sEF5C
6140 RTS
6141
6142 sEF84 BIT f02E2
6143 BPL bEF8F
6144 JSR sF0B2
6145 JMP jEF92
6146
6147 bEF8F JSR sF0A1
6148 jEF92 JSR sEFAC
6149 BEQ bEFA5
6150 BIT $02E4
6151 BPL bEFA2
6152 JSR sF095
6153 JMP bEFA5
6154
6155 bEFA2 JSR sF089
6156 bEFA5 JSR sF016
6157 DEX
6158 BNE sEF84
6159 RTS
6160
6161 sEFAC CLD
6162 CLC
6163 LDA $0E
6164 ADC $0C
6165 STA $0E
6166 LDA $0F
6167 ADC $0D
6168 STA $0F
6169 BIT $0E
6170 BPL bEFC1
6171 CLC
6172 ADC #$01
6173 bEFC1 CMP $0200
6174 STA $0200
6175 RTS
6176
6177 sEFC8 PHA
6178 TXA
6179 PHA
6180 TYA
6181 PHA
6182 LDA #$00
6183 STA $0E
6184 STA $0F
6185 LDX #$10
6186 bEFD5 ASL $0C
6187 ROL $0D
6188 ROL $0E
6189 ROL $0F
6190 LDA $0E
6191 SEC
6192 SBC $0200
6193 TAY
6194 LDA $0F
6195 SBC $0201
6196 BCC bEFF1
6197 INC $0C
6198 STY $0E
6199 STA $0F
6200 bEFF1 DEX
6201 BNE bEFD5
6202 PLA
6203 TAY
6204 PLA
6205 TAX
6206 PLA
6207 RTS
6208
6209 sEFFA PHA
6210 ASL $0200
6211 ROL $0201
6212 LDA $0200
6213 SEC
6214 SBC $0E
6215 LDA $0201
6216 SBC $0F
6217 BCS bF014
6218 INC $0C
6219 BNE bF014
6220 INC $0D
6221 bF014 PLA
6222 RTS
6223
6224 sF016 BIT $0214
6225 CLC
6226 BPL bF020
6227 JSR sF024
6228 SEC
6229 bF020 ROL $0214
6230 RTS
6231
6232 sF024 LDY #$00
6233 LDA (p10),Y
6234 AND #$40
6235 BEQ bF048
6236 LDA $0215
6237 BIT $0212
6238 BMI bF042
6239 BVS bF03D
6240 EOR #$FF
6241 AND (p10),Y
6242 STA (p10),Y
6243 RTS
6244
6245 bF03D ORA (p10),Y
6246 STA (p10),Y
6247 RTS
6248
6249 bF042 BVS bF048
6250 EOR (p10),Y
6251 STA (p10),Y
6252 bF048 RTS
6253
6254 sF049 CLD
6255 PHA
6256 TYA
6257 PHA
6258 JSR sF731
6259 CLC
6260 ADC #$00
6261 STA $10
6262 TYA
6263 ADC #$A0
6264 STA $11
6265 LDA #$00
6266 STA $0D
6267 STA $0201
6268 STX $0C
6269 LDA #$06
6270 STA $0200
6271 JSR sEFC8
6272 CLC
6273 LDA $0C
6274 ADC $10
6275 STA $10
6276 LDA #$00
6277 ADC $11
6278 STA $11
6279 LDA #$20
6280 LDY $0E
6281 bF07C BEQ bF082
6282 LSR
6283 DEY
6284 BCC bF07C
6285 bF082 STA $0215
6286 PLA
6287 TAY
6288 PLA
6289 RTS
6290
6291 sF089 CLC
6292 LDA $10
6293 ADC #$28
6294 STA $10
6295 BCC bF094
6296 INC $11
6297 bF094 RTS
6298
6299 sF095 SEC
6300 LDA $10
6301 SBC #$28
6302 STA $10
6303 BCS bF0A0
6304 DEC $11
6305 bF0A0 RTS
6306
6307 sF0A1 LSR $0215
6308 BCC bF0B1
6309 LDA #$20
6310 STA $0215
6311 INC $10
6312 BNE bF0B1
6313 INC $11
6314 bF0B1 RTS
6315
6316 sF0B2 ASL $0215
6317 BIT $0215
6318 BVC bF0C7
6319 LDA #$01
6320 STA $0215
6321 LDA $10
6322 BNE bF0C5
6323 DEC $11
6324 bF0C5 DEC $10
6325 bF0C7 RTS
6326
6327 CURSET LDA #$04
6328 LDX #$E5
6329 JSR sF2F8
6330 BCS bF0F9
6331 LDA $02E5
6332 STA $0212
6333 LDA #$F0
6334 LDX #$E1
6335 JSR sF2F8
6336 BCS bF0F9
6337 LDA #$C8
6338 LDX #$E3
6339 JSR sF2F8
6340 BCS bF0F9
6341 LDX f02E1
6342 STX $0219
6343 LDY $02E3
6344 STY $021A
6345 JSR WritePixel
6346 RTS
6347
6348 bF0F9 INC $02E0
6349 RTS
6350
6351 CURMOV JSR sF30A
6352 BCS bF10C
6353 LDX $0219
6354 LDY $021A
6355 JSR WritePixel
6356 RTS
6357
6358 bF10C INC $02E0
6359 RTS
6360
6361 DRAW JSR sF30A
6362 BCS bF119
6363 JSR DrawLine
6364 RTS
6365
6366 bF119 INC $02E0
6367 RTS
6368
6369 PATTERN LDX f02E2
6370 BNE bF129
6371 LDX f02E1
6372 STX $0213
6373 RTS
6374
6375 bF129 INC $02E0
6376 RTS
6377
6378 CHAR LDX f02E2
6379 BNE bF16D
6380 LDX f02E1
6381 CPX #$20
6382 BCC bF16D
6383 CPX #$80
6384 BCS bF16D
6385 LDA #$02
6386 LDX #$E3
6387 JSR sF2F8
6388 BCS bF16D
6389 LDA #$04
6390 LDX #$E5
6391 JSR sF2F8
6392 BCS bF16D
6393 LDA $0219
6394 CMP #$EB
6395 BCS bF16D
6396 LDA $021A
6397 CMP #$C1
6398 BCS bF16D
6399 JSR sF171
6400 JSR sF19B
6401 LDX $0219
6402 LDY $021A
6403 JSR sF049
6404 RTS
6405
6406 bF16D INC $02E0
6407 RTS
6408
6409 sF171 CLD
6410 LDA $02E5
6411 STA $0212
6412 JSR sEEDE
6413 LDA f02E1
6414 STA $0C
6415 LDA #$00
6416 STA $0D
6417 LDX #$03
6418 bF186 ASL $0C
6419 ROL $0D
6420 DEX
6421 BNE bF186
6422 LDA $02E3
6423 ASL
6424 ASL
6425 CLC
6426 ADC #$98
6427 CLC
6428 ADC $0D
6429 STA $0D
6430 RTS
6431
6432 sF19B CLD
6433 LDY #$00
6434 bF19E STY $0F
6435 LDA (p0C),Y
6436 STA $0E
6437 JSR sF35D
6438 ROL $0E
6439 ROL $0E
6440 LDX #$06
6441 bF1AD ROL $0E
6442 BCC bF1B4
6443 JSR sF024
6444 bF1B4 JSR sF0A1
6445 DEX
6446 BNE bF1AD
6447 JSR sF36E
6448 JSR sF089
6449 LDY $0F
6450 INY
6451 CPY #$08
6452 BNE bF19E
6453 RTS
6454
6455 sF1C8 LDA #$F0
6456 LDX #$E1
6457 JSR sF2F8
6458 BCS bF200
6459 LDA #$C8
6460 LDX #$E3
6461 JSR sF2F8
6462 BCS bF200
6463 LDX f02E1
6464 STX $0219
6465 LDY $02E3
6466 STY $021A
6467 JSR sF049
6468 LDY #$00
6469 LDA (p10),Y
6470 AND $0215
6471 BEQ bF1F7
6472 LDA #$FF
6473 JMP jF1F9
6474
6475 bF1F7 LDA #$00
6476 jF1F9 STA f02E1
6477 STA f02E2
6478 RTS
6479
6480 bF200 INC $02E0
6481 RTS
6482
6483 PAPER LDA #<p10
6484 STA $0C
6485 LDA #>p10
6486 STA $0D
6487 JSR sF21C
6488 RTS
6489
6490 INK LDA #<f0100
6491 STA $0C
6492 LDA #>f0100
6493 STA $0D
6494 JSR sF21C
6495 RTS
6496
6497 sF21C LDA #$08
6498 LDX #$E1
6499 JSR sF2F8
6500 BCS bF264
6501 JSR sF35D
6502 LDA f02E1
6503 ORA $0C
6504 STA $0202
6505 LDX $021F
6506 BNE bF247
6507 LDX $0D
6508 STA f026B,X
6509 LDA #$A8
6510 CLC
6511 ADC $0D
6512 TAX
6513 LDY #$BB
6514 LDA #$1B
6515 JMP jF251
6516
6517 bF247 LDA #$00
6518 CLC
6519 ADC $0D
6520 TAX
6521 LDY #$A0
6522 LDA #$C8
6523 jF251 STA $0200
6524 STX $10
6525 STY $11
6526 LDA #$01
6527 STA $0201
6528 JSR sF2CD
6529 JSR sF36E
6530 RTS
6531
6532 bF264 INC $02E0
6533 RTS
6534
6535 FILL CLD
6536 LDA $02E3
6537 STA $0201
6538 BEQ bF2C9
6539 LDY #$00