Mercurial > hg > Members > kono > nitros9-code
view defs/m51.defs @ 1933:1e312b144f4d
Major changes:
CCIO,CC3IO are now VTIO
GrfInt is now CoGrf
WindInt is now CoWin
VDGInt (L2), CO32 (L1) is now CoVDG
CO51 (L1) is now CoHR
CO80 (L1) is now CoWP
All files referencing these have been changed
author | boisy |
---|---|
date | Sat, 26 Nov 2005 21:31:29 +0000 |
parents | f7384b5a59c8 |
children |
line wrap: on
line source
* miscellaneous definitions HResMaxX equ 639 high resolution X limit HResMaxY equ 191 high resolution Y limit MousData equ $0008 arbitrary choice for mouse data area ($0008-$000E) PcktSize equ 3 number of bytes in mouse data packet SyncData equ %01000000 initial mouse data byte pattern * 6551 register definitions org 0 DataReg rmb 1 receive/transmit data StatReg rmb 1 IRQ/DSR/DCD/error status (read only) PRstReg equ StatReg programmed reset (write only) CmdReg rmb 1 command (parity/echo/Tx IRQ/Rx IRQ/DTR) CtrlReg rmb 1 control (stop bits/word length/Rx clock/baud rate) * Status bit definitions Stat.IRQ equ %10000000 IRQ occurred Stat.DSR equ %01000000 current DSR input level (0=enabled, 1=disabled) Stat.DCD equ %00100000 current DCD input level (0=enabled, 1=disabled) Stat.TxE equ %00010000 Tx register empty Stat.RxF equ %00001000 Rx register full Stat.Ovn equ %00000100 overrun error Stat.Frm equ %00000010 framing error Stat.Par equ %00000001 parity error Stat.Err equ Stat.Ovn!Stat.Frm!Stat.Par status error bits Stat.Flp equ $00 all status bits active when set Stat.Msk equ Stat.RxF!Stat.Ovn!Stat.Frm!Stat.Par active IRQ bits * Command bit definitions Cmd.Par equ %11100000 see parity table below Cmd.Echo equ %00010000 Rx echo (0=disabled, 1=enabled) Cmd.TxIC equ %00001100 see Tx IRQ control table below Cmd.RxIE equ %00000010 Rx IRQ enable (0=enabled, 1=disabled) Cmd.DTR equ %00000001 DTR output (0=disabled, 1=enabled) * parity table Par.None equ %00000000 Par.Odd equ %00100000 Par.Even equ %01100000 Par.Mark equ %10100000 Par.Spac equ %11100000 * Tx IRQ control table TIC.Off equ %00000000 RTS disabled, Tx IRQ disabled TIC.On equ %00000100 RTS enabled, Tx IRQ enabled TIC.RTS equ %00001000 RTS enabled, Tx IRQ disabled TIC.Brk equ %00001100 RTS enabled, Tx line break * Control bit definitions Ctl.Stop equ %10000000 stop bits (clear=1, set=2) Ctl.DBit equ %01100000 see data bit table below Ctl.RClk equ %00010000 Rx clock source (0=external, 1=internal) Ctl.Baud equ %00001111 see baud rate table below * data bit table DB.5 equ %01100000 five data bits per character DB.6 equ %01000000 six data bits per character DB.7 equ %00100000 seven data bits per character DB.8 equ %00000000 eight data bits per character * baud rate table org 0 BR.ExClk rmb 1 16x external clock BR.00050 rmb 1 50 baud BR.00075 rmb 1 75 baud BR.00110 rmb 1 109.92 baud BR.00135 rmb 1 134.58 baud BR.00150 rmb 1 150 baud BR.00300 rmb 1 300 baud BR.00600 rmb 1 600 baud BR.01200 rmb 1 1200 baud BR.01800 rmb 1 1800 baud BR.02400 rmb 1 2400 baud BR.03600 rmb 1 3600 baud BR.04800 rmb 1 4800 baud BR.07200 rmb 1 7200 baud BR.09600 rmb 1 9600 baud BR.19200 rmb 1 19200 baud * Buffer (0,u only) bit definitions B.Butn1 equ %00100000 button #1 (left, 1 = pressed) B.Butn2 equ %00010000 button #2 (right, 1 = pressed) B.Butns equ B.Butn1!B.Butn2 mask for all buttons * mouse static data area definitions org 0 Buffer rmb 2 Rx buffer for mouse data (must start at 0,u) Counter rmb 1 Rx data counter CrntXPos rmb 2 mouse X position (0 to HResMaxX) CrntYPos rmb 2 mouse Y position (0 to HResMaxY*2)