-
Notifications
You must be signed in to change notification settings - Fork 1
/
rtedit.s
3172 lines (3067 loc) · 175 KB
/
rtedit.s
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
946
947
948
949
950
951
952
953
954
955
956
957
958
959
960
961
962
963
964
965
966
967
968
969
970
971
972
973
974
975
976
977
978
979
980
981
982
983
984
985
986
987
988
989
990
991
992
993
994
995
996
997
998
999
1000
;* -----------------------------------------------------------------------------
;*
;* RTEDIT, part of Microware's RT68/MX development package
;*
;* RTEDIT is a A/BASIC compiled BASIC program, source which is included with the
;* A/BASIC compiler manuals.
;* -----------------------------------------------------------------------------
; f9dasm: M6800/1/2/3/8/9 / H6309 Binary/OS9/FLEX9 Disassembler V1.83
; Loaded binary file rtedit.bin
include "asl.inc"
NL EQU $0D
PROMPT EQU '?'
;; STX EQU $02
;; ETX EQU $03
;; CTRLK EQU $0B
;; CTRLO EQU $0F
;; DC1 EQU $11 ;* Device control 1
;; DC2 EQU $12 ;* Device control 2
;; DC3 EQU $13 ;* Device control 3
;; DC4 EQU $14 ;* Device control 4
;; CTRLX EQU $18
;; CTRLZ EQU $1A
COMMA EQU $2C
IFNDEF LINES
LINES EQU 0
ENDIF
IFDEF DEFAULT
PLINES EQU 50
BUFSZ EQU 100
ELSE LINES=100
PLINES EQU 100
BUFSZ EQU 200
ELSE LINES=127
PLINES EQU 127
BUFSZ EQU 254
ENDIF
;* MEMORY DEFINITIONS
;
;* RT/68 EXECUTIVE USES 12 BYTES OF RAM
;* BEGINNING AT 0, THESE ARE NOT NEEDED
;* IN SINGLE TASK MODE AND MAY BE
;* USED FOR ANY OTHER PURPOSE.
ORG 0 ;*
SYSMOD RMB 1 ;* RT MODE 0=USER 1=EXEC 0000
CURTSK RMB 1 ;* TASK CURRENTLY ACTIVE 0001
TIMREM RMB 1 ;* TASK TIME REMAINING 0002
TSKTMR RMB 2 ;* TIMED TASK COUNTER 0003
CLOCK RMB 2 ;* RT CLOCK COUNTER 0005
INTREQ RMB 1 ;* INTERRUPT REQUEST FLAG 0007
TSKTMP RMB 1 ;* RT EXEC TEMP VAL 0008
PTYTMP RMB 1 ;* RT EXEC TEMP VAL 0009
TIMTSK RMB 1 ;* TIMED TASK INTR STATUS 000A
SYSPTY RMB 1 ;* SYS PRIORITY LEVEL 000B
ORG $A000 ;*
; ORG RAM ;*
IRQTSK RMB 2 ;* A000 -IRQ TASK/VECTOR
BEGADR RMB 2 ;* A002
ENDADR RMB 2 ;* A004
NMITSK RMB 2 ;* A006 - NMI TASK/VECTOR
SPTMP RMB 2 ;* A008 - SP TMP VAL
RTMOD RMB 1 ;* A009 - RT MODE FLAG
BKPOP RMB 1 ;* A00A - BKPT OPCODE/FLAG
BKPADR RMB 2 ;* A00C - BKPT ADDRESS
RELFLG RMB 1 ;* A00D - SWI FLAG
ERRFLG RMB 1 ;* A00E - ERROR FLAG/CODE
XTMP RMB 2 ;* A00F
IOVECT RMB 2 ;* A010 - ACIA ADDRESS VECTOR
ORG $A042 ;*
STACK EQU * ;* MONITOR STACK
;* TASK STATUS TABLE
;*
;* CONSISTS OF 16 3-BYTE TASK STATUS WORDS, ONE FOR
;* EACH POSSIBLE TASK. EACH TASK STATUS WORD CONTAINS
;* A TASK STATUS BYTE (TSB) AND A 2-BYTE TASK STACK
;* POINTER (TSP)
;*
;* THE TSB IS DEFINED AS FOLLOWS:
;*
;* BIT 7 1=TASK ON 0=TASK OFF
;* BIT 6-3 TIME LIMIT IN TICKS (0-15)
;* BIT 2-0 TASK PRIORITY (0-7)
;*
;* THE TSP IS THE VALUE OF THE TASK'S STACK
;* POINTER FOLLOWING THE LAST INTERRUPT, AND
;* THEREFORE POINTS TO THE COMPLETE MPU
;* REGISTER CONTENTS AT THE TIME THE TASK WAS
;* INTERRUPTED. TO RESTART A TASK THE EXEC
;* INITIALIZES THE SP FROM THE TSP AND
;* EXECUTES AN RTI INSTRUCTION
;*
ORG $A050 ;*
TSKTBL RMB 48 ;*
;* DEFINE PERIPHERIAL REGISTERS
;*
;* Pin 40 - CA1 - external Clock, interrupt source (<=100Hz)
;* Pin 39 - CA2 - Abort switch
;*
IFDEF DEFAULT
ORG $8004 ;*
PIADA RMB 1 ;* 8004
PIACA RMB 1 ;* 8005
PIADB RMB 1 ;* 8006
PIACB RMB 1 ;* 8007
ACIACS RMB 1 ;* 8000 Why is this here, after the PIA?
ACIADB RMB 1 ;* 8001
ELSE
ORG $F000
ACIACS RMB 1 ;* F000
ACIADB RMB 1 ;* F001
ACIAC2 RMB 1 ;* F002 Dummy ACIA
ACIAD2 RMB 1 ;* F003 Dummy ACIA
PIADA RMB 1 ;* F004
PIACA RMB 1 ;* F005
PIADB RMB 1 ;* F006
PIACB RMB 1 ;* F007
ENDIF
;****************************************************
;* Used Labels *
;****************************************************
ORG $0020 ;* $0020 - $0071
;*
;* $20 = Xreg tmp, for strings, I/O (a038)
;* $22 = I/O Buffer position pointer (1 1000)
;* $24 = I/O Buffer begin address (1000)
;* $26 = Char count ($01 ?)
;* $27 = string buffer pointer (1081)
;* $29 = string operation Xreg tmp
;* $2B = Multiplication overflow word, overflow word, string scratch storage (1374)
;* $2b -
;* $2F = string misc scratch (01ff 1000)
;*
XSAVE RMB 2 ;* EQU $0020 ;* Appears to be the stack
BUFPTR RMB 2 ;* EQU $0022 ;* B$ , 1000
BUFBEG RMB 2 ;* EQU $0024 ;* B$ , 1000
CHRCNT RMB 1 ;* EQU $0026 ;* 10
;
;M0027
IFDEF DEFAULT
STRPTR RMB 1 ;* EQU $0027 Hi
M0028 RMB 1 ;* EQU $0028 Lo
ELSE
STRPTR RMB 2 ;* EQU $0027 Hi ;* 1081 (some kind of buffer)
;0028 RMB 1 ;* EQU $0028 Lo
ENDIF
;*
;* Variables
;*
;* Starts at 0029 ends at ~0071
;*
;* BUF$(128) = &1000
;* B$(100) &1081 appears to be a duplicate
;*
;* OPT S
;* ORG=$0100 <- Code starts at 0100
;* BASE=$1300 <- Data starts at 1300
;* N(50) = 50 = $32 (base 16)
;* B$(100) = 100 = $64 (base 16) ($1081-$10E5 ?)
;* BASE=$30 <- Data starts at 0030
;* A1
;* BUF$ <- Global variable, 128 byte buffer (builtin)
;* C1
;* H <- Something to do with lines of BASIC
;* J *
;* K *
;* L
;* P1
;* Q *
;* S
;* S1
;* T *
;* V *
;* X *
;* X1
;* Z
;* Z$
;*
;* >md 0020
;* 0020 a0 38 10 00 10 00 01 10 81 13 77 01 ff 10 00 ff .8........w.....
;* 0030 00 32 00 01 00 32 31 30 00 ff ff ff ff ff ff ff .2...210........
;* 0040 ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ................
;* 0050 ff ff ff ff ff ff 00 0a 00 11 ff ff ff ff ff ff ................
;* 0060 ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ................
;* 0070 ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ................
;*
MSAVEX
STRSAV RMB 1 ;* EQU $0029 ;* 1377 ?
M002A RMB 1 ;* EQU $002A ;*
M002B RMB 1 ;* EQU $002B ;* 01FF ?
M002C RMB 1 ;* EQU $002C ;*
M002D RMB 2 ;* EQU $002D ;* 1000
M002F RMB 1 ;* EQU $002F ;* FF
;;
;; BASE=$30 Date pointer here
;;
MEMTOP ;*
V
M0030 RMB 1 ;* EQU $0030 ;* 0032 ?
M0031 RMB 1 ;* EQU $0031
DTMP ;* A:B/Dreg Temp
K
M0032 RMB 1 ;* EQU $0032 ;*
M0033 RMB 1 ;* EQU $0033
AST1
M0034 RMB 1 ;* EQU $0034
M0035 RMB 1 ;* EQU $0035
; ???
_Z ;* Z$
M0036 RMB $20 ;* EQU $0036
Z
M0056 RMB 1 ;* EQU $0056
M0057 RMB 1 ;* EQU $0057
;*
;* LINPTR = Memory location of the next line? (char maybe?)
;*
X
M0058 RMB 1 ;* EQU $0058
M0059 RMB 1 ;* EQU $0059
L
M005A RMB 1 ;* EQU $005A
M005B RMB 1 ;* EQU $005B
T
M005C RMB 1 ;* EQU $005C
M005D RMB 1 ;* EQU $005D
H
M005E RMB 1 ;* EQU $005E
M005F RMB 1 ;* EQU $005F
A1
M0060 RMB 1 ;* EQU $0060
M0061 RMB 1 ;* EQU $0061
S1
M0062 RMB 1 ;* EQU $0062
M0063 RMB 1 ;* EQU $0063
S
M0064 RMB 1 ;* EQU $0064
M0065 RMB 1 ;* EQU $0065
P1
M0066 RMB 1 ;* EQU $0066
M0067 RMB 1 ;* EQU $0067
X1
M0068 RMB 1 ;* EQU $0068
M0069 RMB 1 ;* EQU $0069
AST2
M006A RMB 1 ;* EQU $006A
M006B RMB 1 ;* EQU $006B
J
M006C RMB 1 ;* EQU $006C
M006D RMB 1 ;* EQU $006D
Q
M006E RMB 1 ;* EQU $006E
M006F RMB 1 ;* EQU $006F
;* Matched pair M0070 & M0071
C1
M0070 RMB 1 ;* EQU $0070
M0071 RMB 1 ;* EQU $0071
;* RTS ;0FDB: 39 '9'
;*; ----------------------------------------------------------------------------
;*;Z0FE2
;*; Not really sure what this is
;*; Is this not the end?
;*;0FDC JSR Z031A ;0FDC: BD 03 1A '...'
;*X0FDC JSR LDFROM ;0FDC: BD 03 1A '...'
;* ;;
;* ;; This is past the end of the code
;* ;;
;* FCB $24 ;0FDF: 24 '$'
;*
;* END
;*; END @ 0FDB but also $0FE0
;* -----------------------------------------------------------------------------
;* Memory usage
;* | 0000 | 000B | RT68MX multitask exec |
;* | 000C | 001F | Unused ? |
;* | 0020 | 0071 | RTEDIT variables |
;* | 0072 | 00FF | Unused ? |
;* | 0100 | 0FF0 | Code (0FDB End?) |
;* | 0FF0 | 0FFF | ??? |
;* | 1000 | 1301 | ??? |
;* | 1000 | 1081 | ??? |
;* | 1082 | 1301 | ??? |
;*
;*
;* -----------------------------------------------------------------------------
Z0DF4 equ $0DF4
ORG $0FE2
;* VAR LEN $0EA8
;* PGM LEN $0EDC
;* PBM END $0FDB
Z0FE2 RMB 1 ;* EQU $0FE2 ???
; END @ 0FDB but also $0FF0
MEND equ $0FF0
IO EQU $1000
BUF EQU $1000
M1000 EQU $1000 ;* 128 bytes
;1081 EQU $1081
ST
SBFPTR EQU $1081
BASE EQU $1300 ;* BASIC cmd BASE=
ZZ EQU $1300
N EQU $1302 ;* N $64 100 = N(50) stored as INTs
;*
;* $1346 means something, don't know what yet
;*
M1346 EQU $1346
_B EQU $1366 ;* B$(100) = 32 * 100 = 3200 ($0C80 $1366 - $1FE6)
;* 1366
;* >md 1360
;* 1360 00 00 00 00 00 00 31 30 20 52 45 4d 20 43 6f 6d ......10 REM Com
;* 1370 6d 65 6e 74 00 ff ff ff ff ff ff ff ff ff ff ff ment............
;*
;* Probably the code buffer
;* >md 1300
;* 1300 13 02 00 0a 00 00 00 00 00 00 00 00 00 00 00 00 ................
;* 1310 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................
;* 1320 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................
;* 1330 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................
;* 1340 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................
;* 1350 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................
;* 1360 00 00 00 00 00 00 31 30 20 52 45 4d 20 43 6f 6d ......10 REM Com 1366
;* 1370 6d 65 6e 74 00 ff ff ff ff ff ff ff ff ff ff ff ment............
;* 1380 ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ................
;* 1390 ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ................
;*
;* Probably a line buffer
;* >md FD0
;* 0fd0 01 b7 13 00 fe 13 00 a6 00 e6 01 39 bd 03 1a 24 ...........9...$
;* 0fe0 ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ................
;* 0ff0 ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ................
;* 1000 31 30 20 52 45 4d 20 43 6f 6d 6d 65 6e 74 00 ff 10 REM Comment.. 1000
;* 1010 ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ................
;* 1020 ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ................
;* 1030 ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ................
;* 1040 ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ................
;* 1050 ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ................
;* 1060 ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ................
;* >md 1070
;* 1070 ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ................
;* 1080 ff 31 30 20 52 45 4d 20 43 6f 6d 6d 65 6e 74 00 .10 REM Comment. 1081
;* 1090 ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ................
;* 10a0 ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ................
;* 10b0 ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ................
;* 10c0 ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ................
;* 10d0 ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ................
;* 10e0 ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ................
;* 10f0 ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ................
;* 1100 ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ................
;*
;* >md 1110
;* 1110 ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ................
;* 1120 ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ................
;* 1130 ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ................
;* 1140 ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ................
;* 1150 ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ................
;* 1160 ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ................
;* 1170 ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ................
;* 1180 ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ................
;* 1190 ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ................
;* 11a0 ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ................
;*
;* Stack (started at A049)
;*
;* >R
;* PC=e1a0 A:B=f781 X=a03d SP=a035 CCR=d9(11hINzvC) [0]
;* e1a0 00 ---
;*
;* >md a020
;* a020 ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ................
;* a030 ff e3 a9 00 0c e1 d8 81 ef a0 3d 04 98 00 33 19 ..........=...3.
;* a040 a6 e1 8f ff ff ff ff ff ff ff ff ff ff ff ff ff ................
;* a050 ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ................
;*
;* Internal variables
;*
;* >md 0
;* 0000 ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ................
;* 0010 ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ................
;* 0020 a0 38 10 00 10 00 01 10 81 13 74 01 ff 10 00 ff .8........t.....
;* 0030 00 32 00 01 00 32 31 30 00 ff ff ff ff ff ff ff .2...210........
;* 0040 ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ................
;* 0050 ff ff ff ff ff ff 00 0a 00 0e ff ff ff ff ff ff ................
;* 0060 ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ................
;*
;* >md a000
;* a000 ff ff 00 ff 01 00 ff ff a0 42 00 00 ff ff ff 00 .........B......
;* a010 e3 d4 f0 00 ff ff ff ff ff ff ff ff ff ff ff ff ................
;* a020 ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ................
;* a030 ff e3 a9 00 0c e1 d8 81 ef a0 3d 04 98 00 33 19 ..........=...3.
;* a040 a6 e1 8f ff ff ff ff ff ff ff ff ff ff ff ff ff ................
;* a050 ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ................
;* a060 ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ................
;* a070 ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ................
;* a080 ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ................
;* a090 ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ................
;*
;*
;*
MCF10 EQU $CF10 ;* ???
;
; RT68 equates ?
;
;PDATA1 EQU $E07E ;* PDATA ? YES
PRSTR EQU $E07E ;* PDATA ? YES
OUTS EQU $E0CC ;* OUTS - Print SPC OUTS
PRSPC EQU $E0CC ;* OUTS - Print SPC OUTS
CRLF EQU $E141 ;* CRLF - Print CRLF
PCRLF EQU $E141 ;* CRLF - Print CRLF
CONENT EQU $E16A ;* Console (return to console?)
CONSLE EQU $E16A ;* Console (return to console?)
;* Same
IN1CHR EQU $E350 ;* INEEE ? Yes
;* Same
OUT1CH EQU $E3A6 ;* OUTEEE ? Yes
;****************************************************
;* Program Code / Data Areas *
;****************************************************
ORG $0100
;
; Not sure how the stack gets setup but there are lots of TSX
;
; ------------------------------------------------------------------------------
;;
;; V=$0032 (50)
START CLRA ;0100: 4F 'O'
LDAB #$32 ;0101: C6 32 '.2'
; STAB M0031 ;0103: D7 31 '.1'
; STAA M0030 ;0105: 97 30 '.0'
STAB lo(V) ;0103: D7 31 '.1'
STAA hi(V) ;0105: 97 30 '.0'
;;
;; K=$0001
;;
CLRA ;0107: 4F 'O'
LDAB #$01 ;0108: C6 01 '..'
; STAB M0033 ;010A: D7 33 '.3'
; STAA M0032 ;010C: 97 32 '.2'
STAB lo(K) ;010A: D7 33 '.3'
STAA hi(K) ;010C: 97 32 '.2'
; LDAB M0031 ;010E: D6 31 '.1'
; LDAA M0030 ;0110: 96 30 '.0'
LDAB lo(V) ;010E: D6 31 '.1'
LDAA hi(V) ;0110: 96 30 '.0'
STAB M0035 ;0112: D7 35 '.5'
STAA M0034 ;0114: 97 34 '.4'
; ------------------------------------------------------------------------------
; WTFrell? D6 33 is LDAB M0033
;0116 LDAB M0033 ;0116: D6 33 '.3'
; LDAA M0032 ;0118: 96 32 '.2'
Z0116 LDAB lo(K) ;0116: D6 33 '.3'
LDAA hi(k) ;0118: 96 32 '.2'
ASLB ;011A: 58 'X'
ROLA ;011B: 49 'I'
ADDB #$00 ;011C: CB 00 '..'
ADCA #$13 ;011E: 89 13 '..'
PSHB ;0120: 37 '7'
PSHA ;0121: 36 '6'
CLRA ;0122: 4F 'O'
CLRB ;0123: 5F '_'
TSX ;0124: 30 '0'
LDX ,X ;0125: EE 00 '..'
INS ;0127: 31 '1'
INS ;0128: 31 '1'
STAA $00,X ;0129: A7 00 '..'
STAB $01,X ;012B: E7 01 '..'
; LDAB M0033 ;012D: D6 33 '.3'
; LDAA M0032 ;012F: 96 32 '.2'
LDAB lo(K) ;012D: D6 33 '.3'
LDAA hi(K) ;012F: 96 32 '.2'
;;
;; K=K+1 (NEXT K in FOR loop)
ADDB #$01 ;0131: CB 01 '..'
ADCA #$00 ;0133: 89 00 '..'
; STAB M0033 ;0135: D7 33 '.3'
; STAA M0032 ;0137: 97 32 '.2'
STAB lo(K) ;0135: D7 33 '.3'
STAA hi(K) ;0137: 97 32 '.2'
SUBB M0035 ;0139: D0 35 '.5'
SBCA M0034 ;013B: 92 34 '.4'
;;
;; Convoluted way to get back to Z0116
;;
BLT Z0144 ;013D: 2D 05 '-.'
WARMST
; BNE Z0147 ;013F: 26 06 '&.'
BNE MENU ;013F: 26 06 '&.'
; ------------------------------------------------------------------------------
; WTFrell
WTF001 TSTB ;0141: 5D ']'
; BNE Z0147 ;0142: 26 03 '&.'
BNE MENU ;0142: 26 03 '&.'
Z0144 JMP Z0116 ;0144: 7E 01 16 '~..'
; ------------------------------------------------------------------------------
;* Probably main loop
;* Line 100 (ie GOTO 100)
;*
LN0100
MENU ; LN0100
;0147 LDX #M1000 ;0147: CE 10 00 '...'
Z0147 LDX #BUF ;0147: CE 10 00 '...'
JSR Z0D7F ;014A: BD 0D 7F '...'
JSR Z0DD3 ;014D: BD 0D D3 '...'
; LDX #M1000 ;0150: CE 10 00 '...'
LDX #BUF ;0150: CE 10 00 '...'
; JSR Z0D14 ;0153: BD 0D 14 '...'
;;
;; INPUT BUF$ - Get command line buffer
;;
JSR INPUT ;0153: BD 0D 14 '...'
LDAA #hi(SBFPTR) ;0156: 86 10 '..'
LDAB #lo(SBFPTR) ;0158: C6 81 '..'
STAB STRPTR+1 ;015A: D7 28 '.('
STAA STRPTR ;015C: 97 27 '.''
;;
;; Save space on the stack?
;;
DES ;015E: 34 '4'
DES ;015F: 34 '4'
JSR Z0E68 ;0160: BD 0E 68 '..h'
; LDX #M1000 ;0163: CE 10 00 '...'
LDX #BUF ;0163: CE 10 00 '...'
JSR Z0F00 ;0166: BD 0F 00 '...'
CLRA ;0169: 4F 'O'
LDAB #$02 ;016A: C6 02 '..'njc
JSR Z0EE5 ;016C: BD 0E E5 '...'
LDX #SBFPTR ;016F: CE 10 81 '...'
STX STRPTR ;0172: DF 27 '.''
;;
;; Z$ ?
;;
LDX #M0036 ;0174: CE 00 36 '..6'
JSR Z0EA0 ;0177: BD 0E A0 '...'
LDX #M0036 ;017A: CE 00 36 '..6'
LDAA #hi(SBFPTR) ;017D: 86 10 '..'
LDAB #lo(SBFPTR) ;017F: C6 81 '..'
STAB STRPTR+1 ;0181: D7 28 '.('
STAA STRPTR ;0183: 97 27 '.''
JSR Z0F09 ;0185: BD 0F 09 '...'
JSR Z0F2A ;0188: BD 0F 2A '..*'
LDX STRPTR ;018B: DE 27 '.''
STX XSAVE ;018D: DF 20 '. '
;;
;; Is the Command RT?
;;
BRA CHKRT ;018F: 20 03 ' .'
; ------------------------------------------------------------------------------
RT68MX FCC "RT" ;0191: 52 54 'RT'
FCB $00 ;0193: 00 '.'
; ------------------------------------------------------------------------------
CHKRT
Z0194 LDX #RT68MX ;0194: CE 01 91 '...'
JSR Z0F00 ;0197: BD 0F 00 '...'
LDX #SBFPTR ;019A: CE 10 81 '...'
JSR Z0F76 ;019D: BD 0F 76 '..v'
;;
;;
;;
; BCS Z01A5 ;01A0: 25 03 '%.'
;;
;; Yep, RT, go to Return to RT68MX
;;
BCS RTNRTMX ;01A0: 25 03 '%.'
;;
;; Nope, is it
JMP Z01A8 ;01A2: 7E 01 A8 '~..'
; ------------------------------------------------------------------------------
; Return to RT68MX
;*
;* STOP
;*
RTNRTMX
Z01A5 JMP CONSLE ;01A5: 7E E1 6A '~.j'
; ------------------------------------------------------------------------------
Z01A8 LDX #M0036 ;01A8: CE 00 36 '..6'
LDAA #$10 ;01AB: 86 10 '..'
LDAB #$81 ;01AD: C6 81 '..'
STAB STRPTR+1 ;01AF: D7 28 '.('
STAA STRPTR ;01B1: 97 27 '.''
JSR Z0F09 ;01B3: BD 0F 09 '...'
JSR Z0F2A ;01B6: BD 0F 2A '..*'
LDX STRPTR ;01B9: DE 27 '.''
STX XSAVE ;01BB: DF 20 '. '
BRA Z01C2 ;01BD: 20 03 ' .'
; ------------------------------------------------------------------------------
MEM FCC "ME" ;01BF: 4D 45 'ME'
FCB $00 ;01C1: 00 '.'
; ------------------------------------------------------------------------------
CHKME
Z01C2 LDX #MEM ;01C2: CE 01 BF '...'
JSR Z0F00 ;01C5: BD 0F 00 '...'
LDX #SBFPTR ;01C8: CE 10 81 '...'
JSR Z0F76 ;01CB: BD 0F 76 '..v'
BCC Z01D3 ;01CE: 24 03 '$.'
JMP Z0987 ;01D0: 7E 09 87 '~..'
; ------------------------------------------------------------------------------
Z01D3 LDX #M0036 ;01D3: CE 00 36 '..6'
LDAA #$10 ;01D6: 86 10 '..'
LDAB #$81 ;01D8: C6 81 '..'
STAB STRPTR+1 ;01DA: D7 28 '.('
STAA STRPTR ;01DC: 97 27 '.''
JSR Z0F09 ;01DE: BD 0F 09 '...'
JSR Z0F2A ;01E1: BD 0F 2A '..*'
LDX STRPTR ;01E4: DE 27 '.''
STX XSAVE ;01E6: DF 20 '. '
BRA Z01ED ;01E8: 20 03 ' .'
; ------------------------------------------------------------------------------
LIST FCC "LI" ;01EA: 4C 49 'LI'
FCB $00 ;01EC: 00 '.'
; ------------------------------------------------------------------------------
CHKLI
Z01ED LDX #LIST ;01ED: CE 01 EA '...'
JSR Z0F00 ;01F0: BD 0F 00 '...'
LDX #SBFPTR ;01F3: CE 10 81 '...'
JSR Z0F76 ;01F6: BD 0F 76 '..v'
BCC Z01FE ;01F9: 24 03 '$.'
JMP Z04B6 ;01FB: 7E 04 B6 '~..'
; ------------------------------------------------------------------------------
Z01FE LDX #M0036 ;01FE: CE 00 36 '..6'
LDAA #$10 ;0201: 86 10 '..'
LDAB #$81 ;0203: C6 81 '..'
STAB STRPTR+1 ;0205: D7 28 '.('
STAA STRPTR ;0207: 97 27 '.''
JSR Z0F09 ;0209: BD 0F 09 '...'
JSR Z0F2A ;020C: BD 0F 2A '..*'
LDX STRPTR ;020F: DE 27 '.''
STX XSAVE ;0211: DF 20 '. '
BRA Z0218 ;0213: 20 03 ' .'
; ------------------------------------------------------------------------------
FIND FCC "F/" ;0215: 46 2F 'F/'
FCB $00 ;0217: 00 '.'
; ------------------------------------------------------------------------------
CHKFI
Z0218 LDX #FIND ;0218: CE 02 15 '...'
JSR Z0F00 ;021B: BD 0F 00 '...'
LDX #SBFPTR ;021E: CE 10 81 '...'
JSR Z0F76 ;0221: BD 0F 76 '..v'
BCC Z0229 ;0224: 24 03 '$.'
JMP Z0890 ;0226: 7E 08 90 '~..'
; ------------------------------------------------------------------------------
Z0229 LDX #M0036 ;0229: CE 00 36 '..6'
LDAA #$10 ;022C: 86 10 '..'
LDAB #$81 ;022E: C6 81 '..'
STAB STRPTR+1 ;0230: D7 28 '.('
STAA STRPTR ;0232: 97 27 '.''
JSR Z0F09 ;0234: BD 0F 09 '...'
JSR Z0F2A ;0237: BD 0F 2A '..*'
LDX STRPTR ;023A: DE 27 '.''
STX XSAVE ;023C: DF 20 '. '
BRA Z0243 ;023E: 20 03 ' .'
; ------------------------------------------------------------------------------
LOAD FCC "LO" ;0240: 4C 4F 'LO'
FCB $00 ;0242: 00 '.'
; ------------------------------------------------------------------------------
CHKLO
Z0243 LDX #LOAD ;0243: CE 02 40 '..@'
JSR Z0F00 ;0246: BD 0F 00 '...'
LDX #SBFPTR ;0249: CE 10 81 '...'
JSR Z0F76 ;024C: BD 0F 76 '..v'
BCC Z0254 ;024F: 24 03 '$.'
JMP Z06CA ;0251: 7E 06 CA '~..'
; ------------------------------------------------------------------------------
Z0254 LDX #M0036 ;0254: CE 00 36 '..6'
LDAA #$10 ;0257: 86 10 '..'
LDAB #$81 ;0259: C6 81 '..'
STAB STRPTR+1 ;025B: D7 28 '.('
STAA STRPTR ;025D: 97 27 '.''
JSR Z0F09 ;025F: BD 0F 09 '...'
JSR Z0F2A ;0262: BD 0F 2A '..*'
LDX STRPTR ;0265: DE 27 '.''
STX XSAVE ;0267: DF 20 '. '
BRA Z026E ;0269: 20 03 ' .'
; ------------------------------------------------------------------------------
SEARCH FCC "S," ;026B: 53 2C 'S,'
FCB $00 ;026D: 00 '.'
; ------------------------------------------------------------------------------
CHKS1
Z026E LDX #SEARCH ;026E: CE 02 6B '..k'
JSR Z0F00 ;0271: BD 0F 00 '...'
LDX #SBFPTR ;0274: CE 10 81 '...'
JSR Z0F76 ;0277: BD 0F 76 '..v'
BCC Z027F ;027A: 24 03 '$.'
JMP Z04E8 ;027C: 7E 04 E8 '~..'
; ------------------------------------------------------------------------------
Z027F LDX #M0036 ;027F: CE 00 36 '..6'
LDAA #$10 ;0282: 86 10 '..'
LDAB #$81 ;0284: C6 81 '..'
STAB STRPTR+1 ;0286: D7 28 '.('
STAA STRPTR ;0288: 97 27 '.''
JSR Z0F09 ;028A: BD 0F 09 '...'
JSR Z0F2A ;028D: BD 0F 2A '..*'
LDX STRPTR ;0290: DE 27 '.''
STX XSAVE ;0292: DF 20 '. '
BRA Z0299 ;0294: 20 03 ' .'
; ------------------------------------------------------------------------------
SAVE FCC "SA" ;0296: 53 41 'SA'
FCB $00 ;0298: 00 '.'
; ------------------------------------------------------------------------------
CHKSA
Z0299 LDX #SAVE ;0299: CE 02 96 '...'
JSR Z0F00 ;029C: BD 0F 00 '...'
LDX #SBFPTR ;029F: CE 10 81 '...'
JSR Z0F76 ;02A2: BD 0F 76 '..v'
BCC Z02AA ;02A5: 24 03 '$.'
JMP Z04D6 ;02A7: 7E 04 D6 '~..'
; ------------------------------------------------------------------------------
Z02AA LDX #M0036 ;02AA: CE 00 36 '..6'
LDAA #$10 ;02AD: 86 10 '..'
LDAB #$81 ;02AF: C6 81 '..'
STAB STRPTR+1 ;02B1: D7 28 '.('
STAA STRPTR ;02B3: 97 27 '.''
JSR Z0F09 ;02B5: BD 0F 09 '...'
JSR Z0F2A ;02B8: BD 0F 2A '..*'
LDX STRPTR ;02BB: DE 27 '.''
STX XSAVE ;02BD: DF 20 '. '
BRA Z02C4 ;02BF: 20 03 ' .'
; -[ EXIT/END ]-----------------------------------------------------------------
EXIT FCC "EN" ;02C1: 45 4E 'EN'
FCB $00 ;02C3: 00 '.'
; ------------------------------------------------------------------------------
CHKEN
Z02C4 LDX #EXIT ;02C4: CE 02 C1 '...'
JSR Z0F00 ;02C7: BD 0F 00 '...'
LDX #SBFPTR ;02CA: CE 10 81 '...'
JSR Z0F76 ;02CD: BD 0F 76 '..v'
BCC Z02D5 ;02D0: 24 03 '$.'
JMP Z04F4 ;02D2: 7E 04 F4 '~..'
; ------------------------------------------------------------------------------
Z02D5 LDX #M0036 ;02D5: CE 00 36 '..6'
LDAA #$10 ;02D8: 86 10 '..'
LDAB #$81 ;02DA: C6 81 '..'
STAB STRPTR+1 ;02DC: D7 28 '.('
STAA STRPTR ;02DE: 97 27 '.''
JSR Z0F09 ;02E0: BD 0F 09 '...'
JSR Z0F2A ;02E3: BD 0F 2A '..*'
LDX STRPTR ;02E6: DE 27 '.''
STX XSAVE ;02E8: DF 20 '. '
BRA Z02EF ;02EA: 20 03 ' .'
; ------------------------------------------------------------------------------
NEW FCC "NE" ;02EC: 4E 45 'NE'
FCB $00 ;02EE: 00 '.'
; ------------------------------------------------------------------------------
CHKNE
Z02EF LDX #NEW ;02EF: CE 02 EC '...'
JSR Z0F00 ;02F2: BD 0F 00 '...'
LDX #SBFPTR ;02F5: CE 10 81 '...'
JSR Z0F76 ;02F8: BD 0F 76 '..v'
BCC Z0300 ;02FB: 24 03 '$.'
JMP START ;02FD: 7E 01 00 '~..'
; ------------------------------------------------------------------------------
Z0300 LDX #M0036 ;0300: CE 00 36 '..6'
LDAA #$10 ;0303: 86 10 '..'
LDAB #$81 ;0305: C6 81 '..'
STAB STRPTR+1 ;0307: D7 28 '.('
STAA STRPTR ;0309: 97 27 '.''
JSR Z0F09 ;030B: BD 0F 09 '...'
JSR Z0F2A ;030E: BD 0F 2A '..*'
LDX STRPTR ;0311: DE 27 '.''
STX XSAVE ;0313: DF 20 '. '
; BRA Z031A ;0315: 20 03 ' .'
BRA LDFROM ;0315: 20 03 ' .'
; ------------------------------------------------------------------------------
LFROM FCC "L," ;0317: 4C 2C 'L,'
FCB $00 ;0319: 00 '.'
; ------------------------------------------------------------------------------
LDFROM
CHKL1
Z031A LDX #LFROM ;031A: CE 03 17 '...'
JSR Z0F00 ;031D: BD 0F 00 '...'
LDX #SBFPTR ;0320: CE 10 81 '...'
JSR Z0F76 ;0323: BD 0F 76 '..v'
;;
;; Check line length?
;;
; BCC Z032B ;0326: 24 03 '$.'
BCC LINERR ;0326: 24 03 '$.'
JMP Z068B ;0328: 7E 06 8B '~..'
; ------------------------------------------------------------------------------
;*
LINERR
;032B LDX #M1000 ;032B: CE 10 00 '...'
Z032B LDX #BUF ;032B: CE 10 00 '...'
LDAA #$10 ;032E: 86 10 '..'
LDAB #$81 ;0330: C6 81 '..'
STAB STRPTR+1 ;0332: D7 28 '.('
STAA STRPTR ;0334: 97 27 '.''
JSR Z0F00 ;0336: BD 0F 00 '...'
LDX #SBFPTR ;0339: CE 10 81 '...'
JSR Z0FA7 ;033C: BD 0F A7 '...'
;;
STAB M0057 ;033F: D7 57 '.W'
STAA M0056 ;0341: 97 56 '.V'
;;
LDAB M0057 ;0343: D6 57 '.W'
LDAA M0056 ;0345: 96 56 '.V'
;;
SUBB #$00 ;0347: C0 00 '..'
SBCA #$00 ;0349: 82 00 '..'
;;
;; BLT or BEQ QUE
;; BNE or anything else TOOLNG
;;
; BLT Z0355 ;034B: 2D 08 '-.'
BLT QUE ;034B: 2D 08 '-.'
BNE Z0352 ;034D: 26 03 '&.'
TSTB ;034F: 5D ']'
; BEQ Z0355 ;0350: 27 03 ''.'
BEQ QUE ;0350: 27 03 ''.'
;;
;; Line too long
;;
Z0352 JMP TOOLNG ;0352: 7E 03 6E '~.n'
;0352 JMP Z036E ;0352: 7E 03 6E '~.n'
; ------------------------------------------------------------------------------
;*
;* Say What?
;*
QUE
;0355 LDX #M1000 ;0355: CE 10 00 '...'
Z0355 LDX #BUF ;0355: CE 10 00 '...'
JSR Z0D7F ;0358: BD 0D 7F '...'
BRA Z0362 ;035B: 20 05 ' .'
; ------------------------------------------------------------------------------
WHAT FCC "WHAT" ;035D: 57 48 41 54 'WHAT'
FCB $00 ;0361: 00 '.'
; ------------------------------------------------------------------------------
Z0362 LDX #WHAT ;0362: CE 03 5D '..]'
JSR XPRNT ;0365: BD 0D EF '...'
JSR Z0DD1 ;0368: BD 0D D1 '...'
; JMP Z0147 ;036B: 7E 01 47 '~.G'
JMP MENU ;036B: 7E 01 47 '~.G'
; ------------------------------------------------------------------------------
;*
;* Check the line length
;*
;* 145 GOSUB 7000: IF X<64 THEN 150: PRINT "LINE TOO LONG"
;*
TOOLNG ;;
;; Get the len(buf$)
;;
Z036E JSR Z0C40 ;036E: BD 0C 40 '..@'
;;
; LDAB M0059 ;0371: D6 59 '.Y'
; LDAA M0058 ;0373: 96 58 '.X'
LDAB lo(X) ;0371: D6 59 '.Y'
LDAA hi(X) ;0373: 96 58 '.X'
;;
;; $40 = 64, line length
;;
SUBB #$40 ;0375: C0 40 '.@'
SBCA #$00 ;0377: 82 00 '..'
;;
;; IF X<64 THEN 150
;;
BLT Z0380 ;0379: 2D 05 '-.'
BNE Z0383 ;037B: 26 06 '&.'
TSTB ;037D: 5D ']'
BNE Z0383 ;037E: 26 03 '&.'
Z0380 JMP Z03A5 ;0380: 7E 03 A5 '~..'
; ------------------------------------------------------------------------------
;*
;* Called from:
;* Z036E
;*
;0383 LDX #M1000 ;0383: CE 10 00 '...'
Z0383 LDX #BUF ;0383: CE 10 00 '...'
JSR Z0D7F ;0386: BD 0D 7F '...'
BRA Z0399 ;0389: 20 0E ' .'
; ------------------------------------------------------------------------------
ST2LNG FCC "LINE TOO LONG" ;038B: 4C 49 4E 45 20 54 4F 4F 20 4C 4F 4E 47 'LINE TOO LONG'
FCB $00 ;0398: 00 '.'
; ------------------------------------------------------------------------------
Z0399 LDX #ST2LNG ;0399: CE 03 8B '...'
JSR XPRNT ;039C: BD 0D EF '...'
JSR Z0DD1 ;039F: BD 0D D1 '...'
;;
;; 146 GOTO 100
;;
; JMP Z0147 ;03A2: 7E 01 47 '~.G'
JMP MENU ;03A2: 7E 01 47 '~.G'
; ------------------------------------------------------------------------------
;*
;* 150 GOSUB 4000: IF K>V THEN 160
;*
LN0150
Z03A5 JSR Z0AC8 ;03A5: BD 0A C8 '...'
; LDAB M0033 ;03A8: D6 33 '.3'
; LDAA M0032 ;03AA: 96 32 '.2'
LDAB lo(K) ;03A8: D6 33 '.3'
LDAA hi(K) ;03AA: 96 32 '.2'
; SUBB M0031 ;03AC: D0 31 '.1'
; SBCA M0030 ;03AE: 92 30 '.0'
SUBB lo(V) ;03AC: D0 31 '.1'
SBCA hi(V) ;03AE: 92 30 '.0'
BLT Z03BA ;03B0: 2D 08 '-.'
BNE Z03B7 ;03B2: 26 03 '&.'
TSTB ;03B4: 5D ']'
BEQ Z03BA ;03B5: 27 03 ''.'
;;
;; THEN 160
;;
Z03B7 JMP Z03E6 ;03B7: 7E 03 E6 '~..'
; ------------------------------------------------------------------------------
;03BA LDAB M0033 ;03BA: D6 33 '.3'
; LDAA M0032 ;03BC: 96 32 '.2'
Z03BA LDAB lo(K) ;03BA: D6 33 '.3'
LDAA hi(K) ;03BC: 96 32 '.2'
ASLB ;03BE: 58 'X'
ROLA ;03BF: 49 'I'
;;
;; N(50)
;;
ADDB #$00 ;03C0: CB 00 '..'
ADCA #$13 ;03C2: 89 13 '..'
PSHB ;03C4: 37 '7'
PSHA ;03C5: 36 '6'
CLRA ;03C6: 4F 'O'
CLRB ;03C7: 5F '_'
TSX ;03C8: 30 '0'
LDX $00,X ;03C9: EE 00 '..'
INS ;03CB: 31 '1'
INS ;03CC: 31 '1'
STAA $00,X ;03CD: A7 00 '..'
STAB $01,X ;03CF: E7 01 '..'
; LDAB M0059 ;03D1: D6 59 '.Y'
; LDAA M0058 ;03D3: 96 58 '.X'
LDAB lo(X) ;03D1: D6 59 '.Y'
LDAA hi(X) ;03D3: 96 58 '.X'
SUBB #$04 ;03D5: C0 04 '..'
SBCA #$00 ;03D7: 82 00 '..'
BLT Z03E3 ;03D9: 2D 08 '-.'
BNE Z03E0 ;03DB: 26 03 '&.'
TSTB ;03DD: 5D ']'
BEQ Z03E3 ;03DE: 27 03 ''.'
Z03E0 JMP Z03E6 ;03E0: 7E 03 E6 '~..'
; ------------------------------------------------------------------------------
;03E3 JMP Z0147 ;03E3: 7E 01 47 '~.G'
Z03E3 JMP MENU ;03E3: 7E 01 47 '~.G'
; ------------------------------------------------------------------------------
;*
;* 160 GOSUB 5000 : IF K<V+1 THEN 175
;*
LN0160
Z03E6 JSR Z0B18 ;03E6: BD 0B 18 '...'
; LDAB M0033 ;03E9: D6 33 '.3'
; LDAA M0032 ;03EB: 96 32 '.2'
LDAB lo(K) ;03E9: D6 33 '.3'
LDAA hi(K) ;03EB: 96 32 '.2'
PSHB ;03ED: 37 '7'
PSHA ;03EE: 36 '6'
; LDAB M0031 ;03EF: D6 31 '.1'
; LDAA M0030 ;03F1: 96 30 '.0'
LDAB lo(V) ;03EF: D6 31 '.1'
LDAA hi(V) ;03F1: 96 30 '.0'
ADDB #$01 ;03F3: CB 01 '..'
ADCA #$00 ;03F5: 89 00 '..'
NEGA ;03F7: 40 '@'
NEGB ;03F8: 50 'P'
SBCA #$00 ;03F9: 82 00 '..'
TSX ;03FB: 30 '0'
ADDB $01,X ;03FC: EB 01 '..'
ADCA $00,X ;03FE: A9 00 '..'
INS ;0400: 31 '1'
INS ;0401: 31 '1'
;;
;;
;;
; BGE Z0407 ;0402: 2C 03 ',.'
BGE MEMFLL ;0402: 2C 03 ',.'