Index: trunk/Assembly_Library/Inc/Serial.inc
===================================================================
--- trunk/Assembly_Library/Inc/Serial.inc	(revision 277)
+++ trunk/Assembly_Library/Inc/Serial.inc	(revision 277)
@@ -0,0 +1,62 @@
+; Project name	:	AssemblyLibrary
+; Description	:	Defines for display library.
+
+%ifndef SERIAL_INC
+%define SERIAL_INC
+
+;--------------- UART Equates -----------------------------
+;
+; Serial Programming References:
+;    http://en.wikibooks.org/wiki/Serial_Programming
+;
+
+Serial_UART_base						EQU		0
+Serial_UART_transmitByte				EQU		0
+Serial_UART_receiveByte					EQU		0
+
+;
+; Values for UART_divisorLow:
+; 60h = 1200, 30h = 2400, 18h = 4800, 0ch = 9600, 6 = 19200, 4 = 28800, 3 = 38400, 2 = 57600, 1 = 115200
+;
+Serial_UART_divisorLow					EQU		0
+
+;
+; UART_divisorHigh is zero for all speeds including and above 1200 baud (which is all we do)
+;
+Serial_UART_divisorHigh					EQU		1
+
+Serial_UART_interruptIdent				EQU		2
+Serial_UART_FIFOControl					EQU		2
+
+Serial_UART_lineControl					EQU		3
+
+Serial_UART_modemControl				EQU		4
+
+Serial_UART_lineStatus					EQU		5
+
+Serial_UART_modemStatus					EQU		6
+
+Serial_UART_scratch						EQU		7
+
+;----------------------------------------------------------------------
+;
+; COM Number to I/O Port Address Mapping
+;
+; COM Number:                               1,    2,    3,    4,    5,    6,    7,    8,    9,   10,   11,   12
+; Corresponds to I/O port:                3f8,  2f8,  3e8,  2e8,  2f0,  3e0,  2e0,  260,  368,  268,  360,  270
+; Corresponds to Packed I/O port (hex):    37,   17,   35,   15,   16,   34,   14,    4,   25,    5,   24,    6
+;
+SERIAL_COM1_IOADDRESS	EQU		3f8h
+SERIAL_COM2_IOADDRESS	EQU		2f8h
+SERIAL_COM3_IOADDRESS	EQU		3e8h
+SERIAL_COM4_IOADDRESS	EQU		2e8h
+SERIAL_COM5_IOADDRESS	EQU		2f0h
+SERIAL_COM6_IOADDRESS	EQU		3e0h
+SERIAL_COM7_IOADDRESS	EQU		2e0h
+SERIAL_COM8_IOADDRESS	EQU		260h
+SERIAL_COM9_IOADDRESS	EQU		368h
+SERIAL_COMA_IOADDRESS	EQU		268h
+SERIAL_COMB_IOADDRESS	EQU		360h
+SERIAL_COMC_IOADDRESS	EQU		270h
+
+%endif
Index: trunk/Assembly_Library/Inc/SerialServer.inc
===================================================================
--- trunk/Assembly_Library/Inc/SerialServer.inc	(revision 277)
+++ trunk/Assembly_Library/Inc/SerialServer.inc	(revision 277)
@@ -0,0 +1,63 @@
+; Project name	:	XTIDE Universal BIOS
+; Description	:	Serial Server Defines
+
+%ifndef SERIALSERVER_INC
+%define SERIALSERVER_INC
+
+%include "Serial.inc"
+
+;
+; Command codes
+;
+SerialServer_Command_Header					EQU		0a0h
+SerialServer_Command_Write					EQU		(SerialServer_Command_Header | 3)
+SerialServer_Command_Read					EQU		(SerialServer_Command_Header | 2)
+SerialServer_Command_Inquire				EQU		(SerialServer_Command_Header | 0)
+SerialServer_Command_Custom_Read			EQU		(SerialServer_Command_Header | 4)
+SerialServer_Command_Custom_Write			EQU		(SerialServer_Command_Header | 5)
+
+SerialServer_SubCommand_Image_SendInitiate		EQU		1
+SerialServer_SubCommand_Image_SendSectors		EQU		2
+SerialServer_SubCommand_Image_SendComplete		EQU		3
+
+;
+; Locations within the ATA 512-byte Inquire structure, taken from the "Vendor specific area",
+; for serial port specific information that is returned by the server for an inquire.
+;
+; NOTE: These are byte offsets (because of the "*2"), which is more convenient here, while
+;       the ATA structure defines these in terms of word offsets.
+;
+SerialServer_ATA_wServerVersion			EQU		(157*2)
+SerialServer_ATA_wFloppyFlagAndType		EQU		(158*2)
+SerialServer_ATA_wPortAndBaud			EQU		(159*2)
+
+;
+; Command structure passed to SerialServer_SendReceive.  This mirrors IDEPACK in the XTIDE Universal BIOS, 
+; since that structure is passed directly without copying values into this structure.
+;
+struc SerialServer_Command
+	.wCommandAndCustom:	
+	.bCommand				resb	1
+
+	.bCustomCommand:	
+	.bDrvAndHead			resb	1	; LBA28 27...24
+
+	.wSectorCountAndLbaLow:
+	.bSectorCount			resb	1
+
+	.bCustomData3:		
+	.bSectorNumber:
+	.bLbaLow				resb	1	; LBA 7...0
+
+	.wCustomData1:		
+	.bCustomData1:		
+	.wCylinder:
+	.wLbaMiddleAndHigh:
+	.bLbaMiddle				resb	1	; LBA 15...8
+
+	.bCustomData2:		
+	.bLbaHigh				resb	1	; LBA 23...16
+endstruc
+
+%endif
+
