source: xtideuniversalbios/trunk/Assembly_Library/Inc/Serial.inc@ 406

Last change on this file since 406 was 277, checked in by gregli@…, 13 years ago

Moved the bulk of the serial code to the assembly library, for inclusion in other utilities. Fixed a bug in int13h.asm when floppy support was not enabled that was preventing foreign drives from working properly.

File size: 1.8 KB
RevLine 
[277]1; Project name : AssemblyLibrary
2; Description : Defines for display library.
3
4%ifndef SERIAL_INC
5%define SERIAL_INC
6
7;--------------- UART Equates -----------------------------
8;
9; Serial Programming References:
10; http://en.wikibooks.org/wiki/Serial_Programming
11;
12
13Serial_UART_base EQU 0
14Serial_UART_transmitByte EQU 0
15Serial_UART_receiveByte EQU 0
16
17;
18; Values for UART_divisorLow:
19; 60h = 1200, 30h = 2400, 18h = 4800, 0ch = 9600, 6 = 19200, 4 = 28800, 3 = 38400, 2 = 57600, 1 = 115200
20;
21Serial_UART_divisorLow EQU 0
22
23;
24; UART_divisorHigh is zero for all speeds including and above 1200 baud (which is all we do)
25;
26Serial_UART_divisorHigh EQU 1
27
28Serial_UART_interruptIdent EQU 2
29Serial_UART_FIFOControl EQU 2
30
31Serial_UART_lineControl EQU 3
32
33Serial_UART_modemControl EQU 4
34
35Serial_UART_lineStatus EQU 5
36
37Serial_UART_modemStatus EQU 6
38
39Serial_UART_scratch EQU 7
40
41;----------------------------------------------------------------------
42;
43; COM Number to I/O Port Address Mapping
44;
45; COM Number: 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12
46; Corresponds to I/O port: 3f8, 2f8, 3e8, 2e8, 2f0, 3e0, 2e0, 260, 368, 268, 360, 270
47; Corresponds to Packed I/O port (hex): 37, 17, 35, 15, 16, 34, 14, 4, 25, 5, 24, 6
48;
49SERIAL_COM1_IOADDRESS EQU 3f8h
50SERIAL_COM2_IOADDRESS EQU 2f8h
51SERIAL_COM3_IOADDRESS EQU 3e8h
52SERIAL_COM4_IOADDRESS EQU 2e8h
53SERIAL_COM5_IOADDRESS EQU 2f0h
54SERIAL_COM6_IOADDRESS EQU 3e0h
55SERIAL_COM7_IOADDRESS EQU 2e0h
56SERIAL_COM8_IOADDRESS EQU 260h
57SERIAL_COM9_IOADDRESS EQU 368h
58SERIAL_COMA_IOADDRESS EQU 268h
59SERIAL_COMB_IOADDRESS EQU 360h
60SERIAL_COMC_IOADDRESS EQU 270h
61
62%endif
Note: See TracBrowser for help on using the repository browser.