-
Notifications
You must be signed in to change notification settings - Fork 2
/
Copy path9619_U7.asm
2875 lines (2811 loc) · 195 KB
/
9619_U7.asm
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
* f9dasm: M6800/1/2/3/8/9 / H6309 Binary/OS9/FLEX9 Disassembler V1.80
* Loaded binary file 9619_U7.bin
* 6809 INTERACTIVE DEBUG PROGRAM
* FOR CREATIVE MICRO SYSTEMS 9609/19 MODULE
* (C) 198? MICROWARE SYSTEMS CORPORATION
* DES MOINES, IOWA
*****************************************************
** Used Labels *
*****************************************************
TMINIT EQU $000C
ACEC_ON EQU $00FF
ID1401 EQU $1401
ID1700 EQU $1700
ID1805 EQU $1805
M2324 EQU $2324
M293D EQU $293D
M2A2A EQU $2A2A
M4101 EQU $4101
M4202 EQU $4202
M44FF EQU $44FF
M5043 EQU $5043
RAM_PAT EQU $8008
M9D01 EQU $9D01
P_BUFFLOC EQU $9D82
P_START EQU $9D84
P_END EQU $9D86
P_RAMSTART EQU $9D88
P_ROMOFFS EQU $9D8A
M9D8F EQU $9D8F
M9D90 EQU $9D90
M9D92 EQU $9D92
P_THIS EQU $9D93
P_DEVICE EQU $9D96
P_TABLOC EQU $9D97
P_DEVSZ EQU $9D99
P_DEVEND EQU $9D9B
M9D9C EQU $9D9C
P_HEAD EQU $9D9D
USERSP EQU $9F00
DBUGSP EQU $9F02
IOBUF EQU $9F04
BKPTBL EQU $9F06
INBKPT EQU $9F08
ACECHO EQU $9F09
USECRLF EQU $9F0A
ACVECT EQU $9F0B
RAM_SW3_VEC EQU $9F0D
RAM_SW2_VEC EQU $9F0F
RAM_SWI_VEC EQU $9F11
RAM_IRQ_VEC EQU $9F13
RAM_FRQ_VEC EQU $9F15
RAM_NMI_VEC EQU $9F17
M9F19 EQU $9F19
M9F1A EQU $9F1A
M9F1E EQU $9F1E
M9F1F EQU $9F1F
M9F20 EQU $9F20
BYTCNT EQU $9F22
M9F23 EQU $9F23
M9F27 EQU $9F27
M9F28 EQU $9F28
M9F29 EQU $9F29
M9F2A EQU $9F2A
M9F2B EQU $9F2B
M9F2C EQU $9F2C
M9F2D EQU $9F2D
M9F2E EQU $9F2E
M9F53 EQU $9F53
M9F55 EQU $9F55
M9F58 EQU $9F58
M9F59 EQU $9F59
M9F5B EQU $9F5B
M9F6E EQU $9F6E
M9F6F EQU $9F6F
M9F79 EQU $9F79
M9F87 EQU $9F87
XTAG EQU $AA55
*****************************************************
** Program Code / Data Areas *
*****************************************************
ORG $E700
* ROM LABEL:
* Debug 2418
* FFFE=A0
* 11/6/99
* ORGANIZATION:
* E000-E6FF EMPTY
ORG $E000
FILL $FF,$700
* E700-E7FF RTC DATE/TIME
* E800?EFFF EPROM PROGRAMMER
* F000?F7FF ASSEMBLER
* F800-FF7F DEBUGGER
* FF80-FFDF I/O SPACE
* FFE0-FFFF VECTORS
* ### RTC CLOCK UTILITIES
* CB2 is EN' for decoder U33
* U is pointing to PIADDR0
* RTC DATA STORED IN A
* RTC ADDR DECrementeD AT B
_SETCLK JSR CHKEOL *E700: BD FE 2A '..*'
BEQ _DTCMDERR *E703: 27 53 ''S'
LDU #PIADDR0 *E705: CE FF C4 '...' GET PIA0 ADDR
LDB #12 *E708: C6 0C '..' START AT RTC DECADE ADDR
_SETCL1 JSR _CHEXBIN *E70A: BD FE E0 '...' CHECK VALID INPUT
SUBA #$30 *E70D: 80 30 '.0' thought _XCMDCHK did this already
CMPB #%00000101 *E70F: C1 05 '..' ON 10 HR DIGIT REG...
BNE _SETCL2 *E711: 26 02 '&.'
ORA #$08 *E713: 8A 08 '..' FORCE 24 HR CLOCK
_SETCL2 BSR _RTC_WR *E715: 8D 06 '..'
BCS _SETCL2 *E717: 25 FC '%.'
DECB *E719: 5A 'Z' DECREMENT RTC ADDR
BPL _SETCL1 *E71A: 2A EE '*.'
RTS *E71C: 39 '9'
* Set the RTC DATA from A Reg
_RTC_WR PSHS D *E71D: 34 06 '4.' SAVE A&B REGISTERS
BSR _RTCADDRWR *E71F: 8D 17 '..'
LDA ,S *E721: A6 E4 '..' GET A FROM A ON STACK
ORA #%00010000 *E723: 8A 10 '..' SET PB4 HI (RTC-WT)
STA $02,U *E725: A7 42 '.B' SAVE TO PIA0 PORB
LDB #%00110100 *E727: C6 34 '.4' SELECT POR, SET CB2-LO
STB $03,U *E729: E7 43 '.C' SAVE TO PIA0 CRB
EXG X,Y *E72B: 1E 12 '..'
EXG X,Y *E72D: 1E 12 '..' 16 CYCLE DELAY?
LDB #%00111100 *E72F: C6 3C '.<' SELECT POR, SET CB2-HI
STB $03,U *E731: E7 43 '.C' SAVE TO PIA0 CRB
LBSR _RTC_SSR *E733: 17 00 A5 '...'
PULS PC,D *E736: 35 86 '5.' RESTORE A&B, RTS
* Set the RTC ADDR from B Reg. PB4,5 stay low for RTC-ADDR write.
_RTCADDRWR PSHS D *E738: 34 06 '4.' SAVE A&B REGISTERS
LDB #%00111000 *E73A: C6 38 '.8' SELECT DDR, SET CB2-HI
STB $03,U *E73C: E7 43 '.C' SAVE TO PIA0 CRB
LDA #%00111111 *E73E: 86 3F '.?' PB7,6 in; PB5-0 out
STA $02,U *E740: A7 42 '.B' SAVE TO PIA0 DDRB
ORB #%00000100 *E742: CA 04 '..' SELECT POR
STB $03,U *E744: E7 43 '.C' SAVE TO PIA0 CRB
LDB $01,S *E746: E6 61 '.a' LOAD B FROM B ON STACK
STB $02,U *E748: E7 42 '.B' SAVE TO PIA0 PORB
LDB #%00110100 *E74A: C6 34 '.4' SELECT POR, SET CB2-LO
STB $03,U *E74C: E7 43 '.C' SAVE TO PIA0 CRB
_DELAY3 LBRN _DELAY3 *E74E: 10 21 FF FC '.!..' 3 CYCLE DELAY?
LDB #%00111100 *E752: C6 3C '.<' SELECT POR, SET CB2-HI
STB $03,U *E754: E7 43 '.C' SAVE TO PIA0 CRB
PULS PC,D *E756: 35 86 '5.' RESTORE A&D, RTS
_DTCMDERR LDA #$32 *E758: 86 32 '.2'
JMP _NCMDERR *E75A: 7E FD B2 '~..'
_PRCLK LEAS -$0D,S *E75D: 32 73 '2s'
TFR S,X *E75F: 1F 41 '.A'
BSR _RDCLK *E761: 8D 32 '.2'
LDA #'/ *E763: 86 2F './'
PSHS A *E765: 34 02 '4.' PUSH '/' ON TO STACK
BSR _PRCL3 *E767: 8D 13 '..' PRINT DATE
LDA #$20 *E769: 86 20 '. '
JSR A1OUTCHR *E76B: BD FE 79 '..y' SPACE BTWN DT, TM
LEAX $01,X *E76E: 30 01 '0.'
LDA #': *E770: 86 3A '.:' USE ':' NOW
STA ,S *E772: A7 E4 '..'
BSR _PRCL3 *E774: 8D 06 '..' PRINT TIME
LEAS $0E,S *E776: 32 6E '2n'
LBSR P_CRLF *E778: 17 04 DE '...'
RTS *E77B: 39 '9'
_PRCL3 LDB #$03 *E77C: C6 03 '..' LOOP 3 TIMES
BRA _PRDDIG *E77E: 20 05 ' .'
_PRDIV LDA $02,S *E780: A6 62 '.b'
JSR A1OUTCHR *E782: BD FE 79 '..y' PRINT / or : BTWN DIGITS
_PRDDIG BSR _PR2X *E785: 8D 04 '..'
DECB *E787: 5A 'Z' DECREMENT LOOP COUNTER
BNE _PRDIV *E788: 26 F6 '&.' KEEP OUTPUTTING
RTS *E78A: 39 '9'
_PR2X BSR _PR1X *E78B: 8D 00 '..'
_PR1X LDA ,X+ *E78D: A6 80 '..' GET X, INC X
ORA #$30 *E78F: 8A 30 '.0' CONVERT TO ASCII #
JSR A1OUTCHR *E791: BD FE 79 '..y' PRINT IT
RTS *E794: 39 '9' RETURN
_RDCLK PSHS X *E795: 34 10 '4.'
LDU #PIADDR0 *E797: CE FF C4 '...'
_RDCL2 LDB #12 *E79A: C6 0C '..' START AT RTC DECADE ADDR
LDX ,S *E79C: AE E4 '..'
_RDCL3 BSR _RTC_RD *E79E: 8D 0F '..' GET THE DIGIT
BCS _RDCL2 *E7A0: 25 F8 '%.'
CMPB #$05 *E7A2: C1 05 '..' ON 10 HR DIGIT REG...
BNE _RDCL4 *E7A4: 26 02 '&.'
ANDA #$07 *E7A6: 84 07 '..' JUST GET DIGIT
_RDCL4 STA ,X+ *E7A8: A7 80 '..'
DECB *E7AA: 5A 'Z' DECREMENT RTC ADDR
BPL _RDCL3 *E7AB: 2A F1 '*.' DO NEXT
PULS PC,X *E7AD: 35 90 '5.' RESTORE X, RTS
_RTC_RD PSHS D *E7AF: 34 06 '4.' SAVE A&B REGISTERS
LBSR _RTCADDRWR *E7B1: 17 FF 84 '...'
LDB #%00111000 *E7B4: C6 38 '.8' SELECT DDR, SET CB2-HI
STB $03,U *E7B6: E7 43 '.C' SAVE TO PIA0 CRB
LDA #%00110000 *E7B8: 86 30 '.0' PB7,6 in; PB5,4 out PB3-0 in
STA $02,U *E7BA: A7 42 '.B' SAVE TO PIA0 DDRB
ORB #%00000100 *E7BC: CA 04 '..' SELECT POR
STB $03,U *E7BE: E7 43 '.C' SAVE TO PIA0 CRB
LDA #%00100000 *E7C0: 86 20 '. ' SET PB5 HI (RTC-RD)
STA $02,U *E7C2: A7 42 '.B' SAVE TO PIA0 PORB
LDB #%00110100 *E7C4: C6 34 '.4' SELECT POR, SET CB2-LO (EN')
STB $03,U *E7C6: E7 43 '.C' SAVE TO PIA0 CRB
EXG X,Y *E7C8: 1E 12 '..'
EXG X,Y *E7CA: 1E 12 '..' 16 CYCLE DELAY?
LDA $02,U *E7CC: A6 42 '.B' LOAD PIA0 PORB
ANDA #$0F *E7CE: 84 0F '..' KEEP ONLY RTC DATA
STA ,S *E7D0: A7 E4 '..' STORE VALUE IN A ON STACK
LDB #%00111100 *E7D2: C6 3C '.<' SELECT POR, SET CB2-HI
STB $03,U *E7D4: E7 43 '.C' SAVE TO PIA0 CRB
LBSR _RTC_SSR *E7D6: 17 00 02 '...'
PULS PC,D *E7D9: 35 86 '5.' RESTORE A&B, RTS
_RTC_SSR PSHS D *E7DB: 34 06 '4.'
LDB #$0F *E7DD: C6 0F '..' RTC ADDR FOR STANDARD SIGNAL REG
LBSR _RTCADDRWR *E7DF: 17 FF 56 '..V'
LDB #%00111000 *E7E2: C6 38 '.8' SELECT DDR, SET CB2-HI
STB $03,U *E7E4: E7 43 '.C' SAVE TO PIA0 CRB
LDA #%00110000 *E7E6: 86 30 '.0' PB7,6 in; PB5,4 out PB3-0 in
STA $02,U *E7E8: A7 42 '.B' SAVE TO PIA0 DDRB
ORB #%00000100 *E7EA: CA 04 '..' SELECT POR
STB $03,U *E7EC: E7 43 '.C' SAVE TO PIA0 CRB
LDA #%00100000 *E7EE: 86 20 '. ' SET PB5 HI (RTC-RD)
STA $02,U *E7F0: A7 42 '.B' SAVE TO PIA0 PORB
LDB #%00110100 *E7F2: C6 34 '.4' SELECT POR, SET CB2-LO (EN')
STB $03,U *E7F4: E7 43 '.C' SAVE TO PIA0 CRB
LDA $02,U *E7F6: A6 42 '.B' STORE SSR DATA IN A
EORA #%10000000 *E7F8: 88 80 '..'
ASLA *E7FA: 48 'H' SHIFT LEFT, SET CARRY?
PULS PC,D *E7FB: 35 86 '5.' RESTORE A&D, RTS
FCB $FF,$FF,$FF *E7FD: FF FF FF '...'
* ### EPROM PROGRAMMER
* STAT, TEST, VERF, VIEW, CLR, READ, E, EXIT
* PARAMETERS: START END RAM-ADDR ROM-OFFSET
* 2716, 2516, 2732, 2532, 2732A, 2764, 27128
* PIA 1, PORT A - ADDR LINES (0-7)
* PIA 1, PORT B - ADDR LINES, HEAD ID
* PIA 2, PORT A - EPROM CONTROL LINES
* PIA 2, PORT B - DATA BUS
XTAGLOC FDB XTAG *E800: AA 55 '.U'
XCMDTBL_VEC FDB XCMDTBL *E802: EF DB '..'
LBRA EPROM *E804: 16 00 5C '..\'
P_EPRM3 LBRA EPRM3 *E807: 16 00 70 '..p'
P_DP FCB $9D,$00 *E80A: 9D 00 '..'
* I/O VECTOR TABLE
PIA2PRA_VEC FCB $FF,$CC *E80C: FF CC '..'
PIA2CRA_VEC FCB $FF,$CD *E80E: FF CD '..'
PIA2PRB_VEC FCB $FF,$CE *E810: FF CE '..'
PIA2CRB_VEC FCB $FF,$CF *E812: FF CF '..'
PIA1PRA_VEC FCB $FF,$C8 *E814: FF C8 '..'
PIA1CRA_VEC FCB $FF,$C9 *E816: FF C9 '..'
PIA1PRB_VEC FCB $FF,$CA *E818: FF CA '..'
PIA1CRB_VEC FCB $FF,$CB *E81A: FF CB '..'
AC1DR_VEC FCB $FF,$D4 *E81C: FF D4 '..'
AC1SR_VEC FCB $FF,$D5 *E81E: FF D5 '..'
P_RX_RDY FCB $08 *E820: 08 '.' MASK FOR RECEIVE DATA REGISTER EMPTY BIT
P_TX_RDY FCB $10 *E821: 10 '.' MASK FOR TRANSMIT DATA REGISTER FULL BIT
* MOS 6551 ACIA1 EPROM PROGRAMMER DATA TRANSFER SUBROUTINES
P_WAITBYTE BSR P_GETBYTE *E822: 8D 03 '..'
BCS P_WAITBYTE *E824: 25 FC '%.'
RTS *E826: 39 '9'
P_GETBYTE PSHS A *E827: 34 02 '4.' SAVE OUTPUT BYTE TO STACK
LDA [>AC1SR_VEC,PCR] *E829: A6 9D FF F1 '....' GET ACIA STATUS
BITA >P_RX_RDY,PCR *E82D: A5 8D FF EF '....' RX REG HAS A BYTE?
BEQ P_NOTRDY *E831: 27 0B ''.' IF NOT, ALERT CALLER
PULS A *E833: 35 02 '5.' RESTORE OUTPUT BYTE FROM STACK
LDA [>AC1DR_VEC,PCR] *E835: A6 9D FF E3 '....' LOAD DATA BYTE FROM ACIA RECEIVE REG
ANDA #%01111111 *E839: 84 7F '..' MASK OUT HI BIT
ANDCC #$FE *E83B: 1C FE '..' CLEAR CARRY FLAG
RTS *E83D: 39 '9' RETURN WITH STATUS IN A, CARRY SET IS NOT READY
P_NOTRDY ORCC #$01 *E83E: 1A 01 '..' SET CARRY FLAG
PULS PC,A *E840: 35 82 '5.' RETURN
P_GETPUT PSHS A *E842: 34 02 '4.' SAVE OUTPUT BYTE TO STACK
BSR P_GETBYTE *E844: 8D E1 '..' CHECK IF NEXT BYTE IS AVAIL
BCS P_PUTBYTE *E846: 25 0A '%.' IF NOT, SEND OUTPUT BYTE AND RETURN
CMPA #$1B *E848: 81 1B '..' RECEIVED ESC?
BNE P_PUTBYTE *E84A: 26 06 '&.' IF NOT, SEND OUTPUT BYTE AND RETURN
BSR P_WAITBYTE *E84C: 8D D4 '..' IF SO, WAIT FOR NEXT BYTE
CMPA #$1B *E84E: 81 1B '..' ANOTHER ESC?
BEQ P_EPRM3 *E850: 27 B5 ''.'
P_PUTBYTE LDA [>AC1SR_VEC,PCR] *E852: A6 9D FF C8 '....' GET ACIA STATUS
BITA >P_TX_RDY,PCR *E856: A5 8D FF C7 '....' TX REG EMPTY?
BEQ P_PUTBYTE *E85A: 27 F6 ''.' IF NOT, WAIT FOR EMPTY
PULS A *E85C: 35 02 '5.' RESTORE OUTPUT BYTE FROM STACK
STA [>AC1DR_VEC,PCR] *E85E: A7 9D FF BA '....' PUT DATA BYTE INTO ACIA TRANSMIT REG
RTS *E862: 39 '9'
* EPROM PROGRAMMER ENTRY POINT
* FOR CMS 9614, 9617, 9618 HEADS
EPROM CLRB *E863: 5F '_'
SETDP $9D
LDA >P_DP,PCR *E864: A6 8D FF A2 '....'
TFR A,DP *E868: 1F 8B '..' DIRECT PAGE FOR BUFFER
TFR D,X *E86A: 1F 01 '..' DATA BUFFER DIRECT PAGE ADDRESS
LDB #$FF *E86C: C6 FF '..' SET LOOP COUNTER 255
EPRM2 CLR ,X+ *E86E: 6F 80 'o.' CLEAR THE BUFFER
DECB *E870: 5A 'Z' DECREMENT COUNTER
BNE EPRM2 *E871: 26 FB '&.' KEEP LOOPING IF >=0
LBSR P_INIT *E873: 17 05 E4 '...'
LDA #$FF *E876: 86 FF '..'
STA P_DEVICE *E878: 97 96 '..' RESET OFFSET STORE
EPRM3 LDD >P_DP,PCR *E87A: EC 8D FF 8C '....'
TFR A,DP *E87E: 1F 8B '..' SET DIRECT PAGE TO BUFFER
ADDD #$00FF *E880: C3 00 FF '...'
TFR D,S *E883: 1F 04 '..' S=$9DFF = END OF BUFFER?
LBSR ZEF1B *E885: 17 06 93 '...'
LBSR P_CRLF *E888: 17 03 CE '...'
LDA #$04 *E88B: 86 04 '..'
LBSR P_PRMSG *E88D: 17 02 8C '...' PRINT PROMPT
LBSR P_ININIT *E890: 17 04 04 '...'
BCS EPRM3 *E893: 25 E5 '%.'
LBSR P_CMDSRC *E895: 17 02 9E '...'
BCC P_CMDRUN *E898: 24 07 '$.'
LDA #$05 *E89A: 86 05 '..'
LBSR P_PRMSG *E89C: 17 02 7D '..}' PRINT "WHAT?"
BRA EPRM3 *E89F: 20 D9 ' .' BACK TO MAIN LOOP
P_CMDRUN LDD ,X *E8A1: EC 84 '..' JMP TO ADDR IN TABLE OFFSET BY ITS LOCATION
JSR D,X *E8A3: AD 8B '..' BASICALLY LBSR FROM TABLE LOCATION
BRA EPRM3 *E8A5: 20 D3 ' .' BACK TO MAIN LOOP WHEN DONE
P_CLR LBSR P_PARAM *E8A7: 17 03 21 '..!'
LDD P_END *E8AA: DC 86 '..'
SUBD P_START *E8AC: 93 84 '..'
ADDD #$0001 *E8AE: C3 00 01 '...'
TFR D,Y *E8B1: 1F 02 '..'
LDX P_RAMSTART *E8B3: 9E 88 '..'
LDA #$FF *E8B5: 86 FF '..'
ZE8B7 STA ,X+ *E8B7: A7 80 '..'
LEAY -$01,Y *E8B9: 31 3F '1?'
BNE ZE8B7 *E8BB: 26 FA '&.'
RTS *E8BD: 39 '9'
P_VIEW LBSR P_PARAM *E8BE: 17 03 0A '...'
LDD P_END *E8C1: DC 86 '..'
SUBD P_START *E8C3: 93 84 '..'
LDX P_START *E8C5: 9E 84 '..'
LDY P_RAMSTART *E8C7: 10 9E 88 '...'
ZE8CA PSHS D *E8CA: 34 06 '4.'
LBSR P_CRLF *E8CC: 17 03 8A '...'
LBSR P_X4HEX *E8CF: 17 02 95 '...'
LDA #$02 *E8D2: 86 02 '..' ..
LBSR P_SENDSPS *E8D4: 17 02 C6 '...' SEND 2 SPACES
LDB #$10 *E8D7: C6 10 '..'
ZE8D9 LDA ,Y+ *E8D9: A6 A0 '..'
LBSR ZEB77 *E8DB: 17 02 99 '...'
LEAX $01,X *E8DE: 30 01 '0.'
DECB *E8E0: 5A 'Z'
BNE ZE8D9 *E8E1: 26 F6 '&.'
LEAY -$10,Y *E8E3: 31 30 '10'
LDA #$02 *E8E5: 86 02 '..'
LBSR P_SENDSPS *E8E7: 17 02 B3 '...' SEND 2 SPACES
LDB #$10 *E8EA: C6 10 '..'
ZE8EC LDA ,Y+ *E8EC: A6 A0 '..'
ANDA #$7F *E8EE: 84 7F '..'
CMPA #$7F *E8F0: 81 7F '..'
BEQ ZE8F8 *E8F2: 27 04 ''.'
CMPA #$20 *E8F4: 81 20 '. '
BGE ZE8FA *E8F6: 2C 02 ',.'
ZE8F8 LDA #'. *E8F8: 86 2E '..'
ZE8FA LBSR P_GETPUT *E8FA: 17 FF 45 '..E'
DECB *E8FD: 5A 'Z'
BNE ZE8EC *E8FE: 26 EC '&.'
PULS D *E900: 35 06 '5.'
SUBD #$0010 *E902: 83 00 10 '...'
BCC ZE8CA *E905: 24 C3 '$.'
LBSR P_CRLF *E907: 17 03 4F '..O'
RTS *E90A: 39 '9'
P_VERF LBSR P_PARAM *E90B: 17 02 BD '...'
CLR M9D92 *E90E: 0F 92 '..'
LDD P_RAMSTART *E910: DC 88 '..'
STD M9D90 *E912: DD 90 '..'
ZE914 LBSR P_CHKDEV *E914: 17 03 66 '..f'
CLR M9D8F *E917: 0F 8F '..'
LDD P_START *E919: DC 84 '..'
ADDD P_ROMOFFS *E91B: D3 8A '..'
ANDA P_DEVEND *E91D: 94 9B '..'
ANDB M9D9C *E91F: D4 9C '..'
TFR D,Y *E921: 1F 02 '..'
LDD P_END *E923: DC 86 '..'
SUBD P_START *E925: 93 84 '..'
FCB $C3,$00,$01,$9E,$90 *E927: C3 00 01 9E 90 '.....'
ZE92C PSHS D *E92C: 34 06 '4.'
LBSR P_CHK_THIS1 *E92E: 17 05 92 '...'
CMPA ,X *E931: A1 84 '..'
BEQ ZE97D *E933: 27 48 ''H'
TST M9D8F *E935: 0D 8F '..'
BNE ZE955 *E937: 26 1C '&.'
PSHS A *E939: 34 02 '4.'
LBSR P_CRLF *E93B: 17 03 1B '...'
LDA #$07 *E93E: 86 07 '..'
LBSR P_PRMSG *E940: 17 01 D9 '...' PRINT "ADDR PR MM" x4
LBSR P_PRMSG *E943: 17 01 D6 '...'
LBSR P_PRMSG *E946: 17 01 D3 '...'
LBSR P_PRMSG *E949: 17 01 D0 '...'
LDA #$04 *E94C: 86 04 '..'
STA M9D8F *E94E: 97 8F '..'
LBSR P_CRLF *E950: 17 03 06 '...'
PULS A *E953: 35 02 '5.'
ZE955 TST M9D92 *E955: 0D 92 '..'
BEQ ZE962 *E957: 27 09 ''.'
EXG X,Y *E959: 1E 12 '..'
LBSR P_X4HEX *E95B: 17 02 09 '...'
EXG X,Y *E95E: 1E 12 '..'
BRA ZE965 *E960: 20 03 ' .'
ZE962 LBSR ZEC8A *E962: 17 03 25 '..%'
ZE965 LBSR ZEB77 *E965: 17 02 0F '...'
LDA ,X *E968: A6 84 '..'
LBSR ZEB77 *E96A: 17 02 0A '...'
LDA #$02 *E96D: 86 02 '..'
LBSR P_SENDSPS *E96F: 17 02 2B '..+' SEND 2 SPACES
DEC M9D8F *E972: 0A 8F '..'
BNE ZE97D *E974: 26 07 '&.'
LBSR P_CRLF *E976: 17 02 E0 '...'
LDA #$04 *E979: 86 04 '..'
STA M9D8F *E97B: 97 8F '..'
ZE97D TST M9D92 *E97D: 0D 92 '..'
BNE ZE983 *E97F: 26 02 '&.'
LEAX $01,X *E981: 30 01 '0.'
ZE983 PULS D *E983: 35 06 '5.'
SUBD #$0001 *E985: 83 00 01 '...'
BNE ZE98B *E988: 26 01 '&.'
RTS *E98A: 39 '9'
ZE98B LEAY $01,Y *E98B: 31 21 '1!'
CMPY P_DEVSZ *E98D: 10 9C 99 '...'
BNE ZE92C *E990: 26 9A '&.'
LDA #$02 *E992: 86 02 '..'
LBSR P_PRMSG *E994: 17 01 85 '...' PRINT "EXCEEDED SIZE"
RTS *E997: 39 '9'
P_TEST LBSR P_PARAM *E998: 17 02 30 '..0'
LDA #$01 *E99B: 86 01 '..'
STA M9D92 *E99D: 97 92 '..'
LBSR P_PARAM *E99F: 17 02 29 '..)'
LEAX MECF4,PCR *E9A2: 30 8D 03 4E '0..N'
STX M9D90 *E9A6: 9F 90 '..'
LBSR ZE914 *E9A8: 17 FF 69 '..i'
RTS *E9AB: 39 '9'
P_STAT LBSR P_PARAM *E9AC: 17 02 1C '...'
LDA P_DEVICE *E9AF: 96 96 '..'
INCA *E9B1: 4C 'L'
LEAX MECE4,PCR *E9B2: 30 8D 03 2E '0...'
LBSR P_PRMS0 *E9B6: 17 01 79 '..y'
LBSR P_CRLF *E9B9: 17 02 9D '...'
LDA #$00 *E9BC: 86 00 '..'
LBSR P_PRMSG *E9BE: 17 01 5B '..[' PRINT "START END"
LBSR P_CRLF *E9C1: 17 02 95 '...'
LDX P_START *E9C4: 9E 84 '..'
LBSR P_X4HEX *E9C6: 17 01 9E '...' SEND START
LDA #$02 *E9C9: 86 02 '..'
LBSR P_SENDSPS *E9CB: 17 01 CF '...' SEND 2 SPACES
LDX P_END *E9CE: 9E 86 '..'
LBSR P_X4HEX *E9D0: 17 01 94 '...' SEND END
LDA #$02 *E9D3: 86 02 '..'
LBSR P_SENDSPS *E9D5: 17 01 C5 '...' SEND 2 SPACES
LDX P_RAMSTART *E9D8: 9E 88 '..'
LBSR P_X4HEX *E9DA: 17 01 8A '...' SEND RAM-ADDR
LDA #$05 *E9DD: 86 05 '..'
LBSR P_SENDSPS *E9DF: 17 01 BB '...' SEND 5 SPACES
LDX P_ROMOFFS *E9E2: 9E 8A '..'
LBSR P_X4HEX *E9E4: 17 01 80 '...' SEND ROM-OFFSET
LBSR P_CRLF *E9E7: 17 02 6F '..o' SEND CRLF
RTS *E9EA: 39 '9'
P_PRO LBSR P_PARAM *E9EB: 17 01 DD '...'
LBSR P_CHKDEV *E9EE: 17 02 8C '...'
LDD P_START *E9F1: DC 84 '..'
ANDA P_DEVEND *E9F3: 94 9B '..'
ANDB M9D9C *E9F5: D4 9C '..'
ADDD P_ROMOFFS *E9F7: D3 8A '..'
TFR D,Y *E9F9: 1F 02 '..'
LDX P_RAMSTART *E9FB: 9E 88 '..'
LDD P_END *E9FD: DC 86 '..'
SUBD P_START *E9FF: 93 84 '..'
ADDD #$0001 *EA01: C3 00 01 '...'
PSHS Y,X,D *EA04: 34 36 '46'
P_PROG1 PSHS D *EA06: 34 06 '4.'
LBSR P_CHK_THIS1 *EA08: 17 04 B8 '...'
CMPA #$FF *EA0B: 81 FF '..'
BNE P_PROG2 *EA0D: 26 0B '&.'
LEAY $01,Y *EA0F: 31 21 '1!'
PULS D *EA11: 35 06 '5.'
SUBD #$0001 *EA13: 83 00 01 '...'
BNE P_PROG1 *EA16: 26 EE '&.'
BRA ZEA2E *EA18: 20 14 ' .'
P_PROG2 PULS D *EA1A: 35 06 '5.'
LDA #$08 *EA1C: 86 08 '..'
LBSR P_PRMSG *EA1E: 17 00 FB '...' PRINT "CONTINUE?"
LBSR P_WAITBYTE *EA21: 17 FD FE '...'
CMPA #$59 *EA24: 81 59 '.Y' GOT "Y"?
BEQ P_PROG3 *EA26: 27 03 ''.' DO THE PROGRAMMING
LBRA P_EPRM3 *EA28: 16 FD DC '...'
P_PROG3 LBSR P_GETPUT *EA2B: 17 FE 14 '...' ECHO
ZEA2E PULS Y,X,D *EA2E: 35 36 '56'
ZEA30 PSHS D *EA30: 34 06 '4.'
LDA ,X+ *EA32: A6 80 '..'
LBSR P_CHK_THIS2 *EA34: 17 04 B4 '...'
PULS D *EA37: 35 06 '5.'
SUBD #$0001 *EA39: 83 00 01 '...'
BEQ ZEA4A *EA3C: 27 0C ''.'
LEAY $01,Y *EA3E: 31 21 '1!'
CMPY P_DEVSZ *EA40: 10 9C 99 '...'
BNE ZEA30 *EA43: 26 EB '&.'
LDA #$02 *EA45: 86 02 '..'
LBSR P_PRMSG *EA47: 17 00 D2 '...' PRINT "EXCEEDED SIZE"
ZEA4A LDA #$07 *EA4A: 86 07 '..'
LBSR P_GETPUT *EA4C: 17 FD F3 '...' SEND BELL
LBSR P_VERF *EA4F: 17 FE B9 '...'
RTS *EA52: 39 '9'
P_READ LBSR P_PARAM *EA53: 17 01 75 '..u'
LBSR P_CHKDEV *EA56: 17 02 24 '..$'
LDD P_START *EA59: DC 84 '..'
ANDA P_DEVEND *EA5B: 94 9B '..'
ANDB M9D9C *EA5D: D4 9C '..'
ADDD P_ROMOFFS *EA5F: D3 8A '..'
TFR D,Y *EA61: 1F 02 '..'
LDX P_RAMSTART *EA63: 9E 88 '..'
LDD P_END *EA65: DC 86 '..'
SUBD P_START *EA67: 93 84 '..'
ADDD #$0001 *EA69: C3 00 01 '...'
ZEA6C PSHS D *EA6C: 34 06 '4.'
LBSR P_CHK_THIS1 *EA6E: 17 04 52 '..R'
STA ,X+ *EA71: A7 80 '..'
PULS D *EA73: 35 06 '5.'
SUBD #$0001 *EA75: 83 00 01 '...'
BEQ ZEA89 *EA78: 27 0F ''.'
LEAY $01,Y *EA7A: 31 21 '1!'
CMPY P_DEVSZ *EA7C: 10 9C 99 '...'
BNE ZEA6C *EA7F: 26 EB '&.'
LDA #$02 *EA81: 86 02 '..'
LBSR P_CRLF *EA83: 17 01 D3 '...'
LBSR P_PRMSG *EA86: 17 00 93 '...' PRINT "EXCEEDED SIZE"
ZEA89 RTS *EA89: 39 '9'
P_E LBSR ZEBF3 *EA8A: 17 01 66 '..f'
BCS ZEADD *EA8D: 25 4E '%N'
TFR D,X *EA8F: 1F 01 '..'
LDD P_RAMSTART *EA91: DC 88 '..'
SUBD P_START *EA93: 93 84 '..'
LEAY D,X *EA95: 31 8B '1.'
ZEA97 LBSR P_X4HEX *EA97: 17 00 CD '...'
LDA ,Y *EA9A: A6 A4 '..'
LBSR ZEB77 *EA9C: 17 00 D8 '...'
LBSR P_WAITBYTE *EA9F: 17 FD 80 '...'
BSR ZEB13 *EAA2: 8D 6F '.o'
CMPA #$20 *EAA4: 81 20 '. '
BNE ZEAB1 *EAA6: 26 09 '&.'
LEAX $01,X *EAA8: 30 01 '0.'
LEAY $01,Y *EAAA: 31 21 '1!'
LBSR P_CRLF *EAAC: 17 01 AA '...'
BRA ZEA97 *EAAF: 20 E6 ' .'
ZEAB1 CMPA #$5E *EAB1: 81 5E '.^'
BNE ZEABE *EAB3: 26 09 '&.'
LBSR P_CRLF *EAB5: 17 01 A1 '...'
LEAX -$01,X *EAB8: 30 1F '0.'
LEAY -$01,Y *EABA: 31 3F '1?'
BRA ZEA97 *EABC: 20 D9 ' .'
ZEABE LBSR ZEC3C *EABE: 17 01 7B '..{'
BCS ZEADD *EAC1: 25 1A '%.'
LDB #$10 *EAC3: C6 10 '..'
MUL *EAC5: 3D '='
PSHS B *EAC6: 34 04 '4.'
LBSR P_WAITBYTE *EAC8: 17 FD 57 '..W'
BSR ZEB13 *EACB: 8D 46 '.F'
LBSR ZEC3C *EACD: 17 01 6C '..l'
BCS ZEADE *EAD0: 25 0C '%.'
ADDA ,S+ *EAD2: AB E0 '..'
STA ,Y+ *EAD4: A7 A0 '..'
LEAX $01,X *EAD6: 30 01 '0.'
LBSR P_CRLF *EAD8: 17 01 7E '..~'
BRA ZEA97 *EADB: 20 BA ' .'
ZEADD RTS *EADD: 39 '9'
ZEADE PULS PC,A *EADE: 35 82 '5.'
P_2532 LDB #$02 *EAE0: C6 02 '..'
BRA P_SETDEV *EAE2: 20 16 ' .'
P_27128 LDB #$06 *EAE4: C6 06 '..'
BRA P_SETDEV *EAE6: 20 12 ' .'
P_2764 LDB #$05 *EAE8: C6 05 '..'
BRA P_SETDEV *EAEA: 20 0E ' .'
P_2732 LDB #$03 *EAEC: C6 03 '..'
BRA P_SETDEV *EAEE: 20 0A ' .'
P_2732A LDB #$04 *EAF0: C6 04 '..'
BRA P_SETDEV *EAF2: 20 06 ' .'
P_2716 LDB #$01 *EAF4: C6 01 '..'
BRA P_SETDEV *EAF6: 20 02 ' .'
P_2516 LDB #$00 *EAF8: C6 00 '..'
P_SETDEV PSHS B *EAFA: 34 04 '4.' SAVE DEVICE
LBSR P_INIT *EAFC: 17 03 5B '..['
PULS B *EAFF: 35 04 '5.' RESTORE DEVICE
LBSR CHEKOFFS *EB01: 17 04 9D '...'
BCC P_SETDEX *EB04: 24 08 '$.'
LDA #$01 *EB06: 86 01 '..'
BSR P_PRMSG *EB08: 8D 12 '..' PRINT "WRONG HEAD"
LDA #$FF *EB0A: 86 FF '..'
STA P_DEVICE *EB0C: 97 96 '..' RESET DEVICE TYPE
P_SETDEX RTS *EB0E: 39 '9'
P_EXIT JMP [svec_RST] *EB0F: 6E 9F FF FE 'n...'
ZEB13 LBSR P_ALNUM *EB13: 17 01 51 '..Q'
BCS ZEB1B *EB16: 25 03 '%.'
LBSR P_GETPUT *EB18: 17 FD 27 '..''
ZEB1B RTS *EB1B: 39 '9'
* PRINT OUT ERROR MESSAGE FROM MESSAGE ID IN A
P_PRMSG PSHS X,D *EB1C: 34 16 '4.'
LEAX P_MSG_TBL,PCR *EB1E: 30 8D 01 D3 '0...' LOAD POINTER TO MSG TBL INTO X
P_PRMS2 CMPA #$08 *EB22: 81 08 '..'
BLS P_PRMS3 *EB24: 23 02 '#.' CONTINUE IF MSG ID <8
LDA #$06 *EB26: 86 06 '..' OTHERWISE, UNKNOWN "ARRRGH"
P_PRMS3 ASLA *EB28: 48 'H' CONVERT A TO WORD OFFSET (MULT BY 2)
LDD A,X *EB29: EC 86 '..' GET THE POINTER TO THE MSG
LEAX D,X *EB2B: 30 8B '0.' GET THE ADDRESS OF THE MSG INTO X
LBSR P_SENDMSG *EB2D: 17 00 8E '...' SEND IT
PULS PC,X,D *EB30: 35 96 '5.' RETURN
P_PRMS0 PSHS X,D *EB32: 34 16 '4.'
BRA P_PRMS2 *EB34: 20 EC ' .'
* PARSE INPUT, COMPARE WITH P_CMD_TBL
P_CMDSRC LDX P_BUFFLOC *EB36: 9E 82 '..'
LEAY P_CMD_TBL,PCR *EB38: 31 8D 02 78 '1..x'
P_PARIN LDA ,X+ *EB3C: A6 80 '..'
LBSR P_ALNUM *EB3E: 17 01 26 '..&' CHECK IF ALPHA NUMERIC
BCS P_PAREX *EB41: 25 17 '%.'
TST ,Y *EB43: 6D A4 'm.'
BEQ P_PARI2 *EB45: 27 04 ''.'
CMPA ,Y+ *EB47: A1 A0 '..'
BEQ P_PARIN *EB49: 27 F1 ''.'
P_PARI2 LDX P_BUFFLOC *EB4B: 9E 82 '..'
TST ,Y+ *EB4D: 6D A0 'm.'
BNE P_PARI2 *EB4F: 26 FA '&.'
LEAY $02,Y *EB51: 31 22 '1"'
TST ,Y *EB53: 6D A4 'm.'
BNE P_PARIN *EB55: 26 E5 '&.'
P_PARER ORCC #$01 *EB57: 1A 01 '..'
RTS *EB59: 39 '9'
P_PAREX LEAX -$01,X *EB5A: 30 1F '0.'
TST ,Y *EB5C: 6D A4 'm.' CHECK FOR NULL STRING TERMINATOR
BNE P_PARER *EB5E: 26 F7 '&.' IF NOT, NOT COMMAND ERR
STX P_BUFFLOC *EB60: 9F 82 '..'
LEAX $01,Y *EB62: 30 21 '0!' LOAD POINTER TO COMMAND ADDRESS INTO X
ANDCC #$FE *EB64: 1C FE '..' CLEAR CARRY, FOUND COMMAND!
RTS *EB66: 39 '9'
* OUTPUT X AS 4 DIGIT HEX
P_X4HEX PSHS X,A *EB67: 34 12 '4.'
LDA $01,S *EB69: A6 61 '.a'
BSR P_BIN2HEX *EB6B: 8D 14 '..'
LDA $02,S *EB6D: A6 62 '.b'
BSR P_BIN2HEX *EB6F: 8D 10 '..'
LDA #$01 *EB71: 86 01 '..' SEND 1 SPACE
BSR P_SENDSPS *EB73: 8D 28 '.('
PULS PC,X,A *EB75: 35 92 '5.'
ZEB77 BSR P_BIN2HEX *EB77: 8D 08 '..'
PSHS A *EB79: 34 02 '4.'
LDA #$01 *EB7B: 86 01 '..'
BSR P_SENDSPS *EB7D: 8D 1E '..' SEND 1 SPACE
PULS PC,A *EB7F: 35 82 '5.'
P_BIN2HEX PSHS A *EB81: 34 02 '4.'
LSRA *EB83: 44 'D' GET HI NIBBLE
LSRA *EB84: 44 'D'
LSRA *EB85: 44 'D'
LSRA *EB86: 44 'D'
BSR P_SENDHEX *EB87: 8D 06 '..' THEN CONVERT IT
LDA ,S *EB89: A6 E4 '..' RESTORE BYTE
BSR P_SENDHEX *EB8B: 8D 02 '..' CONVERT IT
PULS PC,A *EB8D: 35 82 '5.' RESTORE A, RETURN
P_SENDHEX ANDA #$0F *EB8F: 84 0F '..' LO NIBBLE
ADDA #$30 *EB91: 8B 30 '.0' CONVERT TO ASCII NUM
CMPA #'9 *EB93: 81 39 '.9' RANGE 0-9?
BLS P_SENDHE2 *EB95: 23 02 '#.' DIGIT?
* IF SO SKIP CORRECTION
ADDA #7 *EB97: 8B 07 '..' ADJUST FOR A-F
P_SENDHE2 LBSR P_GETPUT *EB99: 17 FC A6 '...'
RTS *EB9C: 39 '9'
P_SENDSPS PSHS A *EB9D: 34 02 '4.'
PSHS A *EB9F: 34 02 '4.' SAVE A AS COUNTER ON STACK
LDA #$20 *EBA1: 86 20 '. ' SPACE CHAR IN A
P_SENDSP1 LBSR P_GETPUT *EBA3: 17 FC 9C '...' SEND CHAR IN A
DEC ,S *EBA6: 6A E4 'j.' DEC COUNTER
BNE P_SENDSP1 *EBA8: 26 F9 '&.' LOOP
PULS A *EBAA: 35 02 '5.' PULL EMPTY COUNTER
PULS PC,A *EBAC: 35 82 '5.' RESTORE ORIGINAL COUNT, RETURN
P_SKIPSPX PSHS X,A *EBAE: 34 12 '4.'
LDX P_BUFFLOC *EBB0: 9E 82 '..'
P_SKIPSP LDA ,X+ *EBB2: A6 80 '..'
CMPA #$20 *EBB4: 81 20 '. '
BEQ P_SKIPSP *EBB6: 27 FA ''.'
LEAX -$01,X *EBB8: 30 1F '0.'
STX P_BUFFLOC *EBBA: 9F 82 '..'
PULS PC,X,A *EBBC: 35 92 '5.'
P_SENDMSG PSHS X,A *EBBE: 34 12 '4.'
ZEBC0 LDA ,X+ *EBC0: A6 80 '..' GET NEXT MSG LETTER
BEQ ZEBC9 *EBC2: 27 05 ''.' CHECK FOR NULL END
LBSR P_GETPUT *EBC4: 17 FC 7B '..{' ACIA OUTPUT MESSAGE LETTER
BRA ZEBC0 *EBC7: 20 F7 ' .' CONTINUE UNTIL NULL
ZEBC9 PULS PC,X,A *EBC9: 35 92 '5.' RETURN
P_PARAM PSHS D *EBCB: 34 06 '4.'
BSR P_SKIPSPX *EBCD: 8D DF '..'
BSR ZEBF3 *EBCF: 8D 22 '."'
BCS ZEBDF *EBD1: 25 0C '%.'
PSHS D *EBD3: 34 06 '4.'
SUBD P_START *EBD5: 93 84 '..'
ADDD ,S *EBD7: E3 E4 '..'
STD P_RAMSTART *EBD9: DD 88 '..'
PULS D *EBDB: 35 06 '5.'
STD P_START *EBDD: DD 84 '..'
ZEBDF BSR ZEBF3 *EBDF: 8D 12 '..'
BCS ZEBE5 *EBE1: 25 02 '%.'
STD P_END *EBE3: DD 86 '..'
ZEBE5 BSR ZEBF3 *EBE5: 8D 0C '..'
BCS ZEBEB *EBE7: 25 02 '%.'
STD P_RAMSTART *EBE9: DD 88 '..'
ZEBEB BSR ZEBF3 *EBEB: 8D 06 '..'
BCS ZEBF1 *EBED: 25 02 '%.'
STD P_ROMOFFS *EBEF: DD 8A '..'
ZEBF1 PULS PC,D *EBF1: 35 86 '5.'
ZEBF3 PSHS X *EBF3: 34 10 '4.'
LDX P_BUFFLOC *EBF5: 9E 82 '..'
LDD #$0000 *EBF7: CC 00 00 '...'
PSHS D *EBFA: 34 06 '4.'
LDA ,X *EBFC: A6 84 '..'
CMPA #$0D *EBFE: 81 0D '..'
BEQ ZEC36 *EC00: 27 34 ''4'
BSR P_SKIPSPX *EC02: 8D AA '..'
LDX P_BUFFLOC *EC04: 9E 82 '..'
LDA ,X+ *EC06: A6 80 '..'
BSR ZEC3C *EC08: 8D 32 '.2'
BCS ZEC36 *EC0A: 25 2A '%*'
LDX P_BUFFLOC *EC0C: 9E 82 '..'
ZEC0E LDA ,X+ *EC0E: A6 80 '..'
BSR ZEC3C *EC10: 8D 2A '.*'
BCS ZEC2A *EC12: 25 16 '%.'
ASL $01,S *EC14: 68 61 'ha'
ROL ,S *EC16: 69 E4 'i.'
ASL $01,S *EC18: 68 61 'ha'
ROL ,S *EC1A: 69 E4 'i.'
ASL $01,S *EC1C: 68 61 'ha'
ROL ,S *EC1E: 69 E4 'i.'
ASL $01,S *EC20: 68 61 'ha'
ROL ,S *EC22: 69 E4 'i.'
ADDA $01,S *EC24: AB 61 '.a'
STA $01,S *EC26: A7 61 '.a'
BRA ZEC0E *EC28: 20 E4 ' .'
ZEC2A CMPA #$0D *EC2A: 81 0D '..'
BNE ZEC30 *EC2C: 26 02 '&.'
LEAX -$01,X *EC2E: 30 1F '0.'
ZEC30 STX P_BUFFLOC *EC30: 9F 82 '..'
ANDCC #$FE *EC32: 1C FE '..'
PULS PC,X,D *EC34: 35 96 '5.'
ZEC36 STX P_BUFFLOC *EC36: 9F 82 '..'
ORCC #$01 *EC38: 1A 01 '..'
PULS PC,X,D *EC3A: 35 96 '5.'
ZEC3C PSHS A *EC3C: 34 02 '4.'
P_HEX2DEC SUBA #$30 *EC3E: 80 30 '.0'
BCS ZEC55 *EC40: 25 13 '%.'
CMPA #$09 *EC42: 81 09 '..'
BLS ZEC50 *EC44: 23 0A '#.'
SUBA #$07 *EC46: 80 07 '..'
CMPA #$09 *EC48: 81 09 '..'
BLS ZEC55 *EC4A: 23 09 '#.'
CMPA #$0F *EC4C: 81 0F '..'
BGT ZEC55 *EC4E: 2E 05 '..'
ZEC50 LEAS $01,S *EC50: 32 61 '2a'
ANDCC #$FE *EC52: 1C FE '..'
RTS *EC54: 39 '9'
ZEC55 ORCC #$01 *EC55: 1A 01 '..'
PULS PC,A *EC57: 35 82 '5.'
P_CRLF PSHS A *EC59: 34 02 '4.'
LDA #$0D *EC5B: 86 0D '..' CR CHAR
LBSR P_GETPUT *EC5D: 17 FB E2 '...'
LDA #$0A *EC60: 86 0A '..' LF CHAR
LBSR P_GETPUT *EC62: 17 FB DD '...'
PULS PC,A *EC65: 35 82 '5.'
P_ALNUM CMPA #$30 *EC67: 81 30 '.0' TEST LOWER BOUND
BLT P_ALNUER *EC69: 2D 0F '-.' EXIT IF NOT A DIGIT
CMPA #$39 *EC6B: 81 39 '.9' TEST HIGH BOUND
BLE P_ALNU2 *EC6D: 2F 08 '/.' PROCEED IF IT IS AN ASCII NUMBER
CMPA #$41 *EC6F: 81 41 '.A'
BLT P_ALNUER *EC71: 2D 07 '-.' EXIT IF LOWER THAN LETTER
CMPA #$5A *EC73: 81 5A '.Z'
BGT P_ALNUER *EC75: 2E 03 '..' EXIT IF HIGER THAN LETTER
P_ALNU2 ANDCC #$FE *EC77: 1C FE '..' ONLY ACII LETTERS OR NUMBERS GET HERE
RTS *EC79: 39 '9'
P_ALNUER ORCC #$01 *EC7A: 1A 01 '..'
RTS *EC7C: 39 '9'
P_CHKDEV TST P_DEVICE *EC7D: 0D 96 '..' DEVICE TYPE NOT SET?
BMI P_DEVMSG *EC7F: 2B 01 '+.' ALERT USER
RTS *EC81: 39 '9'
P_DEVMSG LDA #$03 *EC82: 86 03 '..'
LBSR P_PRMSG *EC84: 17 FE 95 '...' PRINT "SELECT DEVICE"
LBRA P_EPRM3 *EC87: 16 FB 7D '..}'
ZEC8A PSHS X,D,CC *EC8A: 34 17 '4.'
LDD P_START *EC8C: DC 84 '..'
SUBD P_RAMSTART *EC8E: 93 88 '..'
LEAX D,X *EC90: 30 8B '0.'
LBSR P_X4HEX *EC92: 17 FE D2 '...'
PULS PC,X,D,CC *EC95: 35 97 '5.'
P_ININIT LDB #$00 *EC97: C6 00 '..'
TFR DP,A *EC99: 1F B8 '..'
STD P_BUFFLOC *EC9B: DD 82 '..' SAVE START BUFF LOCATION
TFR D,X *EC9D: 1F 01 '..' START BUFF IN X (END IN S)
CLR ,-S *EC9F: 6F E2 'o.' CLEAR END OF BUFFER
P_INHNDL LBSR P_WAITBYTE *ECA1: 17 FB 7E '..~' WAIT FOR INPUT
CMPA #$08 *ECA4: 81 08 '..' BACKSPACE?
BNE P_INHNDL1 *ECA6: 26 17 '&.' IF NOT, JUMP AHEAD TO ???
CMPX P_BUFFLOC *ECA8: 9C 82 '..' IF ON THE CORRECT BYTE,
BEQ P_INHNDL *ECAA: 27 F5 ''.' GET THE NEXT INPUT BYTE
LBSR P_GETPUT *ECAC: 17 FB 93 '...' ECHO
LDA #$20 *ECAF: 86 20 '. ' SPACE CHAR
LBSR P_GETPUT *ECB1: 17 FB 8E '...' TO ACIA
LDA #$08 *ECB4: 86 08 '..' BACK SPACE CHAR
LBSR P_GETPUT *ECB6: 17 FB 89 '...' TO ACIA
LEAX -$01,X *ECB9: 30 1F '0.' GO TO PREVIOUS BUFFER BYTE
DEC ,S *ECBB: 6A E4 'j.'
BRA P_INHNDL *ECBD: 20 E2 ' .' CHECK FOR NEXT INPUT
P_INHNDL1 CMPA #$0D *ECBF: 81 0D '..' CARRIAGE RETURN?
BNE P_INHNDL2 *ECC1: 26 10 '&.'
BSR P_CRLF *ECC3: 8D 94 '..' ECHO CRLF
STA ,X *ECC5: A7 84 '..' STORE INPUT BYTE IN BUFFER
LEAS $01,S *ECC7: 32 61 '2a'
CMPX P_BUFFLOC *ECC9: 9C 82 '..' ON THE RIGHT BYTE?
BEQ P_INHNDLE *ECCB: 27 03 ''.'
ANDCC #$FE *ECCD: 1C FE '..' CLEAR CARRY
RTS *ECCF: 39 '9' RETURN NORMALLY
P_INHNDLE ORCC #$01 *ECD0: 1A 01 '..' SET CARRY
RTS *ECD2: 39 '9' RETURN INDICATING ERROR
P_INHNDL2 TST ,S *ECD3: 6D E4 'm.'
BMI P_INHNDL *ECD5: 2B CA '+.'
CMPA #$20 *ECD7: 81 20 '. '
BLT P_INHNDL *ECD9: 2D C6 '-.' SKIP CTRL CHARS
STA ,X+ *ECDB: A7 80 '..' STORE A, INCREMENT BUFFER LOC POINTER
LBSR P_GETPUT *ECDD: 17 FB 62 '..b' GET NEXT INPUT CHAR
INC ,S *ECE0: 6C E4 'l.'
BRA P_INHNDL *ECE2: 20 BD ' .' LOOP
MECE4 FCB $00,$87,$01,$0B,$01,$04 *ECE4: 00 87 01 0B 01 04 '......'
FCB $01,$19,$01,$12,$01 *ECEA: 01 19 01 12 01 '.....'
FCC " " *ECEF: 20 ' '
FCB $01 *ECF0: 01 '.'
FCC "(" *ECF1: 28 '('
FCB $01 *ECF2: 01 '.'
FCC "/" *ECF3: 2F '/'
MECF4 FCB $FF *ECF4: FF '.'
P_MSG_TBL FDB $0012 *ECF5: 00 12 '..' #$00. OFFSET TO ED07 STRING "START END"
FDB $0032 *ECF7: 00 32 '.2' #$01. OFFSET TO ED27 STRING "WRONG HEAD"
FDB $004D *ECF9: 00 4D '.M' #$02. OFFSET TO ED42 STRING "EXEEDED SIZE"
FDB $0076 *ECFB: 00 76 '.v' #$03. OFFSET TO ED6B STRING "PLEASE SELECT"
FDB $009D *ECFD: 00 9D '..' #$04. OFFSET TO ED92 STRING (PROMPT)
FDB $00A1 *ECFF: 00 A1 '..' #$05. OFFSET TO ED96 STRING "WHAT?"
FDB $00A7 *ED01: 00 A7 '..' #$06. OFFSET TO ED9C STRING "ARRRGH!!!"
FDB $00B1 *ED03: 00 B1 '..' #$07. OFFSET TO EDA6 STRING "ADDR PR MM"
FDB $0094 *ED05: 00 94 '..' #$08. OFFSET TO ED89 STRING "CHANGE?"
FCC "START END RAM-ADDR " *ED07: 53 54 41 52 54 20 20 45 4E 44 20 20 52 41 4D 2D 41 44 44 52 20 'START END RAM-ADDR '
FCC "ROM-OFFSET" *ED1C: 52 4F 4D 2D 4F 46 46 53 45 54 'ROM-OFFSET'
FCB $00 *ED26: 00 '.'
FCC "WRONG HEAD FOR THAT D" *ED27: 57 52 4F 4E 47 20 48 45 41 44 20 46 4F 52 20 54 48 41 54 20 44 'WRONG HEAD FOR THAT D'
FCC "EVICE" *ED3C: 45 56 49 43 45 'EVICE'
FCB $00 *ED41: 00 '.'
FCC "YOU HAVE EXCEEDED THE" *ED42: 59 4F 55 20 48 41 56 45 20 45 58 43 45 45 44 45 44 20 54 48 45 'YOU HAVE EXCEEDED THE'
FCC " SIZE OF THE DEVICE" *ED57: 20 53 49 5A 45 20 4F 46 20 54 48 45 20 44 45 56 49 43 45 ' SIZE OF THE DEVICE'
FCB $00 *ED6A: 00 '.'
FCC "PLEASE SELECT THE DEV" *ED6B: 50 4C 45 41 53 45 20 53 45 4C 45 43 54 20 54 48 45 20 44 45 56 'PLEASE SELECT THE DEV'
FCC "ICE TYPE" *ED80: 49 43 45 20 54 59 50 45 'ICE TYPE'
FCB $00 *ED88: 00 '.'
FCC "CHANGE? " *ED89: 43 48 41 4E 47 45 3F 20 'CHANGE? '
FCB $00 *ED91: 00 '.'
FCC "P* " *ED92: 50 2A 20 'P* '
FCB $00 *ED95: 00 '.'
FCC "WHAT?" *ED96: 57 48 41 54 3F 'WHAT?'
FCB $00 *ED9B: 00 '.'
FCC "ARRRGH!!!" *ED9C: 41 52 52 52 47 48 21 21 21 'ARRRGH!!!'
FCB $00 *EDA5: 00 '.'
FCC "ADDR PR MM " *EDA6: 41 44 44 52 20 50 52 20 4D 4D 20 20 20 'ADDR PR MM '
FCB $00 *EDB3: 00 '.'
P_CMD_TBL FCC "PROG" *EDB4: 50 52 4F 47 'PROG'
FCB $00 *EDB8: 00 '.'
FDB $FC32 *EDB9: FC 32 '.2' $E9EB
FCC "STAT" *EDBB: 53 54 41 54 'STAT'
FCB $00 *EDBF: 00 '.'
FDB $FBEC *EDC0: FB EC '..' $E9AC
FCC "TEST" *EDC2: 54 45 53 54 'TEST'
FCB $00 *EDC6: 00 '.'
FDB $FBD1 *EDC7: FB D1 '..' $E998
FCC "VERF" *EDC9: 56 45 52 46 'VERF'
FCB $00 *EDCD: 00 '.'
FDB $FB3D *EDCE: FB 3D '.=' $E90B
FCC "VIEW" *EDD0: 56 49 45 57 'VIEW'
FCB $00 *EDD4: 00 '.'
FDB $FAE9 *EDD5: FA E9 '..' $E8BE
FCC "CLR" *EDD7: 43 4C 52 'CLR'
FCB $00 *EDDA: 00 '.'
FDB $FACC *EDDB: FA CC '..' $E8A7
FCC "READ" *EDDD: 52 45 41 44 'READ'
FCB $00 *EDE1: 00 '.'
FDB $FC71 *EDE2: FC 71 '.q' $EA53
FCB 'E,$00 *EDE4: 45 00 'E.'
FDB $FCA4 *EDE6: FC A4 '..' $EA8A
FCC "2716" *EDE8: 32 37 31 36 '2716'
FCB $00 *EDEC: 00 '.'
FDB $FD07 *EDED: FD 07 '..' $EAF4
FCC "2516" *EDEF: 32 35 31 36 '2516'
FCB $00 *EDF3: 00 '.'
FDB $FD04 *EDF4: FD 04 '..' $EAF8
FCC "2732" *EDF6: 32 37 33 32 '2732'
FCB $00 *EDFA: 00 '.'
FDB $FCF1 *EDFB: FC F1 '..' $EAEC
FCC "2532" *EDFD: 32 35 33 32 '2532'
FCB $00 *EE01: 00 '.'
FDB $FCDE *EE02: FC DE '..' $EAE0
FCC "2732A" *EE04: 32 37 33 32 41 '2732A'
FCB $00 *EE09: 00 '.'
FDB $FCE6 *EE0A: FC E6 '..' $EAF0
FCC "2764" *EE0C: 32 37 36 34 '2764'
FCB $00 *EE10: 00 '.'
FDB $FCD7 *EE11: FC D7 '..' $EAE0
FCC "27128" *EE13: 32 37 31 32 38 '27128'
FCB $00 *EE18: 00 '.'
FDB $FCCB *EE19: FC CB '..' $EAE4
FCC "EXIT" *EE1B: 45 58 49 54 'EXIT'
FCB $00 *EE1F: 00 '.'
FDB $FCEF *EE20: FC EF '..' $EB0F
FCC "BYE" *EE22: 42 59 45 'BYE'
FCB $00 *EE25: 00 '.'
FDB $FCE9 *EE26: FC E9 '..' $EB0F
FCB $00 *EE28: 00 '.'
* $17 HEAD - 2K
P_CTRL_TBL FCB $15,$05,$01,$0B,$08,$00 *EE29: 15 05 01 0B 08 00 '......'
FCB $17 *EE2F: 17 '.'
* $14 HEAD
FCC "F" *EE30: 46 'F'
FCB $06,$02,$CA,$08,$00,$14 *EE31: 06 02 CA 08 00 14 '......'
FCB $14,$04,$00,$0A,$10,$00 *EE37: 14 04 00 0A 10 00 '......'
FCB $17,$16 *EE3D: 17 16 '..'
FCC "G" *EE3F: 47 'G'
FCB $07,$CB,$10,$00,$14,$16 *EE40: 07 CB 10 00 14 16 '......'
FCC "G" *EE46: 47 'G'
FCB $07,$E3,$10,$00,$14 *EE47: 07 E3 10 00 14 '.....'
* $18 HEAD
FCC "vf I " *EE4C: 76 66 20 49 20 'vf I '
FCB $00,$18 *EE51: 00 18 '..'
FCC "vf I@" *EE53: 76 66 20 49 40 'vf I@'
FCB $00,$18 *EE58: 00 18 '..'
* CLEAR THE PIA I/O ADDRESS STORED AT E81A-E80C
P_INIT LEAY AC1DR_VEC,PCR *EE5A: 31 8D F9 BE '1...' LOAD EFFECTIVE ADDRESS OF AC1CR_VEC
LDA #$08 *EE5E: 86 08 '..' 8 PIA REGISTERS TO CLEAR
P_INI1 CLR [,--Y] *EE60: 6F B3 'o.' DECREMENT EXTENDED ADDRESS
DECA *EE62: 4A 'J' DEC COUNTER
BNE P_INI1 *EE63: 26 FB '&.' CONTINUE TO CLEAR REGISTERS
* LOAD HEAD TYPE FROM PIA1, PORTB, BIT 6,7
LDA #$0F *EE65: 86 0F '..' SET 4-7 IN, 0-3 OUT
STA [PIA1PRB_VEC,PCR] *EE67: A7 9D F9 AD '....' SAVE TO PIA1 DDRB
LDA #%00110100 *EE6B: 86 34 '.4' SELECT POR, SET CB2-LO
STA [PIA1CRB_VEC,PCR] *EE6D: A7 9D F9 A9 '....' SAVE TO PIA1 CRB
LDA [PIA1PRB_VEC,PCR] *EE71: A6 9D F9 A3 '....' SAVE PIA1 PORB
CLR [PIA1CRB_VEC,PCR] *EE75: 6F 9D F9 A1 'o...' SELECT PIA1 DDRB, CB2 INPUT
* CHECK HEAD TYPE
* CMS 9614, 9617, 9618 AND INIT ACCORDINGLY
ANDA #%11000000 *EE79: 84 C0 '..' CHECK ONLY PB6 AND PB7
BEQ P_IN3 *EE7B: 27 12 ''.' IF BOTH,
CMPA #%10000000 *EE7D: 81 80 '..' CHECK IF PB7 HI
BEQ P_IN2 *EE7F: 27 13 ''.' IF SO
CMPA #%01000000 *EE81: 81 40 '.@' CHECK IF PB6 HI
BEQ P_IN1 *EE83: 27 1A ''.' IF SO
LDA #$01 *EE85: 86 01 '..'
LBSR P_PRMSG *EE87: 17 FC 92 '...' PRINT "WRONG HEAD"
LDB #$01 *EE8A: C6 01 '..'
ORCC #$01 *EE8C: 1A 01 '..' SET CARRY FLAG
RTS *EE8E: 39 '9' RETURN WITH ERROR IN CARRY
P_IN3 LDD #ID1700 *EE8F: CC 17 00 '...'
BRA P_2INIT *EE92: 20 0E ' .'
P_IN2 LDA #%00111111 *EE94: 86 3F '.?' SET 6-7 IN, 0-5 OUT
STA [PIA1PRB_VEC,PCR] *EE96: A7 9D F9 7E '...~' SAVE TO PIA1 DDRB
LDD #ID1805 *EE9A: CC 18 05 '...'
BRA P_2INIT *EE9D: 20 03 ' .'
P_IN1 LDD #ID1401 *EE9F: CC 14 01 '...'
P_2INIT STA P_HEAD *EEA2: 97 9D '..' STORE HEAD TYPE ($14, $17, $18)
LDA #%11111111 *EEA4: 86 FF '..' SET 0-7 OUTPUT
STA [PIA1PRA_VEC,PCR] *EEA6: A7 9D F9 6A '...j' SAVE TO PIA1 DDRA
STA [PIA2PRA_VEC,PCR] *EEAA: A7 9D F9 5E '...^' SAVE TO PIA2 DDRA
LDA #%00110100 *EEAE: 86 34 '.4' SELECT POR, SET CA/B2-LO
STA [PIA2CRA_VEC,PCR] *EEB0: A7 9D F9 5A '...Z' SAVE TO PIA2 CRA
STA [PIA1CRA_VEC,PCR] *EEB4: A7 9D F9 5E '...^' SAVE TO PIA1 CRA
STA [PIA1CRB_VEC,PCR] *EEB8: A7 9D F9 5E '...^' SAVE TO PIA1 CRB
LBSR CHEKOFFS *EEBC: 17 00 E2 '...'
CLRB *EEBF: 5F '_'
ANDCC #$FE *EEC0: 1C FE '..' CLEAR CARRY
RTS *EEC2: 39 '9' DONE
P_CHK_THIS1 LDA P_THIS *EEC3: 96 93 '..'
CMPA #$01 *EEC5: 81 01 '..'
BEQ ZEECC *EEC7: 27 03 ''.'
LBSR P_SET_THIS1 *EEC9: 17 00 7D '..}'
ZEECC CMPY P_DEVSZ *EECC: 10 9C 99 '...'
BGE ZEEE3 *EECF: 2C 12 ',.'
TFR Y,D *EED1: 1F 20 '. '
STA [PIA1PRB_VEC,PCR] *EED3: A7 9D F9 41 '...A'
STB [PIA1PRA_VEC,PCR] *EED7: E7 9D F9 39 '...9'
LDA [PIA2PRB_VEC,PCR] *EEDB: A6 9D F9 31 '...1'
CLRB *EEDF: 5F '_'
RTS *EEE0: 39 '9'
ZEEE1 PULS A *EEE1: 35 02 '5.'
ZEEE3 BSR ZEF1B *EEE3: 8D 36 '.6'
CLRA *EEE5: 4F 'O'