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