-
Notifications
You must be signed in to change notification settings - Fork 2
/
Copy pathcambio8.prn
36 lines (36 loc) · 1.1 KB
/
cambio8.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
# File cambio8.s
0000 ; CAMBIO8.COM included on the kaypro CP/M 2.2 Spanish version
0000
0000 WARM_START_VECTOR: EQU 0001h ; Address 0h has a JP WARM_START
0000 CONF_BYTE_OFFSET: EQU 31h ; The byte is a fixed offset from the warm start code
0000
0000 CONFIG_BIT: EQU 6
0000
0000 BDOS_ENTRYPOINT: EQU 0005h
0000 CALL_WRITESTR: EQU 09h ; BDOS call
0000
0000 org 0100h
0100 2a 01 00 ld hl, (WARM_START_VECTOR)
0103 11 31 00 ld de, CONF_BYTE_OFFSET
0106 19 add hl, de
0107 cb 76 bit CONFIG_BIT, (hl)
0109 28 07 jr z, set_bit
010b clear_bit:
010b cb b6 res CONFIG_BIT, (hl)
010d 11 1d 01 ld de, clear_message
0110 18 05 jr display_message
0112 set_bit:
0112 cb f6 set CONFIG_BIT, (hl)
0114 11 35 01 ld de, set_message
0117 display_message:
0117 0e 09 ld c, CALL_WRITESTR
0119 cd 05 00 call BDOS_ENTRYPOINT
011c c9 ret
011d clear_message:
011d .. db "\r\nSwitching to 7 bits\r\n$"
0135 set_message:
0135 .. db "\r\nSwitching to 8 bits\r\n$"
014d filler:
014d 0x00... ds 51, 0
# End of file cambio8.s
0180