-
Notifications
You must be signed in to change notification settings - Fork 0
/
eprom.asm
1530 lines (1423 loc) · 30.7 KB
/
eprom.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
; EPROM and Flash Reader
; Copyright 2008 Kevin Timmerman
; http://www.compendiumarcana.com/eprom
;
; This program is free software; you can redistribute it and/or modify
; it under the terms of the GNU General Public License as published by
; the Free Software Foundation; either version 3 of the License, or
; (at your option) any later version.
;
; This program is distributed in the hope that it will be useful,
; but WITHOUT ANY WARRANTY; without even the implied warranty of
; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
; GNU General Public License for more details.
;
; You should have received a copy of the GNU General Public License
; along with this program. If not, see <http://www.gnu.org/licenses/>.
;
; r Read EPROM
; b Binary
; h Hex
; o Configuration
; ` 1K 82S181, RY1133 (512B TBP28S42N)
; ! 2K 82S191, TPB28L166, MB7138
; 1 2K 27C16
; 2 4K 27C32
; 3 8K 27C64
; 4 16K 27C128
; 5 32K 27C256
; 6 64K 27C512
; 7 128K 27C010
; 8 256K 27C020
; 9 512K 27C040
; 0 1M 27C080
#ifdef __18F4550
#include <p18f4550.inc>
#endif
; --- Configuration Fuses
__config _CONFIG1L, _PLLDIV_1_1L & _CPUDIV_OSC1_PLL2_1L & _USBDIV_2_1L
__config _CONFIG1H, _FOSC_INTOSC_EC_1H & _FCMEM_ON_1H & _IESO_OFF_1H
__config _CONFIG2L, _PWRT_ON_2L & _BOR_ON_ACTIVE_2L & _BORV_21_2L & _VREGEN_ON_2L
; *** Change _WDT_OFF_2H -> _WDT_ON_2H for release build
__config _CONFIG2H, _WDT_OFF_2H & _WDTPS_1_2H
__config _CONFIG3H, _MCLRE_ON_3H & _LPT1OSC_OFF_3H & _PBADEN_OFF_3H & _CCP2MX_OFF_3H
; *** Change _DEBUG_ON_4L -> _DEBUG_OFF_4L for release build
__config _CONFIG4L, _STVREN_OFF_4L & _LVP_OFF_4L & _ICPRT_OFF_4L & _XINST_OFF_4L & _DEBUG_OFF_4L
__config _CONFIG5L, _CP0_OFF_5L & _CP1_OFF_5L & _CP2_OFF_5L & _CP3_OFF_5L
__config _CONFIG5H, _CPB_OFF_5H & _CPD_OFF_5H
__config _CONFIG6L, _WRT0_OFF_6L & _WRT1_OFF_6L & _WRT2_OFF_6L & _WRT3_OFF_6L
__config _CONFIG6H, _WRTB_OFF_6H & _WRTC_OFF_6H & _WRTD_OFF_6H
__config _CONFIG7L, _EBTR0_OFF_7L & _EBTR1_OFF_7L & _EBTR2_OFF_7L & _EBTR3_OFF_7L
__config _CONFIG7H, _EBTRB_OFF_7H
; Set default radix to decimal
radix dec
; --- I/O
pAddr equ LATB ; EEPROM/Flash high address (A12->A19)
pReset equ LATC ; 4040 Reset
bReset equ 0
pClk equ LATC ; 4040 Clock
bClk equ 1
pData equ PORTD ; EPROM/Flash data bus
pOE equ LATE ; EPROM/Flash Output Enable
bOE equ 0
pCE equ LATE ; EPROM/Flash Chip Enable
bCE equ 1
pPWR32 equ LATE ; Power control for pin 32
bPWR32 equ 2
; --- Register usage
cblock 0x00 ;
temp ; Temps
temp1 ;
temp2 ;
flags ; Flags
;
; - Chip config
size_l ; Chip size low
size_m ; Chip size mid
size_h ; Chip size high
pgm_mask ; PGM mask
pwr_mask ; Power mask
ctl_mask ; Control line mask
;
; - Read
addr_l ; Address low (0->7)
addr_m ; Address mid (8->15)
addr_h ; Address high (16->23)
len_l ; Length low
len_m ; Length mid
len_h ; Length high
;
; - Hex
data_len ; Hex line data length
rec_type ; Hex line record type
hex_count ; Hex line byte index
chksum ; Checksum
;
; - XYModem
xy_block ; XYModem block
xy_count ; XYModem block byte count
xy_chksum ; XModem cheksum
xy_crc_h ; XYModem CRC
xy_crc_l ;
addr_h_old
endc ;
;
fHex equ 0 ; Hex upload flag
fXYModem equ 1 ; XYModem flag
fAbort equ 4 ; Abort XYModem flag
fCRC equ 5 ; Use CRC flag (YModem,XModem-1K)
fFilename equ 6 ; Send file name flag (YModem)
fNoAck equ 7 ; No ACK flag (YModem-G)
;
fcOE equ 0 ; Set OE high
fcCE equ 1 ; Set CE high
fcA10 equ 2 ; Set A10 high
fcA11asA10 equ 3 ; Use A11 as A10
; Control chars used by XYModem
SOH equ 0x01
EOT equ 0x04
ACK equ 0x06
NAK equ 0x15
CAN equ 0x18
; ----- Reset -----
org 0
; Goto main code
bra Start
; ----- ISR -----
org 8
retfie ; Enable global interrupts and return
; ----- Main starts here -----
Start
movlw (1<<IRCF2) | (1<<IRCF1) | (1<<IRCF0) | (1<<SCS1); Setup prescaler for 8 MHz internal clock (1 MHz default)
movwf OSCCON
movlw (1<<PCFG3) | (1<<PCFG2) | (1<<PCFG1) | (1<<PCFG0) ; Make all ADC pins digital
movwf ADCON1
; Setup port A - All outputs low
clrf LATA
clrf TRISA
movlw (1<<(17-12)) | (1<<(13-12)) ; Setup port B - All outputs low
movwf pAddr ; (A13 and A17 are inverted)
clrf TRISB
; Setup port C - Serial I/O as input, all others output
clrf LATC
movlw (1<<RX) | (1<<TX)
movwf TRISC
; Setup port D - All outputs
clrf LATD
clrf TRISD
clrf LATE
bsf pPWR32,bPWR32 ; Turn off power
clrf TRISE ; Setup port E - All outputs
;movlw 52-1 ; 8000000 / 16 / 52 = 9,615
;movlw 26-1 ; 8000000 / 16 / 26 = 19,231
movlw 13-1 ; 8000000 / 16 / 13 = 38,462
movwf SPBRG
movlw 0
movwf BAUDCON
movlw (1<<TXEN) | (1<<BRGH)
movwf TXSTA
movlw (1<<SPEN) | (1<<CREN)
movwf RCSTA
;DEBUG
;loopy
; movlw 0xFF
; movwf PORTA
;
; movlw 10
; call Delay_ms
;
; movlw 0x00
; movwf PORTA
;
; movlw 10
; call Delay_ms
;
; goto loopy
clrf flags
; Default to hex upload
bsf flags,fHex
; Default chip selection
call Setup27C256
movlw 'r'
call SerTx
movlw 's'
call SerTx
movlw 't'
call SerTx
call CRLF
call ShowHelp
GetCmd
movlw '>'
call SerTx
call SerRx
call DispatchCmd
goto GetCmd
DispatchCmd
movwf temp
xorlw 'C'
btfsc STATUS,Z
goto XYModemCRC
xorlw 'C'^'G'
btfsc STATUS,Z
goto YModemG
xorlw 'G'^NAK
btfsc STATUS,Z
goto XModem
movf temp,W
call SerTx
call CRLF
movf temp,W
xorlw 'r'
btfsc STATUS,Z
goto UploadEprom
xorlw 'r'^'o'
btfsc STATUS,Z
goto ShowOptions
xorlw 'o'^'h'
bz SetHexMode
xorlw 'h'^'b'
bz SetBinaryMode
xorlw 'b'^'1'
bz Setup27C16
xorlw '1'^'2'
bz Setup27C32
xorlw '2'^'3'
bz Setup27C64
xorlw '3'^'4'
bz Setup27C128
xorlw '4'^'5'
bz Setup27C256
xorlw '5'^'6'
bz Setup27C512
xorlw '6'^'7'
bz Setup27C010
xorlw '7'^'8'
bz Setup27C020
xorlw '8'^'9'
bz Setup27C040
xorlw '9'^'0'
bz Setup27C080
xorlw '0'^'`'
bz Setup82S181
xorlw '`'^'!'
bz Setup82S191;
movlw 'W'
call SerTx
movlw 'T'
call SerTx
movlw 'F'
call SerTx
movlw '?'
call SerTx
call CRLF
call ShowHelp
goto CRLF
SetHexMode
bsf flags,fHex
return
SetBinaryMode
bcf flags,fHex
return
Setup27C16 ; Setup for 27C16 - 2K byte
clrf size_h ; Size
movlw 16/2
movwf size_m
clrf size_l
clrf pgm_mask
movlw 1<<(13-12) ; A13/PWR
movwf pwr_mask
clrf ctl_mask ; Enable
return
Setup27C32 ; Setup for 27C32 - 4K byte
clrf size_h ; Size
movlw 32/2 ;
movwf size_m ;
clrf size_l ;
;
clrf pgm_mask ;
;
movlw 1<<(13-12) ; A13/PWR
movwf pwr_mask ;
;
clrf ctl_mask ; Enable
;
return ;
Setup27C64 ; Setup for 27C64 - 8K byte
clrf size_h ; Size
movlw 64/2 ;
movwf size_m ;
clrf size_l ;
;
movlw 1<<(14-12) ; A14/*PGM
movwf pgm_mask ;
;
movlw 1<<(17-12) ; A17/PWR
movwf pwr_mask ;
;
clrf ctl_mask ; Enable
;
return ;
Setup27C128 ; Setup for 27C128 - 16K byte
clrf size_h ; Size
movlw 128/2 ;
movwf size_m ;
clrf size_l ;
;
movlw 1<<(14-12) ; A14/*PGM
movwf pgm_mask ;
;
movlw 1<<(17-12) ; A17/PWR
movwf pwr_mask ;
;
clrf ctl_mask ; Enable
;
return ;
Setup27C256 ; Setup for 27C256 - 32K byte
clrf size_h ; Size
movlw 256/2 ;
movwf size_m ;
clrf size_l ;
;
clrf pgm_mask ;
;
movlw 1<<(17-12) ; A17/PWR
movwf pwr_mask ;
;
clrf ctl_mask ; Enable
;
return ;
Setup27C512 ; Setup for 27C512 - 64K byte
movlw 1 ; Size
movwf size_h ;
clrf size_m ;
clrf size_l ;
;
clrf pgm_mask ;
;
movlw 1<<(17-12) ; A17/PWR
movwf pwr_mask ;
;
clrf ctl_mask ; Enable
;
return ;
Setup27C010 ; Setup for 27C010 - 128K byte
movlw 2 ; Size
movwf size_h ;
clrf size_m ;
clrf size_l ;
;
movlw 1<<(18-12) ; A18/*PGM
movwf pgm_mask ;
;
clrf pwr_mask ;
;
clrf ctl_mask ; Enable
;
return ;
Setup27C020 ; Setup for 27C020 - 256K byte
movlw 4 ; Size
movwf size_h ;
clrf size_m ;
clrf size_l ;
;
movlw 1<<(18-12) ; A18/*PGM
movwf pgm_mask ;
;
clrf pwr_mask ;
;
clrf ctl_mask ; Enable
;
return ;
Setup27C040 ; Setup for 27C040 - 512K byte
movlw 8 ; Size
movwf size_h ;
clrf size_m ;
clrf size_l ;
;
clrf pgm_mask ;
;
clrf pwr_mask ;
;
clrf ctl_mask ; Enable
;
return ;
Setup27C080 ; Setup for 27C080 - 1M byte
movlw 16 ; Size
movwf size_h ;
clrf size_m ;
clrf size_l ;
;
clrf pgm_mask ;
;
clrf pwr_mask ;
;
clrf ctl_mask ; Enable
;
return ;
Setup82S181 ; Setup for 82S181 - 1K byte
clrf size_h ; Size
movlw 8/2 ;
movwf size_m ;
clrf size_l ;
;
clrf pgm_mask ;
;
movlw 1<<(13-12) ; A13/PWR
movwf pwr_mask ;
;
movlw (1<<fcA10)|(1<<fcCE) ; Enable
movwf ctl_mask ;
;
return ;
Setup82S191 ; Setup for 82S191 - 2K byte
clrf size_h ; Size
movlw 16/2 ;
movwf size_m ;
clrf size_l ;
;
clrf pgm_mask ;
;
movlw 1<<(13-12) ; A13/PWR
movwf pwr_mask ;
;
movlw (1<<fcA10)|(1<<fcA11asA10)|(1<<fcCE); Enable
movwf ctl_mask ;
return
ShowHelp
movlw 'H'
call SerTx
movlw 'e'
call SerTx
movlw 'l'
call SerTx
movlw 'p'
call SerTx
call ColonSpace
call CRLF
; r Read EPROM
movlw 'r'
call SerTx
call ColonSpace
movlw 'R'
call SerTx
movlw 'e'
call SerTx
movlw 'a'
call SerTx
movlw 'd'
call SerTx
movlw ' '
call SerTx
movlw 'E'
call SerTx
movlw 'P'
call SerTx
movlw 'R'
call SerTx
movlw 'O'
call SerTx
movlw 'M'
call SerTx
call CRLF
; b Binary
movlw 'b'
call SerTx
call ColonSpace
movlw 'B'
call SerTx
movlw 'i'
call SerTx
movlw 'n'
call SerTx
movlw 'a'
call SerTx
movlw 'r'
call SerTx
movlw 'y'
call SerTx
call CRLF
; h Hex
movlw 'h'
call SerTx
call ColonSpace
movlw 'H'
call SerTx
movlw 'e'
call SerTx
movlw 'x'
call SerTx
call CRLF
; o Configuration
movlw 'o'
call SerTx
call ColonSpace
movlw 'C'
call SerTx
movlw 'o'
call SerTx
movlw 'n'
call SerTx
movlw 'f'
call SerTx
movlw 'i'
call SerTx
movlw 'g'
call SerTx
movlw 'u'
call SerTx
movlw 'r'
call SerTx
movlw 'a'
call SerTx
movlw 't'
call SerTx
movlw 'i'
call SerTx
movlw 'o'
call SerTx
movlw 'n'
call SerTx
call CRLF
; ` 1K 82S181, RY1133 (512B TBP28S42N)
movlw '`'
call SerTx
call ColonSpace
movlw '1'
call SerTx
movlw 'K'
call SerTx
movlw ' '
call SerTx
movlw '8'
call SerTx
movlw '2'
call SerTx
movlw 'S'
call SerTx
movlw '1'
call SerTx
movlw '8'
call SerTx
movlw '1'
call SerTx
movlw ','
call SerTx
movlw ' '
call SerTx
movlw 'R'
call SerTx
movlw 'Y'
call SerTx
movlw '1'
call SerTx
movlw '1'
call SerTx
movlw '3'
call SerTx
movlw '3'
call SerTx
movlw ' '
call SerTx
movlw '('
call SerTx
movlw '5'
call SerTx
movlw '1'
call SerTx
movlw '2'
call SerTx
movlw 'B'
call SerTx
movlw ' '
call SerTx
movlw 'T'
call SerTx
movlw 'B'
call SerTx
movlw 'P'
call SerTx
movlw '2'
call SerTx
movlw '8'
call SerTx
movlw 'S'
call SerTx
movlw '4'
call SerTx
movlw '2'
call SerTx
movlw 'N'
call SerTx
movlw ')'
call SerTx
call CRLF
; ! 2K 82S191, TPB28L166, MB7138
movlw '!'
call SerTx
call ColonSpace
movlw '2'
call SerTx
movlw 'K'
call SerTx
movlw ' '
call SerTx
movlw '8'
call SerTx
movlw '2'
call SerTx
movlw 'S'
call SerTx
movlw '1'
call SerTx
movlw '9'
call SerTx
movlw '1'
call SerTx
movlw ','
call SerTx
movlw ' '
call SerTx
movlw 'T'
call SerTx
movlw 'P'
call SerTx
movlw 'B'
call SerTx
movlw '2'
call SerTx
movlw '8'
call SerTx
movlw 'L'
call SerTx
movlw '1'
call SerTx
movlw '6'
call SerTx
movlw '6'
call SerTx
movlw ','
call SerTx
movlw ' '
call SerTx
movlw 'M'
call SerTx
movlw 'B'
call SerTx
movlw '7'
call SerTx
movlw '1'
call SerTx
movlw '3'
call SerTx
movlw '8'
call SerTx
call CRLF
; 1 2K 27C16
movlw '1'
call SerTx
call ColonSpace
movlw '2'
call SerTx
movlw 'K'
call SerTx
movlw ' '
call SerTx
movlw '2'
call SerTx
movlw '7'
call SerTx
movlw 'C'
call SerTx
movlw '1'
call SerTx
movlw '6'
call SerTx
call CRLF
; 2 4K 27C32
movlw '2'
call SerTx
call ColonSpace
movlw '4'
call SerTx
movlw 'K'
call SerTx
movlw ' '
call SerTx
movlw '2'
call SerTx
movlw '7'
call SerTx
movlw 'C'
call SerTx
movlw '3'
call SerTx
movlw '2'
call SerTx
call CRLF
; 3 8K 27C64
movlw '3'
call SerTx
call ColonSpace
movlw '8'
call SerTx
movlw 'K'
call SerTx
movlw ' '
call SerTx
movlw '2'
call SerTx
movlw '7'
call SerTx
movlw 'C'
call SerTx
movlw '6'
call SerTx
movlw '4'
call SerTx
call CRLF
; 4 16K 27C128
movlw '4'
call SerTx
call ColonSpace
movlw '1'
call SerTx
movlw '6'
call SerTx
movlw 'K'
call SerTx
movlw ' '
call SerTx
movlw '2'
call SerTx
movlw '7'
call SerTx
movlw 'C'
call SerTx
movlw '1'
call SerTx
movlw '2'
call SerTx
movlw '8'
call SerTx
call CRLF
; 5 32K 27C256
movlw '5'
call SerTx
call ColonSpace
movlw '3'
call SerTx
movlw '2'
call SerTx
movlw 'K'
call SerTx
movlw ' '
call SerTx
movlw '2'
call SerTx
movlw '7'
call SerTx
movlw 'C'
call SerTx
movlw '2'
call SerTx
movlw '5'
call SerTx
movlw '6'
call SerTx
call CRLF
; 6 64K 27C512
movlw '6'
call SerTx
call ColonSpace
movlw '6'
call SerTx
movlw '4'
call SerTx
movlw 'K'
call SerTx
movlw ' '
call SerTx
movlw '2'
call SerTx
movlw '7'
call SerTx
movlw 'C'
call SerTx
movlw '5'
call SerTx
movlw '1'
call SerTx
movlw '2'
call SerTx
call CRLF
; 7 128K 27C010
movlw '7'
call SerTx
call ColonSpace
movlw '1'
call SerTx
movlw '2'
call SerTx
movlw '8'
call SerTx
movlw 'K'
call SerTx
movlw ' '
call SerTx
movlw '2'
call SerTx
movlw '7'
call SerTx
movlw 'C'
call SerTx
movlw '0'
call SerTx
movlw '1'
call SerTx
movlw '0'
call SerTx
call CRLF
; 8 256K 27C020
movlw '8'
call SerTx
call ColonSpace
movlw '2'
call SerTx
movlw '5'
call SerTx
movlw '6'
call SerTx
movlw 'K'
call SerTx
movlw ' '
call SerTx
movlw '2'
call SerTx
movlw '7'
call SerTx
movlw 'C'
call SerTx
movlw '0'
call SerTx
movlw '2'
call SerTx
movlw '0'
call SerTx
call CRLF
; 9 512K 27C040
movlw '9'
call SerTx
call ColonSpace
movlw '5'
call SerTx
movlw '1'
call SerTx
movlw '2'
call SerTx
movlw 'K'
call SerTx
movlw ' '
call SerTx
movlw '2'
call SerTx
movlw '7'
call SerTx
movlw 'C'
call SerTx
movlw '0'
call SerTx
movlw '4'
call SerTx
movlw '0'
call SerTx
call CRLF
; 0 1M 27C080
movlw '0'
call SerTx
call ColonSpace
movlw '1'
call SerTx
movlw 'M'
call SerTx
movlw ' '
call SerTx
movlw '2'
call SerTx
movlw '7'
call SerTx
movlw 'C'
call SerTx
movlw '0'
call SerTx
movlw '8'
call SerTx
movlw '0'
call SerTx
call CRLF
return
ShowOptions
movlw 'S'
call SerTx
movlw 'i'
call SerTx
movlw 'z'
call SerTx
movlw 'e'
call SerTx
call ColonSpace
movf size_h,W
call tx_hex_byte
movf size_m,W
call tx_hex_byte
movf size_l,W
call tx_hex_byte
call CRLF
movlw 'P' ;
call SerTx ;
movlw 'w' ;
call SerTx ;
movlw 'r' ;
call SerTx ;
call ColonSpace ;
movf pwr_mask,W ;
call tx_hex_byte ;
call CRLF ;
movlw 'P' ;
call SerTx ;
movlw 'g' ;
call SerTx ;
movlw 'm' ;
call SerTx ;