Mercurial > hg > Members > kono > nitros9-code
comparison defs/l51.defs @ 0:6641a883d6b0
Initial revision
author | boisy |
---|---|
date | Thu, 04 Apr 2002 16:34:12 +0000 |
parents | |
children | 1317b044e8bf |
comparison
equal
deleted
inserted
replaced
-1:000000000000 | 0:6641a883d6b0 |
---|---|
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 * 6551 register definitions | |
11 org 0 | |
12 DataReg rmb 1 receive/transmit data | |
13 StatReg rmb 1 IRQ/DSR/DCD/error status (read only) | |
14 PRstReg equ StatReg programmed reset (write only) | |
15 CmdReg rmb 1 command (parity/echo/Tx IRQ/Rx IRQ/DTR) | |
16 CtrlReg rmb 1 control (stop bits/word length/Rx clock/baud rate) | |
17 | |
18 * Status bit definitions | |
19 Stat.IRQ equ %10000000 IRQ occurred | |
20 Stat.DSR equ %01000000 current DSR input level (0=enabled, 1=disabled) | |
21 Stat.DCD equ %00100000 current DCD input level (0=enabled, 1=disabled) | |
22 Stat.TxE equ %00010000 Tx register empty | |
23 Stat.RxF equ %00001000 Rx register full | |
24 Stat.Ovn equ %00000100 overrun error | |
25 Stat.Frm equ %00000010 framing error | |
26 Stat.Par equ %00000001 parity error | |
27 | |
28 Stat.Err equ Stat.Ovn!Stat.Frm!Stat.Par status error bits | |
29 Stat.Flp equ $00 all status bits active when set | |
30 Stat.Msk equ Stat.RxF!Stat.Ovn!Stat.Frm!Stat.Par active IRQ bits | |
31 | |
32 * Command bit definitions | |
33 Cmd.Par equ %11100000 see parity table below | |
34 Cmd.Echo equ %00010000 Rx echo (0=disabled, 1=enabled) | |
35 Cmd.TxIC equ %00001100 see Tx IRQ control table below | |
36 Cmd.RxIE equ %00000010 Rx IRQ enable (0=enabled, 1=disabled) | |
37 Cmd.DTR equ %00000001 DTR output (0=disabled, 1=enabled) | |
38 | |
39 * parity table | |
40 Par.None equ %00000000 | |
41 Par.Odd equ %00100000 | |
42 Par.Even equ %01100000 | |
43 Par.Mark equ %10100000 | |
44 Par.Spac equ %11100000 | |
45 | |
46 * Tx IRQ control table | |
47 TIC.Off equ %00000000 RTS disabled, Tx IRQ disabled | |
48 TIC.On equ %00000100 RTS enabled, Tx IRQ enabled | |
49 TIC.RTS equ %00001000 RTS enabled, Tx IRQ disabled | |
50 TIC.Brk equ %00001100 RTS enabled, Tx line break | |
51 | |
52 * Control bit definitions | |
53 Ctl.Stop equ %10000000 stop bits (clear=1, set=2) | |
54 Ctl.DBit equ %01100000 see data bit table below | |
55 Ctl.RClk equ %00010000 Rx clock source (0=external, 1=internal) | |
56 Ctl.Baud equ %00001111 see baud rate table below | |
57 | |
58 * data bit table | |
59 DB.5 equ %01100000 five data bits per character | |
60 DB.6 equ %01000000 six data bits per character | |
61 DB.7 equ %00100000 seven data bits per character | |
62 DB.8 equ %00000000 eight data bits per character | |
63 | |
64 * baud rate table | |
65 org 0 | |
66 BR.ExClk rmb 1 16x external clock | |
67 BR.00050 rmb 1 50 baud | |
68 BR.00075 rmb 1 75 baud | |
69 BR.00110 rmb 1 109.92 baud | |
70 BR.00135 rmb 1 134.58 baud | |
71 BR.00150 rmb 1 150 baud | |
72 BR.00300 rmb 1 300 baud | |
73 BR.00600 rmb 1 600 baud | |
74 BR.01200 rmb 1 1200 baud | |
75 BR.01800 rmb 1 1800 baud | |
76 BR.02400 rmb 1 2400 baud | |
77 BR.03600 rmb 1 3600 baud | |
78 BR.04800 rmb 1 4800 baud | |
79 BR.07200 rmb 1 7200 baud | |
80 BR.09600 rmb 1 9600 baud | |
81 BR.19200 rmb 1 19200 baud | |
82 | |
83 * Btn.Cntr bit definitions | |
84 BC.Butn1 equ %00100000 button #1 (left, 1 = pressed) | |
85 BC.Butn2 equ %00010000 button #2 (middle, 1 = pressed) | |
86 BC.Butn3 equ %00001000 button #3 (right, 1 = pressed) | |
87 BC.RxCnt equ %00000111 Rx data counter | |
88 | |
89 BC.Butns equ BC.Butn1!BC.Butn2!BC.Butn3 mask for all buttons | |
90 | |
91 | |
92 * mouse static data area definitions | |
93 org 0 | |
94 Btn.Cntr rmb 1 mouse button status and Rx data counter | |
95 Buffer rmb 3 Rx buffer for 1st 3 bytes of XY mouse data (must start at 1,u) | |
96 CrntXPos rmb 2 mouse X position (0 to HResMaxX) | |
97 CrntYPos rmb 2 mouse Y position (0 to HResMaxY*2) | |
98 |