359
|
1
|
|
2 * miscellaneous definitions
|
|
3 HResMaxX equ 639 high resolution X limit
|
|
4 HResMaxY equ 191 high resolution Y limit
|
|
5 MousData equ $0008 arbitrary choice for mouse data area ($0008-$000E)
|
|
6 PcktSize equ 3 number of bytes in mouse data packet
|
|
7 SyncData equ %01000000 initial mouse data byte pattern
|
|
8
|
|
9 * 65C52 register definitions
|
|
10 org 0
|
|
11 ISReg rmb 1 IRQ Status (read only)
|
|
12 IEReg equ ISReg IRQ Enable (write only)
|
|
13 CSReg rmb 1 Control Status (read only)
|
|
14 CFReg equ CSReg Control/Format (write only)
|
|
15 CDReg rmb 1 Compare Data (write only, unused in this driver)
|
|
16 TBReg equ CDReg Transmit Break (write only)
|
|
17 DataReg rmb 1 receive/transmit Data (read Rx / write Tx)
|
|
18
|
|
19 * IRQ Status/Enable bit definitions
|
|
20 ISE.IRQ equ %10000000 IRQ occurred/enable
|
|
21 ISE.TxE equ %01000000 Tx data register Empty
|
|
22 ISE.CTS equ %00100000 CTS transition
|
|
23 ISE.DCD equ %00010000 DCD transition
|
|
24 ISE.DSR equ %00001000 DSR transition
|
|
25 ISE.FOB equ %00000100 receive data Framing or Overrun error, or Break
|
|
26 ISE.Par equ %00000010 Parity error in Rx data
|
|
27 ISE.RxF equ %00000001 Rx data register Full
|
|
28
|
|
29 ISE.Errs equ ISE.FOB!ISE.Par IRQ Status error bits
|
|
30 ISE.Flip equ $00 all ISR bits active when set
|
|
31 ISE.Mask equ ISE.FOB!ISE.Par!ISE.RxF active IRQs
|
|
32
|
|
33 * Control Status bit definitions
|
|
34 CS.Frame equ %10000000 framing error (set=error)
|
|
35 CS.TxE equ %01000000 Tx data empty (set=empty)
|
|
36 CS.CTS equ %00100000 CTS input (set=disabled)
|
|
37 CS.DCD equ %00010000 DCD input (set=disabled)
|
|
38 CS.DSR equ %00001000 DSR input (set=disabled)
|
|
39 CS.Break equ %00000100 Rx line break (set=received break)
|
|
40 CS.DTR equ %00000010 DTR output (set=disabled)
|
|
41 CS.RTS equ %00000001 RTS output (set=disabled)
|
|
42
|
|
43 * Control bit definitions
|
|
44 C.TBRCDR equ %01000000 Tx Break/Compare Data register access (set=Tx Break)
|
|
45 C.StpBit equ %00100000 stop bits (set=two, clear=one)
|
|
46 C.Echo equ %00010000 local echo (set=activated)
|
|
47 C.Baud equ %00001111 see baud rate table below
|
|
48
|
|
49 * baud rate table
|
|
50 org 0
|
|
51 BR.00050 rmb 1 50 baud
|
|
52 BR.00110 rmb 1 109.2 baud
|
|
53 BR.00135 rmb 1 134.58 baud
|
|
54 BR.00150 rmb 1 150 baud
|
|
55 BR.00300 rmb 1 300 baud
|
|
56 BR.00600 rmb 1 600 baud
|
|
57 BR.01200 rmb 1 1200 baud
|
|
58 BR.01800 rmb 1 1800 baud
|
|
59 BR.02400 rmb 1 2400 baud
|
|
60 BR.03600 rmb 1 3600 baud
|
|
61 BR.04800 rmb 1 4800 baud
|
|
62 BR.07200 rmb 1 7200 baud
|
|
63 BR.09600 rmb 1 9600 baud
|
|
64 BR.19200 rmb 1 19200 baud
|
|
65 BR.38400 rmb 1 38400 baud
|
|
66 BR.ExClk rmb 1 external Rx and Tx clocks
|
|
67
|
|
68 * Format bit definitions
|
|
69 F.Slct equ %10000000 register select (set=Format, clear=Control)
|
|
70 F.DatBit equ %01100000 see data bit table below
|
|
71 F.Par equ %00011100 see parity table below
|
|
72 F.DTR equ %00000010 DTR output (set=disabled)
|
|
73 F.RTS equ %00000001 RTS output (set=disabled)
|
|
74
|
|
75 * data bit table
|
|
76 DB.5 equ %00000000 five data bits per character
|
|
77 DB.6 equ %00100000 six data bits per character
|
|
78 DB.7 equ %01000000 seven data bits per character
|
|
79 DB.8 equ %01100000 eight data bits per character
|
|
80
|
|
81 * parity table
|
|
82 Par.None equ %00000000
|
|
83 Par.Odd equ %00000100
|
|
84 Par.Even equ %00001100
|
|
85 Par.Mark equ %00010100
|
|
86 Par.Spac equ %00011100
|
|
87
|
|
88 * Transmit Break bit definitions
|
|
89 TB.Brk equ %00000010 Tx break control (set=transmit continuous line Break)
|
|
90 TB.Par equ %00000001 parity check (set=parity bit to ISE.Par, clear=normal)
|
|
91
|
|
92 * Buffer (0,u only) bit definitions
|
|
93 B.Butn1 equ %00100000 button #1 (left, 1 = pressed)
|
|
94 B.Butn2 equ %00010000 button #2 (right, 1 = pressed)
|
|
95
|
|
96 B.Butns equ B.Butn1!B.Butn2 mask for all buttons
|
|
97
|
|
98
|
|
99 * mouse static data area definitions
|
|
100 org 0
|
|
101 Buffer rmb 2 Rx buffer for mouse data (must start at 0,u)
|
|
102 Counter rmb 1 Rx data counter
|
|
103 CrntXPos rmb 2 mouse X position (0 to HResMaxX)
|
|
104 CrntYPos rmb 2 mouse Y position (0 to HResMaxY*2)
|
|
105
|