annotate defs/l52.defs @ 0:6641a883d6b0

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