-
Notifications
You must be signed in to change notification settings - Fork 2
/
Copy pathconfig_v1.1.prn
1364 lines (1364 loc) · 64 KB
/
config_v1.1.prn
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
# File config_v1.1.s
0000
0000 RST0: EQU 0x0000
0000 BDOS: EQU 0x0005
0000 CON_READ: EQU 0x01
0000 CON_WRITE: EQU 0x02
0000 CON_RAWIO: EQU 0x06
0000 CON_RAWIO_PEEK_CHAR: EQU 0xff
0000 CON_WRITESTR: EQU 0x09
0000 DRV_SET: EQU 0x0E
0000
0000 BIOS_config_byte: EQU 0xfa34
0000 BIOS_WRITE_fa2a: EQU 0xfa2a
0000 BIOS_SETSEC_fa21: EQU 0xfa21
0000 BIOS_SETTRK_fa1e: EQU 0xfa1e
0000 BIOS_SETDMA_fa24: EQU 0xfa24
0000
0000 io_port_00_serial_baud_rate: EQU 0x00
0000
0000 changes_pending_yes: EQU 0x00
0000 changes_pending_no: EQU 0xff
0000
0000 write_safe_yes: EQU 0xff
0000 write_safe_no: EQU 0x00
0000
0000 ; ASCII codes
0000 no_key: EQU 0x00
0000 line_feed: EQU 0x0a
0000 form_feed: EQU 0x0c
0000 return_key: EQU 0x0d
0000 clear_screen: EQU 0x1a
0000 escape: EQU 0x1b
0000 home: EQU 0x1e
0000
0000 ORG 0x0100
0100 c3 12 01 JP main_menu_reset
0103
0103 move_cursor:
0103 ; Output an 0xff terminated string in DE to console
0103 1a LD A, (DE)
0104 fe ff CP 0xff
0106 c8 RET Z
0107 d5 PUSH DE
0108 0e 02 LD C, CON_WRITE
010a 5f LD E, A
010b cd 05 00 CALL BDOS
010e d1 POP DE
010f 13 INC DE
0110 18 f1 JR move_cursor
0112
0112 main_menu_reset:
0112 ; The config will be stored in B:
0112 3e 01 LD A, 0x1
0114 32 f5 13 LD (disk_drive_destination), A
0117 ; Let's mark that there are no changes to save
0117 3e ff LD A, changes_pending_no
0119 32 f4 13 LD (changes_pending), A
011c main_menu:
011c ; Show the main menu and select an option
011c 0e 09 LD C,CON_WRITESTR
011e 11 6b 14 LD DE,msg_menu_header
0121 cd 05 00 CALL BDOS
0124 0e 09 LD C,CON_WRITESTR
0126 11 e8 14 LD DE,msg_main_menu
0129 cd 05 00 CALL BDOS
012c 0e 01 LD C,CON_READ
012e cd 05 00 CALL BDOS
0131 f5 PUSH AF
0132 0e 09 LD C,CON_WRITESTR
0134 11 03 14 LD DE,msg_new_line
0137 cd 05 00 CALL BDOS
013a f1 POP AF
013b fe 31 CP '1'
013d ca 52 0f JP Z,menu_1_iobyte
0140 fe 32 CP '2'
0142 ca c4 0c JP Z,menu_2_write_safe
0145 fe 33 CP '3'
0147 ca 6c 09 JP Z,menu_3_cursor_keys
014a fe 34 CP '4'
014c ca 8c 03 JP Z,menu_4_keypad
014f fe 35 CP '5'
0151 ca 5c 01 JP Z,menu_5_baud_rate
0154 fe 1b CP escape
0156 ca 36 13 JP Z,menu_exit
0159 c3 1c 01 JP main_menu
015c
015c
015c ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
015c ; OPTION 5: Configure the serial port baud rate
015c ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
015c
015c menu_5_baud_rate:
015c ; Show the baud rate menu and select an option
015c 0e 09 LD C,CON_WRITESTR
015e 11 6b 14 LD DE,msg_menu_header
0161 cd 05 00 CALL BDOS
0164 0e 09 LD C,CON_WRITESTR
0166 11 a7 1a LD DE,msg_baud_rate_menu
0169 cd 05 00 CALL BDOS
016c 0e 01 LD C,CON_READ
016e cd 05 00 CALL BDOS
0171 f5 PUSH AF
0172 0e 09 LD C,CON_WRITESTR
0174 11 03 14 LD DE,msg_new_line
0177 cd 05 00 CALL BDOS
017a f1 POP AF
017b fe 31 CP '1'
017d ca 74 03 JP Z,menu_5_baud_rate_1_help
0180 fe 1b CP escape
0182 ca 1c 01 JP Z,main_menu
0185 fe 32 CP '2'
0187 ca 8d 01 JP Z,menu_5_baud_rate_2_change
018a c3 5c 01 JP menu_5_baud_rate
018d
018d menu_5_baud_rate_2_change:
018d ; Show the baud rate change menu
018d 0e 09 LD C,CON_WRITESTR
018f 11 e4 01 LD DE,msg_baud_rate_change_menu
0192 cd 05 00 CALL BDOS
0195 baud_rate_selection_reset:
0195 3e 00 LD A,0x0
0197 32 e3 01 LD (current_selection),A
019a 0e 09 LD C,CON_WRITESTR
019c 11 6b 03 LD DE,msg_form_feeds
019f cd 05 00 CALL BDOS
01a2 baud_rate_selection:
01a2 0e 06 LD C,CON_RAWIO
01a4 1e ff LD E,CON_RAWIO_PEEK_CHAR
01a6 cd 05 00 CALL BDOS
01a9 fe 00 CP no_key
01ab 28 f5 JR Z,baud_rate_selection
01ad fe 1b CP escape
01af 28 ab JR Z,menu_5_baud_rate
01b1 fe 0a CP line_feed
01b3 ca ce 01 JP Z,baud_rate_selection_next
01b6 fe 0d CP return_key
01b8 20 e8 JR NZ,baud_rate_selection
01ba ; We have a selection
01ba 3a e3 01 LD A,(current_selection)
01bd fe 10 CP 0x10
01bf d2 a2 01 JP NC,baud_rate_selection
01c2 ; The selection is valid
01c2 ; Update the copy of the BIOS with the baud rate
01c2 32 ae 2b LD (bios_content_baud_rate),A
01c5 ; Configure the serial port
01c5 d3 00 OUT (io_port_00_serial_baud_rate),A
01c7 ; Mark that there are changes to save
01c7 af XOR A
01c8 32 f4 13 LD (changes_pending),A
01cb c3 5c 01 JP menu_5_baud_rate
01ce
01ce baud_rate_selection_next:
01ce ; Select the next baud rate
01ce 3a e3 01 LD A,(current_selection)
01d1 3c INC A
01d2 32 e3 01 LD (current_selection),A
01d5 ; If we are past the last option, restart
01d5 fe 11 CP 0x11
01d7 28 bc JR Z,baud_rate_selection_reset
01d9 0e 09 LD C,CON_WRITESTR
01db 11 72 03 LD DE,msg_line_feed
01de cd 05 00 CALL BDOS
01e1 18 bf JR baud_rate_selection
01e3
01e3 current_selection:
01e3 ; Variable uses on all the sections
01e3 00 db 0h
01e4
01e4 msg_baud_rate_change_menu:
01e4 1a db clear_screen
01e5 .. db " 50\r\n"
01ec .. db " 75\r\n"
01f3 .. db " 110\t\tMove the cursor to the baud rate which\r\n"
0222 .. db " 134.5\r\n"
022b .. db " 150\t\tyou want to use by typing the [LINE FEED] key.\r\n"
0262 .. db " 300\r\n"
0269 .. db " 600\r\n"
0270 .. db " 1200\t\tWhen the cursor is at the rate you want\r\n"
02a0 .. db " 1800\r\n"
02a7 .. db " 2000\t\ttype the RETURN key and it will be set.\r\n"
02d7 .. db " 2400\r\n"
02de .. db " 3600\t\tThe new baud rate will be effective now.\r\n"
030f .. db " 4800\r\n"
0316 .. db " 7200\r\n"
031d .. db " 9600\r\n"
0324 .. db "19200\r\n"
032b .. db "Type [ESC] key to return to the previous menu (no changes)\r\n\r\n\n$"
036b
036b msg_form_feeds:
036b 1e 0c 0c 0c 0c 0c .. db home,form_feed,form_feed,form_feed,form_feed,form_feed,"$"
0372
0372 msg_line_feed:
0372 .. db "\n$"
0374
0374 menu_5_baud_rate_1_help:
0374 ; Show the baud rate help screen
0374 0e 09 LD C,CON_WRITESTR
0376 11 cc 1d LD DE,msg_help_baud_rate
0379 cd 05 00 CALL BDOS
037c 0e 09 LD C,CON_WRITESTR
037e 11 22 14 LD DE,msg_press_any_key
0381 cd 05 00 CALL BDOS
0384 0e 01 LD C,CON_READ
0386 cd 05 00 CALL BDOS
0389 c3 5c 01 JP menu_5_baud_rate
038c
038c ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
038c ; OPTION 4: Configure the keypad mappings
038c ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
038c
038c menu_4_keypad:
038c ; Show the keypad menu and select an option
038c 0e 09 LD C,CON_WRITESTR
038e 11 6b 14 LD DE,msg_menu_header
0391 cd 05 00 CALL BDOS
0394 0e 09 LD C,CON_WRITESTR
0396 11 e8 19 LD DE,msg_keypad_menu
0399 cd 05 00 CALL BDOS
039c 0e 01 LD C,CON_READ
039e cd 05 00 CALL BDOS
03a1 f5 PUSH AF
03a2 0e 09 LD C,CON_WRITESTR
03a4 11 03 14 LD DE,msg_new_line
03a7 cd 05 00 CALL BDOS
03aa f1 POP AF
03ab fe 31 CP '1'
03ad ca 54 09 JP Z,menu_4_keypad_1_help
03b0 fe 32 CP '2'
03b2 ca 70 04 JP Z,menu_4_keypad_2_change
03b5 fe 1b CP escape
03b7 ca 1c 01 JP Z,main_menu
03ba c3 8c 03 JP menu_4_keypad
03bd
03bd ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
03bd ; HEX INPUT:
03bd ; Used on options 3 and 4 to retreive an hex value
03bd ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
03bd
03bd key_selection_input:
03bd ; Set the next key to map
03bd 3a e3 01 LD A,(current_selection)
03c0 3c INC A
03c1 32 e3 01 LD (current_selection),A
03c4 ; Retrieve the HEX mapping
03c4 cd e6 03 CALL key_edit_H
03c7 ; Store the key if there is data
03c7 20 09 JR NZ,store_key_change
03c9 ; Return to the sequence if we had a line feed
03c9 fe 0a CP line_feed
03cb c8 RET Z
03cc ; We are done, back to the previous menu
03cc e1 POP HL
03cd 2a ff 13 LD HL,(menu_escape_address)
03d0 e9 JP (HL)
03d1
03d1 ; unused
03d1 c8 db 0xC8
03d2
03d2 store_key_change:;
03d2 ; Mark that there are changes to save
03d2 3e 00 LD A,changes_pending_yes
03d4 32 f4 13 LD (changes_pending),A
03d7 ; Calculate the position on the BIOS copy to store the mapping
03d7 ; HL has the section and we offset with the selection - 1
03d7 11 00 00 LD DE,0x0
03da 3a e3 01 LD A,(current_selection)
03dd 3d DEC A
03de 5f LD E,A
03df 2a f8 13 LD HL,(key_config_base_address)
03e2 19 ADD HL,DE
03e3 79 LD A,C
03e4 ; Store it
03e4 77 LD (HL),A
03e5 c9 RET
03e6
03e6 key_edit_H:
03e6 0e 06 LD C,CON_RAWIO
03e8 1e ff LD E,CON_RAWIO_PEEK_CHAR
03ea cd 05 00 CALL BDOS
03ed fe 00 CP no_key
03ef 28 f5 JR Z,key_edit_H
03f1 fe 0a CP line_feed
03f3 c8 RET Z
03f4 fe 1b CP escape
03f6 c8 RET Z
03f7 ; If less than '0' ignore the key press
03f7 fe 30 CP '0'
03f9 38 eb JR C,key_edit_H
03fb ; Is it '9' or less?
03fb fe 3a CP '9' + 1
03fd ; Yes, it is a decimal digit between 0 and 9
03fd 38 16 JR C,key_decimal_digit_H
03ff ; No, it must be A to F, if not we will ignore the key press
03ff ; To lowercase
03ff cb af RES 0x5,A
0401 fe 47 CP 'F' + 1
0403 30 e1 JR NC,key_edit_H
0405 fe 41 CP 'A'
0407 38 dd JR C,key_edit_H
0409 ; It is an hex digit, echo it
0409 f5 PUSH AF
040a 0e 02 LD C,CON_WRITE
040c 5f LD E,A
040d cd 05 00 CALL BDOS
0410 f1 POP AF
0411 ; substract 7 to have A-F just after 0-9
0411 d6 07 SUB 'A' - '9' - 1
0413 18 08 JR key_process_digit_H
0415
0415 key_decimal_digit_H:
0415 ; It is a decimal digit, echo it
0415 f5 PUSH AF
0416 0e 02 LD C,CON_WRITE
0418 5f LD E,A
0419 cd 05 00 CALL BDOS
041c f1 POP AF
041d
041d key_process_digit_H:
041d ; Convert the ASCII digit to a number
041d d6 30 SUB '0'
041f ; Set it as the high nibble
041f cb 07 RLC A
0421 cb 07 RLC A
0423 cb 07 RLC A
0425 cb 07 RLC A
0427 e6 f0 AND 0xf0
0429 f5 PUSH AF
042a
042a key_edit_L:
042a 0e 06 LD C,CON_RAWIO
042c 1e ff LD E,CON_RAWIO_PEEK_CHAR
042e cd 05 00 CALL BDOS
0431 fe 00 CP no_key
0433 28 f5 JR Z,key_edit_L
0435 fe 0a CP line_feed
0437 28 04 JR Z,key_edit_L_cancel
0439 fe 1b CP escape
043b 20 02 JR NZ,key_edit_L_continue
043d key_edit_L_cancel:
043d e1 POP HL
043e c9 RET
043f key_edit_L_continue:
043f ; If less than '0' ignore the key press
043f fe 30 CP '0'
0441 38 e7 JR C,key_edit_L
0443 ; Is it '9' or less?
0443 fe 3a CP '9' + 1
0445 ; Yes, it is a decimal digit between 0 and 9
0445 38 16 JR C,key_decimal_digit_L
0447 ; No, it must be A to F, if not we will ignore the key press
0447 ; To lowercase
0447 cb af RES 0x5,A
0449 fe 47 CP 'F' + 1
044b 30 dd JR NC,key_edit_L
044d fe 41 CP 'A'
044f 38 d9 JR C,key_edit_L
0451 f5 PUSH AF
0452 ; It is an hex digit, echo it
0452 0e 02 LD C,CON_WRITE
0454 5f LD E,A
0455 cd 05 00 CALL BDOS
0458 f1 POP AF
0459 ; substract 7 to have A-F just after 0-9
0459 d6 07 SUB 'A' - '9' - 1
045b 18 08 JR key_process_digit_L
045d
045d key_decimal_digit_L:
045d ; It is a decimal digit, echo it
045d f5 PUSH AF
045e 0e 02 LD C,CON_WRITE
0460 5f LD E,A
0461 cd 05 00 CALL BDOS
0464 f1 POP AF
0465
0465 key_process_digit_L:
0465 ; Convert the ASCII digit to a number
0465 d6 30 SUB '0'
0467 ; Set it as the low nibble
0467 e6 0f AND 0xf
0469 4f LD C,A
046a f1 POP AF
046b b1 OR C
046c 4f LD C,A
046d c0 RET NZ
046e 3c INC A
046f c9 RET
0470
0470 ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
0470 ; OPTION 4: Configure the keypad mappings (continued)
0470 ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
0470
0470 menu_4_keypad_2_change:
0470 ; Set the address of the previous menu
0470 21 8c 03 LD HL,menu_4_keypad
0473 22 ff 13 LD (menu_escape_address),HL
0476 ; Set the address of the key mapping to change
0476 21 a0 2b LD HL,bios_content_keypad_map
0479 22 f8 13 LD (key_config_base_address),HL
047c ; Show the menu
047c 0e 09 LD C,CON_WRITESTR
047e 11 24 05 LD DE,msg_keypad_change_menu
0481 cd 05 00 CALL BDOS
0484
0484 keypad_sequence:
0484 ; Move through the keypad sequence
0484 3e 00 LD A,0x0
0486 32 e3 01 LD (current_selection),A
0489 11 09 09 LD DE,keypad_options_positions
048c cd 03 01 CALL move_cursor
048f cd bd 03 CALL key_selection_input
0492 11 0e 09 LD DE,keypad_options_positions+5
0495 cd 03 01 CALL move_cursor
0498 cd bd 03 CALL key_selection_input
049b 11 13 09 LD DE,keypad_options_positions+10
049e cd 03 01 CALL move_cursor
04a1 cd bd 03 CALL key_selection_input
04a4 11 18 09 LD DE,keypad_options_positions+15
04a7 cd 03 01 CALL move_cursor
04aa cd bd 03 CALL key_selection_input
04ad 11 1d 09 LD DE,keypad_options_positions+20
04b0 cd 03 01 CALL move_cursor
04b3 cd bd 03 CALL key_selection_input
04b6 11 22 09 LD DE,keypad_options_positions+25
04b9 cd 03 01 CALL move_cursor
04bc cd bd 03 CALL key_selection_input
04bf 11 27 09 LD DE,keypad_options_positions+30
04c2 cd 03 01 CALL move_cursor
04c5 cd bd 03 CALL key_selection_input
04c8 11 2c 09 LD DE,keypad_options_positions+35
04cb cd 03 01 CALL move_cursor
04ce cd bd 03 CALL key_selection_input
04d1 11 31 09 LD DE,keypad_options_positions+40
04d4 cd 03 01 CALL move_cursor
04d7 cd bd 03 CALL key_selection_input
04da 11 36 09 LD DE,keypad_options_positions+45
04dd cd 03 01 CALL move_cursor
04e0 cd bd 03 CALL key_selection_input
04e3 11 3b 09 LD DE,keypad_options_positions+50
04e6 cd 03 01 CALL move_cursor
04e9 cd bd 03 CALL key_selection_input
04ec 11 40 09 LD DE,keypad_options_positions+55
04ef cd 03 01 CALL move_cursor
04f2 cd bd 03 CALL key_selection_input
04f5 11 45 09 LD DE,keypad_options_positions+60
04f8 cd 03 01 CALL move_cursor
04fb cd bd 03 CALL key_selection_input
04fe 11 4a 09 LD DE,keypad_options_positions+65
0501 cd 03 01 CALL move_cursor
0504 cd bd 03 CALL key_selection_input
0507 11 4f 09 LD DE,keypad_options_positions+70
050a cd 03 01 CALL move_cursor
050d keypad_selection_esc:
050d ; The cursor is on the top of the ESC option
050d 0e 06 LD C,CON_RAWIO
050f 1e ff LD E,CON_RAWIO_PEEK_CHAR
0511 cd 05 00 CALL BDOS
0514 fe 00 CP no_key
0516 28 f5 JR Z,keypad_selection_esc
0518 fe 1b CP escape
051a ca 8c 03 JP Z,menu_4_keypad
051d fe 0a CP line_feed
051f 20 ec JR NZ,keypad_selection_esc
0521 ; Restart the sequence
0521 c3 84 04 JP keypad_sequence
0524
0524 msg_keypad_change_menu:
0524 1a db clear_screen
0525 .. db "-----------------------------\tMove the cursor to the key you wish\r\n"
0568 .. db ": : : : :\r\n"
0587 .. db ": 7 : 8 : 9 : - :\tto change. Use the [LINE FEED] key.\r\n"
05ca .. db ": : : : :\r\n"
05e9 .. db ": 37 : 38 : 39 : 2D :\tThe default HEXADECIMAL code will be\r\n"
062d .. db ";------;------;------;------:\r\n"
064c .. db ": : : : :\tthe number which is flashing.\r\n"
0689 .. db ": 4 : 5 : 6 : , :\r\n"
06a8 .. db ": : : : :\r\n"
06c7 .. db ": 34 : 35 : 36 : 2C :\tWhen you reach the key you wish to change.\r\n"
0711 .. db ":------:------:------:------:\r\n"
0730 .. db ": : : : :\tType in the new HEXADECIMAL code.\r\n"
0771 .. db ": 1 : 2 : 3 : :\r\n"
0790 .. db ": : : : :\r\n"
07af .. db ": 31 : 32 : 33 : ENTER:\t(* NOTE: you must enter both digits *)\r\n"
07f5 .. db ":------:------:------: :\r\n"
0814 .. db ": : : 0D :\t(* to change the code. *)\r\n"
085a .. db ": 0 : . : :\r\n"
0879 .. db ": : : :\r\n"
0898 .. db ": 30 : 2E : : Type the [ESC] key to return to the previous menu\r\n"
08e9 .. db "-----------------------------\r\n$"
0909 keypad_options_positions:
0909 1b .. ff db 0x1B,"=3&",0xFF
090e 1b .. ff db 0x1B,"=.#",0xFF
0913 1b .. ff db 0x1B,"=.*",0xFF
0918 1b .. ff db 0x1B,"=.1",0xFF
091d 1b .. ff db 0x1B,"=)#",0xFF
0922 1b .. ff db 0x1B,"=)*",0xFF
0927 1b .. ff db 0x1B,"=)1",0xFF
092c 1b .. ff db 0x1B,"=$#",0xFF
0931 1b .. ff db 0x1B,"=$*",0xFF
0936 1b .. ff db 0x1B,"=$1",0xFF
093b 1b .. ff db 0x1B,"=$8",0xFF
0940 1b .. ff db 0x1B,"=)8",0xFF
0945 1b .. ff db 0x1B,"=08",0xFF
094a 1b .. ff db 0x1B,"=31",0xFF
094f 1b .. ff db 0x1B,"=3I",0xFF
0954
0954 menu_4_keypad_1_help:
0954 ; Show the help for keypad configuration
0954 0e 09 LD C,CON_WRITESTR
0956 11 ca 1b LD DE,msg_help_keypad
0959 cd 05 00 CALL BDOS
095c 0e 09 LD C,CON_WRITESTR
095e 11 22 14 LD DE,msg_press_any_key
0961 cd 05 00 CALL BDOS
0964 0e 01 LD C,CON_READ
0966 cd 05 00 CALL BDOS
0969 c3 8c 03 JP menu_4_keypad
096c
096c ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
096c ; OPTION 3: Configure the corsor keys mappings
096c ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
096c
096c menu_3_cursor_keys:
096c ; Show the cursor keys menu and select the option
096c 0e 09 LD C,CON_WRITESTR
096e 11 6b 14 LD DE,msg_menu_header
0971 cd 05 00 CALL BDOS
0974 0e 09 LD C,CON_WRITESTR
0976 11 35 19 LD DE,msg_cursor_keys_menu
0979 cd 05 00 CALL BDOS
097c 0e 01 LD C,CON_READ
097e cd 05 00 CALL BDOS
0981 f5 PUSH AF
0982 0e 09 LD C,CON_WRITESTR
0984 11 03 14 LD DE,msg_new_line
0987 cd 05 00 CALL BDOS
098a f1 POP AF
098b fe 31 CP '1'
098d ca f9 09 JP Z,menu_3_cursor_keys_1_help
0990 fe 1b CP escape
0992 ca 1c 01 JP Z,main_menu
0995 fe 32 CP '2'
0997 ca 9c 09 JP Z,menu_3_cursor_keys_2_change
099a 18 d0 JR menu_3_cursor_keys
099c
099c menu_3_cursor_keys_2_change:
099c ; Set the address of the keypad mapping to change
099c 21 9c 2b LD HL,bios_content_arrow_key_map
099f 22 f8 13 LD (key_config_base_address),HL
09a2 ; Set the address of the previous menu
09a2 21 6c 09 LD HL,menu_3_cursor_keys
09a5 22 ff 13 LD (menu_escape_address),HL
09a8 ; Show the menu
09a8 0e 09 LD C,CON_WRITESTR
09aa 11 11 0a LD DE,msg_cursor_keys_change_menu
09ad cd 05 00 CALL BDOS
09b0
09b0 cursor_keys_sequence:
09b0 ; Move through the cursor keys sequence
09b0 3e 00 LD A,0x0
09b2 32 e3 01 LD (current_selection),A
09b5 11 ab 0c LD DE,cursor_keys_options_positions
09b8 cd 03 01 CALL move_cursor
09bb cd bd 03 CALL key_selection_input
09be 11 b0 0c LD DE,cursor_keys_options_positions+5
09c1 cd 03 01 CALL move_cursor
09c4 cd bd 03 CALL key_selection_input
09c7 11 b5 0c LD DE,cursor_keys_options_positions+10
09ca cd 03 01 CALL move_cursor
09cd cd bd 03 CALL key_selection_input
09d0 11 ba 0c LD DE,cursor_keys_options_positions+15
09d3 cd 03 01 CALL move_cursor
09d6 cd bd 03 CALL key_selection_input
09d9 11 bf 0c LD DE,cursor_keys_options_positions+20
09dc cd 03 01 CALL move_cursor
09df cursor_keys_selection_esc:
09df ; The cursor is on top of the ESC option
09df 0e 06 LD C,CON_RAWIO
09e1 1e ff LD E,CON_RAWIO_PEEK_CHAR
09e3 cd 05 00 CALL BDOS
09e6 fe 00 CP no_key
09e8 28 f5 JR Z,cursor_keys_selection_esc
09ea fe 0a CP line_feed
09ec ca b0 09 JP Z,cursor_keys_sequence
09ef fe 1b CP escape
09f1 20 ec JR NZ,cursor_keys_selection_esc
09f3 c3 6c 09 JP menu_3_cursor_keys
09f6 ; Restart the sequence
09f6 c3 b0 09 JP cursor_keys_sequence
09f9
09f9 menu_3_cursor_keys_1_help:
09f9 ; Show the help for cursor keys configuration
09f9 0e 09 LD C,CON_WRITESTR
09fb 11 46 28 LD DE,msg_help_cursor_keys
09fe cd 05 00 CALL BDOS
0a01 0e 09 LD C,CON_WRITESTR
0a03 11 22 14 LD DE,msg_press_any_key
0a06 cd 05 00 CALL BDOS
0a09 0e 01 LD C,CON_READ
0a0b cd 05 00 CALL BDOS
0a0e c3 6c 09 JP menu_3_cursor_keys
0a11
0a11 msg_cursor_keys_change_menu:
0a11 1a db clear_screen
0a12 .. db "\r\n"
0a14 .. db "\r\n"
0a16 .. db " ---------------------------------\r\n"
0a45 .. db " : : : : :\r\n"
0a74 .. db " : ^ : : : <- : -> :\r\n"
0aa3 .. db " : : : v : : :\r\n"
0ad2 .. db " : : : : :\r\n"
0b01 .. db " : 0B : 0A : 08 : 0C :\r\n"
0b30 .. db " ---------------------------------\r\n"
0b5f .. db "\r\n"
0b61 .. db "\r\n"
0b63 .. db " Type the [ESC] key to return to the previous menu.\r\n"
0b9e .. db "\r\n"
0ba0 .. db " Move the cursor to the key which you wish to change by pressing\r\n"
0be2 .. db " the [LINE FEED] key. The default HEXADECIMAL code will be the flashing number.\r\n"
0c33 .. db " Type the new HEXADECIMAL number you wish to assign to the key.\r\n"
0c74 .. db "\r\n"
0c76 .. db " You must type both digits to effect the change.\r\n\r\n$"
0cab
0cab cursor_keys_options_positions:
0cab 1b .. ff db 0x1B,"='/",0xFF
0cb0 1b .. ff db 0x1B,"='7",0xFF
0cb5 1b .. ff db 0x1B,"='?",0xFF
0cba 1b .. ff db 0x1B,"='G",0xFF
0cbf 1b .. ff db 0x1B,"=+2",0xFF
0cc4
0cc4 ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
0cc4 ; OPTION 2: Configure the write safe flag
0cc4 ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
0cc4
0cc4 menu_2_write_safe:
0cc4 ; Show the menu and select the option
0cc4 0e 09 LD C,CON_WRITESTR
0cc6 11 6b 14 LD DE,msg_menu_header
0cc9 cd 05 00 CALL BDOS
0ccc 0e 09 LD C,CON_WRITESTR
0cce 11 81 18 LD DE,msg_write_safe_menu
0cd1 cd 05 00 CALL BDOS
0cd4 0e 01 LD C,CON_READ
0cd6 cd 05 00 CALL BDOS
0cd9 f5 PUSH AF
0cda 0e 09 LD C,CON_WRITESTR
0cdc 11 03 14 LD DE,msg_new_line
0cdf cd 05 00 CALL BDOS
0ce2 f1 POP AF
0ce3 fe 31 CP '1'
0ce5 ca 6e 0d JP Z,menu_2_write_safe_1_help
0ce8 fe 32 CP '2'
0cea ca f5 0c JP Z,menu_2_write_safe_2_change
0ced fe 1b CP escape
0cef ca 1c 01 JP Z,main_menu
0cf2 c3 c4 0c JP menu_2_write_safe
0cf5
0cf5 menu_2_write_safe_2_change:
0cf5 ; Show the change menu
0cf5 0e 09 LD C,CON_WRITESTR
0cf7 11 86 0d LD DE,msg_write_safe_change_menu
0cfa cd 05 00 CALL BDOS
0cfd ; There is a sequence of three states: YES, NO and ESC
0cfd
0cfd write_safe_yes_option:
0cfd ; We are on the YES option
0cfd 11 43 0f LD DE,write_safe_options_position_yes
0d00 cd 03 01 CALL move_cursor
0d03 write_safe_yes_option_loop:
0d03 0e 06 LD C,CON_RAWIO
0d05 1e ff LD E,CON_RAWIO_PEEK_CHAR
0d07 cd 05 00 CALL BDOS
0d0a fe 00 CP no_key
0d0c 28 f5 JR Z,write_safe_yes_option_loop
0d0e fe 0a CP line_feed
0d10 ; Line feed: go to the NO option
0d10 28 16 JR Z,write_safe_no_option
0d12 fe 1b CP escape
0d14 ; Escape: go back to the menu
0d14 ca c4 0c JP Z,menu_2_write_safe
0d17 fe 0d CP return_key
0d19 20 e2 JR NZ,write_safe_yes_option
0d1b ; Return: select the YES option
0d1b 3e ff LD A,write_safe_yes
0d1d 32 9b 2b LD (bios_content_config_byte),A
0d20 3e 00 LD A,changes_pending_yes
0d22 32 f4 13 LD (changes_pending),A
0d25 c3 c4 0c JP menu_2_write_safe
0d28
0d28 write_safe_no_option:
0d28 ; We are on the NO option
0d28 11 48 0f LD DE,write_safe_options_position_no
0d2b cd 03 01 CALL move_cursor
0d2e write_safe_no_option_loop:
0d2e 0e 06 LD C,CON_RAWIO
0d30 1e ff LD E,CON_RAWIO_PEEK_CHAR
0d32 cd 05 00 CALL BDOS
0d35 fe 00 CP no_key
0d37 28 f5 JR Z,write_safe_no_option_loop
0d39 fe 0a CP line_feed
0d3b ; Line feed go to the ESC option
0d3b 28 13 JR Z,write_safe_esc_option
0d3d fe 1b CP escape
0d3f ; Escape: go back to the menu
0d3f 28 83 JR Z,menu_2_write_safe
0d41 fe 0d CP return_key
0d43 20 e3 JR NZ,write_safe_no_option
0d45 ; Return: select the NO option
0d45 3e 00 LD A,write_safe_no ; = changes_pending_yes
0d47 32 9b 2b LD (bios_content_config_byte),A
0d4a 32 f4 13 LD (changes_pending),A
0d4d c3 c4 0c JP menu_2_write_safe
0d50
0d50 write_safe_esc_option:
0d50 ; We are on the ESC option
0d50 11 4d 0f LD DE,write_safe_options_position_esc
0d53 cd 03 01 CALL move_cursor
0d56 write_safe_esc_option_loop:
0d56 0e 06 LD C,CON_RAWIO
0d58 1e ff LD E,CON_RAWIO_PEEK_CHAR
0d5a cd 05 00 CALL BDOS
0d5d fe 00 CP no_key
0d5f 28 f5 JR Z,write_safe_esc_option_loop
0d61 fe 1b CP escape
0d63 ; Escape: go back to the menu
0d63 ca c4 0c JP Z,menu_2_write_safe
0d66 fe 0a CP line_feed
0d68 c2 50 0d JP NZ,write_safe_esc_option
0d6b ; Line feed: go to the YES option
0d6b c3 fd 0c JP write_safe_yes_option
0d6e
0d6e menu_2_write_safe_1_help:
0d6e ; Show the help for write safe flag
0d6e 0e 09 LD C,CON_WRITESTR
0d70 11 36 24 LD DE,msg_help_write_safe
0d73 cd 05 00 CALL BDOS
0d76 0e 09 LD C,CON_WRITESTR
0d78 11 22 14 LD DE,msg_press_any_key
0d7b cd 05 00 CALL BDOS
0d7e 0e 01 LD C,CON_READ
0d80 cd 05 00 CALL BDOS
0d83 c3 c4 0c JP menu_2_write_safe
0d86
0d86 msg_write_safe_change_menu:
0d86 1a db clear_screen
0d87 .. db "\r\n"
0d89 .. db "\r\n"
0d8b .. db "\r\n"
0d8d .. db "Yes I want Write Safe enabeled.\r\n"
0dae .. db "\r\n"
0db0 .. db "No do not enable Write Safe.\tThis is the default mode on your KAYPRO II .\r\n"
0dfb .. db "\r\n"
0dfd .. db "Type the [ESC] key to return to the previous menu.\r\n"
0e31 .. db "\r\n"
0e33 .. db "\r\n"
0e35 .. db "Use the [LINE FEED] key to move the cursor to the mode\r\n"
0e6d .. db "which you wish to use and then type the [RETURN] key to\r\n"
0ea6 .. db "enter your choice.\r\n"
0eba .. db "\r\n"
0ebc .. db "**** PLEASE read the help file before you enable Write Safe. ****\r\n"
0eff .. db "**** If you do not understand it ASK your dealer. ****\r\n$"
0f43
0f43 write_safe_options_position_yes:
0f43 1b .. ff db 0x1B,"=# ",0xFF
0f48 write_safe_options_position_no:
0f48 1b .. ff db 0x1B,"=% ",0xFF
0f4d write_safe_options_position_esc:
0f4d 1b .. ff db 0x1B,"='+",0xFF
0f52
0f52 ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
0f52 ; OPTION 1: Configure the IOBYTE
0f52 ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
0f52
0f52 menu_1_iobyte:
0f52 ; Show the menu and select the option
0f52 0e 09 LD C,CON_WRITESTR
0f54 11 6b 14 LD DE,msg_menu_header
0f57 cd 05 00 CALL BDOS
0f5a 0e 09 LD C,CON_WRITESTR
0f5c 11 db 17 LD DE,msg_iobyte_menu
0f5f cd 05 00 CALL BDOS
0f62 0e 01 LD C,CON_READ
0f64 cd 05 00 CALL BDOS
0f67 f5 PUSH AF
0f68 0e 09 LD C,CON_WRITESTR
0f6a 11 03 14 LD DE,msg_new_line
0f6d cd 05 00 CALL BDOS
0f70 f1 POP AF
0f71 fe 31 CP '1'
0f73 ca 52 10 JP Z,menu_1_iobyte_1_help
0f76 fe 32 CP '2'
0f78 ca 83 0f JP Z,menu_1_iobyte_2_change
0f7b fe 1b CP escape
0f7d ca 1c 01 JP Z,main_menu
0f80 c3 52 0f JP menu_1_iobyte
0f83
0f83 menu_1_iobyte_2_change:
0f83 0e 09 LD C,CON_WRITESTR
0f85 11 6a 10 LD DE,msg_iobyte_change_menu
0f88 cd 05 00 CALL BDOS
0f8b ; Set to the address of the IOBYTE on the BIOS copy
0f8b 21 9a 2b LD HL,bios_content_io_byte
0f8e 22 f8 13 LD (key_config_base_address),HL
0f91 ; Set the address of the previous menu
0f91 21 52 0f LD HL,menu_1_iobyte
0f94 22 ff 13 LD (menu_escape_address),HL
0f97 iobyte_sequence_CON:
0f97 3e 00 LD A,0x0
0f99 32 e3 01 LD (current_selection),A
0f9c ; Two options to set CON
0f9c 11 1d 13 LD DE,iobyte_options_position_CON_CRT
0f9f cd 03 01 CALL move_cursor
0fa2 cd dd 0f CALL iobyte_selection_input
0fa5 11 22 13 LD DE,iobyte_options_position_CON_TTY
0fa8 cd 03 01 CALL move_cursor
0fab cd dd 0f CALL iobyte_selection_input
0fae iobyte_sequence_LST:
0fae ; Two options to set LST
0fae 11 27 13 LD DE,iobyte_options_position_LST_LPT
0fb1 cd 03 01 CALL move_cursor
0fb4 cd dd 0f CALL iobyte_selection_input
0fb7 11 2c 13 LD DE,iobyte_options_position_LST_TTY
0fba cd 03 01 CALL move_cursor
0fbd cd dd 0f CALL iobyte_selection_input
0fc0 iobyte_sequence_esc:
0fc0 11 31 13 LD DE,iobyte_options_position_esc
0fc3 cd 03 01 CALL move_cursor
0fc6
0fc6 iobyte_selection_esc:
0fc6 0e 06 LD C,CON_RAWIO
0fc8 1e ff LD E,CON_RAWIO_PEEK_CHAR
0fca cd 05 00 CALL BDOS
0fcd fe 00 CP no_key
0fcf 28 f5 JR Z,iobyte_selection_esc
0fd1 fe 1b CP escape
0fd3 ; Escape: go back to the menu
0fd3 ca 52 0f JP Z,menu_1_iobyte
0fd6 fe 0a CP line_feed
0fd8 ; Line feed: restart the sequence
0fd8 20 ec JR NZ,iobyte_selection_esc
0fda c3 97 0f JP iobyte_sequence_CON
0fdd
0fdd iobyte_selection_input:
0fdd 0e 06 LD C,CON_RAWIO
0fdf 1e ff LD E,CON_RAWIO_PEEK_CHAR
0fe1 cd 05 00 CALL BDOS
0fe4 fe 00 CP no_key
0fe6 28 f5 JR Z,iobyte_selection_input
0fe8 fe 1b CP escape
0fea ; No escape, process the key press
0fea 20 05 JR NZ,iobyte_process_key
0fec ; Escape: go back to the menu
0fec e1 POP HL
0fed 2a ff 13 LD HL,(menu_escape_address)
0ff0 e9 JP (HL)
0ff1
0ff1 iobyte_process_key:
0ff1 fe 0a CP line_feed
0ff3 20 08 JR NZ,iobyte_process_key_continue
0ff5 ; Line feed: continue the sequence
0ff5 3a e3 01 LD A,(current_selection)
0ff8 3c INC A
0ff9 32 e3 01 LD (current_selection),A
0ffc c9 RET
0ffd iobyte_process_key_continue:
0ffd fe 0d CP return_key
0fff 20 dc JR NZ,iobyte_selection_input
1001 ; Return key: select the option
1001 3e 00 LD A,changes_pending_yes
1003 32 f4 13 LD (changes_pending),A
1006 ; Calculate the address of the function to call. The
1006 ; address is in:
1006 ; selection_id*2 + iobyte_options_handlers
1006 3a e3 01 LD A,(current_selection)
1009 87 ADD A,A ; A = A*2
100a 11 00 00 LD DE,0x0
100d 5f LD E,A
100e 21 1b 10 LD HL,iobyte_options_handlers
1011 19 ADD HL,DE
1012 ; Read low byte
1012 5e LD E,(HL)
1013 ; Read high byte
1013 23 INC HL
1014 56 LD D,(HL)
1015 eb EX DE,HL
1016 ed 5b f8 13 LD DE,(key_config_base_address)
101a e9 JP (HL)
101b
101b iobyte_options_handlers:
101b 23 10 dw iobyte_option_handler_CON_CRT
101d 33 10 dw iobyte_option_handler_CON_TTY
101f 41 10 dw iobyte_option_handler_LST_LPT
1021 4b 10 dw iobyte_option_handler_LST_TTY
1023
1023 iobyte_option_handler_CON_CRT:
1023 1a LD A,(DE)
1024 ; iobyte CONSOLE = 01-CRT
1024 cb 8f RES 0x1,A
1026 cb c7 SET 0x0,A
1028 12 LD (DE),A
1029 ; Continue on the LST options
1029 21 ae 0f LD HL,iobyte_sequence_LST
102c 3e 02 LD A,0x2
102e 32 e3 01 LD (current_selection),A
1031 d1 POP DE
1032 e9 JP (HL)
1033
1033 iobyte_option_handler_CON_TTY:
1033 1a LD A,(DE)
1034 ; iobyte CONSOLE = 00-TTY
1034 cb 87 RES 0x0,A
1036 cb 8f RES 0x1,A
1038 12 LD (DE),A
1039 ; Continue on the LST options (just the next one)
1039 3a e3 01 LD A,(current_selection)
103c 3c INC A
103d 32 e3 01 LD (current_selection),A
1040 c9 RET
1041
1041 iobyte_option_handler_LST_LPT:
1041 1a LD A,(DE)
1042 ; iobyte LIST = 10-LPT
1042 cb b7 RES 0x6,A
1044 cb ff SET 0x7,A
1046 12 LD (DE),A
1047 ; Continue on the ESC option
1047 21 c0 0f LD HL,iobyte_sequence_esc
104a e9 JP (HL)
104b
104b iobyte_option_handler_LST_TTY:
104b 1a LD A,(DE)
104c ; iobyte LIST = 00-TTY
104c cb bf RES 0x7,A
104e cb b7 RES 0x6,A
1050 12 LD (DE),A
1051 ; Continue on the ESC option
1051 c9 RET
1052
1052 menu_1_iobyte_1_help:
1052 ; Display the help
1052 0e 09 LD C,CON_WRITESTR
1054 11 99 21 LD DE,msg_help_iobyte
1057 cd 05 00 CALL BDOS
105a 0e 09 LD C,CON_WRITESTR
105c 11 22 14 LD DE,msg_press_any_key
105f cd 05 00 CALL BDOS
1062 0e 01 LD C,CON_READ
1064 cd 05 00 CALL BDOS
1067 c3 52 0f JP menu_1_iobyte
106a
106a msg_iobyte_change_menu:
106a 1a db clear_screen
106b .. db "\r\n"
106d .. db "\r\n"
106f .. db "\tDefault settings\tPosibile changes\r\n"
1093 .. db "\t----------------\t----------------\r\n"
10b7 .. db "\r\n"
10b9 .. db "\tCON:=CRT:\t\tCON:=TTY:\tType the [LINE FEED] key to \r\n"
10ed .. db "\tLST:=LPT:\t\tLST:=TTY:\tmove the cursor to the mode \r\n"
1121 .. db "\tPUN:=TTY:\t\t- none -\tyou wish to select.\r\n"
114b .. db "\tRDR:=TTY:\t\t- none -\tThen the RETURN key to enter\r\n"
117e .. db "\t\t\t\t\t\tyour selection.\r\n"
1195 .. db "\tType the [ESC] key to return to the previous menu.\r\n"
11ca .. db "\r\n"
11cc .. db "* CON: If you chose CON:=TTY: then all input and output will be through the\r\n"
121a .. db "\tserial connector on the back of your KAYPRO II instead of through the\r\n"
1262 .. db "\tkeyboard and the CRT.\r\n"
127a .. db "\r\n"
127c .. db "\r\n"
127e .. db "* LST:\tThis setting will decide wether the output directed at a printer\r\n"
12c7 .. db "\twill go through the LPT: (parallel connector) or to the\r\n"
1301 .. db "\tTTY: (serial connector).\r\n$"
131d
131d iobyte_options_position_CON_CRT:
131d 1b .. ff db 0x1B,"=%,",0xFF
1322 iobyte_options_position_CON_TTY:
1322 1b .. ff db 0x1B,"=%D",0xFF
1327 iobyte_options_position_LST_LPT:
1327 1b .. ff db 0x1B,"=&,",0xFF
132c iobyte_options_position_LST_TTY:
132c 1b .. ff db 0x1B,"=&D",0xFF
1331 iobyte_options_position_esc:
1331 1b .. ff db 0x1B,"=*3",0xFF
1336
1336
1336 ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
1336 ; EXIT AND SAVE
1336 ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
1336
1336 menu_exit:
1336 3a f4 13 LD A,(changes_pending)
1339 fe ff CP changes_pending_no
133b ; If changes are pending, ask the user if he wants to save them
133b c2 46 13 JP NZ,save_changes_menu
133e
133e exit_without_saving_changes:
133e ; Reset the BIOS config in memory (not on disk)
133e ; Why?
133e 3e 00 LD A,write_safe_no
1340 32 34 fa LD (BIOS_config_byte),A
1343 ca 00 00 JP Z,RST0