Index: trunk/XTIDE_Universal_BIOS/Src/Device/IDE/IdeIrq.asm
===================================================================
--- trunk/XTIDE_Universal_BIOS/Src/Device/IDE/IdeIrq.asm	(revision 232)
+++ trunk/XTIDE_Universal_BIOS/Src/Device/IDE/IdeIrq.asm	(revision 233)
@@ -109,5 +109,6 @@
 	; Reading Status Register acknowledges IDE interrupt
 	call	RamVars_GetSegmentToDS
-	call	FindDPT_ToDSDIforInterruptInService
+	mov		bl, FLGH_DPT_INTERRUPT_IN_SERVICE
+	call	FindDPT_ToDSDIforFlagsHighInBL
 	mov		dl, STATUS_REGISTER_in
 	call	IdeIO_InputToALfromIdeRegisterInDL
Index: trunk/XTIDE_Universal_BIOS/Src/Device/Serial/SerialCommand.asm
===================================================================
--- trunk/XTIDE_Universal_BIOS/Src/Device/Serial/SerialCommand.asm	(revision 232)
+++ trunk/XTIDE_Universal_BIOS/Src/Device/Serial/SerialCommand.asm	(revision 233)
@@ -17,16 +17,7 @@
 ;
 ; Values for UART_divisorLow:
-; 60h = 1200, 30h = 2400, 18h = 4800, 0ch = 9600, 6 = 19200, 3 = 38400, 2 = 57600, 1 = 115200
+; 60h = 1200, 30h = 2400, 18h = 4800, 0ch = 9600, 6 = 19200, 4 = 28800, 3 = 38400, 2 = 57600, 1 = 115200
 ;
 SerialCommand_UART_divisorLow					EQU		0
-
-;
-; We support 4 baud rates, starting here going higher and skipping every other baud rate
-; Starting with 30h, that means 30h (1200 baud), 0ch (9600 baud), 3 (38400 baud), and 1 (115200 baud)
-; Note: hardware baud multipliers (2x, 4x) will impact the final baud rate and are not known at this level
-;
-SerialCommand_UART_divisorLow_startingBaud		EQU   030h
-
-SerialCommand_UART_interruptEnable				EQU		1
 
 ;
@@ -91,13 +82,13 @@
 		mov		[bp+IDEPACK.bFeatures],ah		; store protocol command
 
-		mov		dl, byte [di+DPT_SERIAL.bSerialPortAndBaud]
+		mov		dx, [di+DPT_SERIAL.wSerialPortAndBaud]
 
 ; fall-through
 
 ;--------------------------------------------------------------------
-; SerialCommand_OutputWithParameters_DeviceInDL
+; SerialCommand_OutputWithParameters_DeviceInDX
 ;	Parameters:
 ;       AH:		Protocol Command
-;       DL:		Packed I/O port and baud rate
+;       DX:		Packed I/O port and baud rate
 ;		ES:SI:	Ptr to buffer (for data transfer commands)
 ;		SS:BP:	Ptr to IDEREGS_AND_INTPACK
@@ -108,5 +99,5 @@
 ;		AL, BX, CX, DX, (ES:SI for data transfer commands)
 ;--------------------------------------------------------------------
-SerialCommand_OutputWithParameters_DeviceInDL:
+SerialCommand_OutputWithParameters_DeviceInDX:
 
 		push	si
@@ -116,19 +107,11 @@
 ;
 ; Unpack I/O port and baud from DPT
-;		Port to DX more or less for the remainder of the routine
+;		Port to DX for the remainder of the routine (+/- different register offsets)
 ;		Baud in CH until UART initialization is complete
 ;
-		mov		dh, ((DEVICE_SERIAL_PACKEDPORTANDBAUD_STARTINGPORT & 0f00h) >> (8+1))
-		shl		dx, 1		; port offset already x4, needs one more shift to be x8
-		mov		cl, dl
-
-		and		cl, (DEVICE_SERIAL_PACKEDPORTANDBAUD_BAUDMASK << 1)
-		mov		ch, SerialCommand_UART_divisorLow_startingBaud
-		shr		ch, cl
-		adc		ch, 0
-
-		and		dl, ((DEVICE_SERIAL_PACKEDPORTANDBAUD_PORTMASK << 1) & 0ffh)
-		add		dx, byte (DEVICE_SERIAL_PACKEDPORTANDBAUD_STARTINGPORT & 0ffh)
-
+		mov		ch,dh
+		xor		dh,dh
+		eSHL_IM	dx, 2			; shift from one byte to two		
+		
 		mov		al,[bp+IDEPACK.bSectorCount]
 
@@ -414,4 +397,5 @@
 ; taken care of this, but I have seen cases where this is not true.
 ;
+		xor		cx,cx					; timeout this clearing routine, in case the UART isn't there
 .clearBuffer:
 		mov		dl,bh
@@ -420,7 +404,7 @@
 		test	al,08fh
 		jz		.clearBufferComplete
-		shr		al,1
+		test	al,1
 		in		al,dx
-		jc		.clearBuffer	; note CF from shr above
+		loopnz	.clearBuffer			; note ZF from test above
 
 .clearBufferComplete:
@@ -641,23 +625,30 @@
 ;     master scan.
 ;
-		mov		dl,[cs:bp+IDEVARS.bSerialPackedPortAndBaud]
-		mov		al,	byte [RAMVARS.xlateVars+XLATEVARS.bLastSerial]
+		mov		cx,1			; 1 sector to move, 0 for non-scan
+		mov		dx,[cs:bp+IDEVARS.wSerialPortAndBaud]
+		xor		ax,ax
+		push	si
+		call	FindDPT_ToDSDIforSerialDevice
+		pop		si
+		jnc		.notfounddpt
+		mov		ax,[ds:di+DPT_SERIAL.wSerialPortAndBaud]
+.notfounddpt:	
 
 		test	bh, FLG_DRVNHEAD_DRV
 		jz		.master
 
-		test	al,al			; Take care of the case that is different between master and slave.
+		test	ax,ax			; Take care of the case that is different between master and slave.
 		jz		.error			; Because we do this here, the jz after the "or" below will not be taken
 
 ; fall-through
 .master:
-		test	dl,dl
-		jnz		.identifyDeviceInDL
-
-		or		dl,al			; Move bLast into position in dl, as well as test for zero
+		test	dx,dx
+		jnz		.identifyDeviceInDX
+
+		or		dx,ax			; Move bLast into position in dl, as well as test for zero
 		jz		.scanSerial
 
 ; fall-through
-.identifyDeviceInDL:
+.identifyDeviceInDX:
 
 		push	bp				; setup fake IDEREGS_AND_INTPACK
@@ -665,5 +656,4 @@
 		push	dx
 
-		mov		cl,1			; 1 sector to move
 		push	cx
 
@@ -674,5 +664,5 @@
 
 		mov		bp,sp
-		call	SerialCommand_OutputWithParameters_DeviceInDL
+		call	SerialCommand_OutputWithParameters_DeviceInDX
 
 		pop		bx
@@ -680,15 +670,10 @@
 		pop		cx
 		pop		dx
-
+		
 		pop		bp
 ;
 ; place packed port/baud in RAMVARS, read by FinalizeDPT and DetectDrives
 ;
-; Note that this will be set during an int13h/25h call as well.  Which is OK since it is only used (at the
-; top of this routine) for drives found during a COM scan, and we only COM scan if there were no other
-; COM drives found.  So we will only reaffirm the port/baud for the one COM port/baud that has a drive.
-;
-		jc		.notFound											; only store bLastSerial if success
-		mov		byte [RAMVARS.xlateVars+XLATEVARS.bLastSerial], dl
+		mov		[es:si+ATA6.wVendor],dx
 
 .notFound:
@@ -714,4 +699,5 @@
 .scanSerial:
 		mov		di,.scanPortAddresses-1
+		mov		ch,1			;  tell server that we are scanning
 
 .nextPort:
@@ -741,22 +727,27 @@
 
 ;
-; Pack into dl, baud rate starts at 0
-;
-		add		dx,-(DEVICE_SERIAL_PACKEDPORTANDBAUD_STARTINGPORT)
-		shr		dx,1			; dh is zero at this point, and will be sent to the server,
-								; so we know this is an auto detect
-
-		jmp		.testFirstBaud
-
-;
-; Walk through 4 possible baud rates
-;
+; Begin baud rate scan on this port...
+;
+; On a scan, we support 6 baud rates, starting here and going higher by a factor of two each step, with a 
+; small jump between 9600 and 38800.  These 6 were selected since we wanted to support 9600 baud and 115200,
+; *on the server side* if the client side had a 4x clock multiplier, a 2x clock multiplier, or no clock multiplier. 
+;
+; Starting with 30h, that means 30h (2400 baud), 18h (4800 baud), 0ch (9600 baud), and
+;					            04h (28800 baud), 02h (57600 baud), 01h (115200 baud)
+;
+; Note: hardware baud multipliers (2x, 4x) will impact the final baud rate and are not known at this level
+;
+		mov		dh,030h * 2	    ; multiply by 2 since we are about to divide by 2
+		mov		dl,[cs:di]		; restore single byte port address for scan
+
 .nextBaud:
-		inc		dx
-		test	dl,3
+		shr		dh,1
 		jz		.nextPort
-
-.testFirstBaud:
-		call	.identifyDeviceInDL
+		cmp		dh,6			; skip from 6 to 4, to move from the top of the 9600 baud range 
+		jnz		.testBaud		; to the bottom of the 115200 baud range
+		mov		dh,4
+
+.testBaud:
+		call	.identifyDeviceInDX
 		jc		.nextBaud
 
Index: trunk/XTIDE_Universal_BIOS/Src/Device/Serial/SerialDPT.asm
===================================================================
--- trunk/XTIDE_Universal_BIOS/Src/Device/Serial/SerialDPT.asm	(revision 232)
+++ trunk/XTIDE_Universal_BIOS/Src/Device/Serial/SerialDPT.asm	(revision 233)
@@ -17,6 +17,6 @@
 SerialDPT_Finalize:
 		or		byte [di+DPT.bFlagsHigh], FLGH_DPT_SERIAL_DEVICE
-		mov		al, [RAMVARS.xlateVars+XLATEVARS.bLastSerial]
-		mov		byte [di+DPT_SERIAL.bSerialPortAndBaud], al
+		mov		ax, [es:si+ATA6.wVendor]
+		mov		word [di+DPT_SERIAL.wSerialPortAndBaud], ax
 		ret
 
Index: trunk/XTIDE_Universal_BIOS/Src/Initialization/DetectDrives.asm
===================================================================
--- trunk/XTIDE_Universal_BIOS/Src/Initialization/DetectDrives.asm	(revision 232)
+++ trunk/XTIDE_Universal_BIOS/Src/Initialization/DetectDrives.asm	(revision 233)
@@ -22,37 +22,41 @@
 
 .DriveDetectLoop:							; Loop through IDEVARS
-	mov		si, g_szDetect					; Setup standard print string
+	push	cx
+
+	mov		cx, g_szDetectMaster
+	mov		bh, MASK_DRVNHEAD_SET								; Select Master drive
+	call	StartDetectionWithDriveSelectByteInBHandStringInAX	; Detect and create DPT + BOOTNFO
+
+	mov		cx, g_szDetectSlave
+	mov		bh, MASK_DRVNHEAD_SET | FLG_DRVNHEAD_DRV  
+	call	StartDetectionWithDriveSelectByteInBHandStringInAX
+		
+	pop		cx
+
+	add		bp, BYTE IDEVARS_size			; Point to next IDEVARS
+
 %ifdef MODULE_SERIAL		
-	cmp		byte [cs:bp+IDEVARS.bDevice], DEVICE_SERIAL_PORT
-	jnz		.DriveNotSerial					; Special print string for serial drives
-	mov		si, g_szDetectCOM
-.DriveNotSerial:
+	jcxz	.done							; Set to zero on .ideVarsSerialAuto iteration (if any)
 %endif
-
-	call	.DetectDrives_WithIDEVARS		; Detect Master and Slave
-	add		bp, BYTE IDEVARS_size			; Point to next IDEVARS
+		
 	loop	.DriveDetectLoop
 
 %ifdef MODULE_SERIAL		
 ;
-; if serial drive detected, do not scan (avoids duplicate drives and isn't needed - we have a connection)
-; Note that XLATEVARS.bLastSerial is zero'd in RamVars_Initialize, called in Initialize_AutoDetectDrives;
-; bLastSerial it set in the detection code of SerialCommand.asm
+; if serial drive detected, do not scan (avoids duplicate drives and isn't needed - we already have a connection)
 ;
-	cmp		byte [RAMVARS.xlateVars+XLATEVARS.bLastSerial],cl 	; cx = zero after the loop above
-																; less instruction bytes than using immediate
-	jnz		.done												  
-		
+	call	FindDPT_ToDSDIforSerialDevice
+	jc		.done
+
+	mov		bp, ROMVARS.ideVarsSerialAuto	; Point to our special IDEVARS sructure, just for serial scans		
+				
 	mov		al,[cs:ROMVARS.wFlags]			; Configurator set to always scan?
 	or		al,[es:BDA.bKBFlgs1]			; Or, did the user hold down the ALT key?
 	and		al,8							; 8 = alt key depressed, same as FLG_ROMVARS_SERIAL_ALWAYSDETECT
-	jz		.done							
+	jnz		.DriveDetectLoop							
+%endif
 
-	mov		bp, ROMVARS.ideVarsSerialAuto	; Point to our special IDEVARS sructure, just for serial scans
-	mov		si, g_szDetectCOMAuto			; Special, special print string for serial drives during a scan
-;;; fall-through					
-%else
+.done:
 	ret
-%endif
 
 %if FLG_ROMVARS_SERIAL_SCANDETECT != 8
@@ -60,41 +64,10 @@
 %endif
 
-;--------------------------------------------------------------------
-; Detects IDE hard disks by using information from IDEVARS.
-;
-; DetectDrives_WithIDEVARS
-;	Parameters:
-;		CS:BP:		Ptr to IDEVARS
-;		DS:			RAMVARS segment
-;		ES:			Zero (BDA segment)
-;       SI:		    Ptr to template string
-;	Returns:
-;		Nothing
-;	Corrupts registers:
-;		AX, BX, DX, SI, DI
-;--------------------------------------------------------------------
-.DetectDrives_WithIDEVARS:
-	push	cx
-
-	push	si		
-	mov		ax, g_szMaster
-	mov		bh, MASK_DRVNHEAD_SET								; Select Master drive
-	call	StartDetectionWithDriveSelectByteInBHandStringInAX	; Detect and create DPT + BOOTNFO
-	pop		si
-
-	mov		ax, g_szSlave
-	mov		bh, MASK_DRVNHEAD_SET | FLG_DRVNHEAD_DRV
-	call	StartDetectionWithDriveSelectByteInBHandStringInAX
-	pop		cx
-		
-.done:	
-	ret
-
 		
 ;--------------------------------------------------------------------
 ; StartDetectionWithDriveSelectByteInBHandStringInAX
 ;	Parameters:
-;		AX:		Offset to "Master" or "Slave" string
 ;		BH:		Drive Select byte for Drive and Head Register
+;		CX:		Offset to "Master" or "Slave" string
 ;		CS:BP:	Ptr to IDEVARS for the drive
 ;		DS:		RAMVARS segment
Index: trunk/XTIDE_Universal_BIOS/Src/Initialization/DetectPrint.asm
===================================================================
--- trunk/XTIDE_Universal_BIOS/Src/Initialization/DetectPrint.asm	(revision 232)
+++ trunk/XTIDE_Universal_BIOS/Src/Initialization/DetectPrint.asm	(revision 233)
@@ -30,5 +30,5 @@
 ; DetectPrint_StartDetectWithMasterOrSlaveStringInAXandIdeVarsInCSBP
 ;	Parameters:
-;		CS:AX:	Ptr to "Master" or "Slave" string
+;		CS:CX:	Ptr to "Master" or "Slave" string
 ;		CS:BP:	Ptr to IDEVARS
 ;       SI:		Ptr to template string 
@@ -39,30 +39,63 @@
 ;--------------------------------------------------------------------
 DetectPrint_StartDetectWithMasterOrSlaveStringInAXandIdeVarsInCSBP:
-	push	bp
-	mov		di, [cs:bp+IDEVARS.wPort]
-%ifdef MODULE_SERIAL
-	mov		cx, [cs:bp+IDEVARS.wSerialPackedPrintBaud]
-%endif
+
+	mov		ax, [cs:bp+IDEVARS.wPort]    	; for IDE: AX=port address, DH=.bDevice
+	mov		dx, [cs:bp+IDEVARS.bDevice-1]   ; for Serial: AL=port address>>2, AH=baud rate
+											;			  DL=COM number character, DH=.bDevice
+
+	push	bp								; setup stack for call to 
+	mov		bp, sp							; BootMenuPrint_FormatCSSIfromParamsInSSBP
+
+	push 	cx								; Push "Master" or "Slave"
 		
-	mov		bp, sp
+	mov		cl, (g_szDetectPort-$$) & 0xff	; Setup print string for standard IDE
+											; Note that we modify only the low order bits of CX a lot here,
+											; saving code space rather than reloading CX completely.
+											; This optimization requires that all the g_szDetect* strings are
+											; on the same 256 byte page, which is checked in strings.asm.
 
-	push 	ax							; Push "Master" or "Slave"
+	cmp		dx, DEVICE_SERIAL_PORT << 8  	; Check if this is a serial device, 
+										 	; And also check if DL is zero, check with the jz below
+											; This optimization requires that DEVICE_SERIAL_PORT be 
+											; the highest value in the DEVICE_* series, ensuring that
+											; anything less in the high order bits is a different device.
+
+	jl		.pushAndPrint					; CX = string to print, AX = port address, DX won't be used
+
+	mov		cl, (g_szDetectCOM-$$) & 0xff	; Setup print string for COM ports
+	push	cx								; And push now.  We use the fact that format strings can contain
+											; themselves format strings.
+
+	push	dx								; Push COM number character
+				
+ 	mov		cl, (g_szDetectCOMAuto-$$) & 0xff	; Setup secondary print string for "Auto"
 		
-	push	di							; Push Port address or COM port number
+	jz		.pushAndPrint					; CX = string to print, AX and DX won't be used
+		
+	mov		cl, (g_szDetectCOMLarge-$$) & 0xff	; Setup secondary print string for "COMn/xx.yK"
 
-%ifdef MODULE_SERIAL
-;
-; Print baud rate from .wSerialPackedPrintBaud, in two parts - %u and then %c
-; 
-	mov		ax,cx						; Unpack baud rate number
-	and		ax,DEVICE_SERIAL_PRINTBAUD_NUMBERMASK
-	push	ax
+	mov		al,ah							; baud rate divisor to AL
+	cbw										; clear AH, AL will always be less than 128
+	xchg	si,ax							; move AX to SI for divide
+	mov		ax,1152							; baud rate to displa is 115200/divisor, the "00" is handled
+											; in the print strings
+	xor		dx,dx							; clear top 16-bits of dividend
+	div		si								; and divide...  Now AX = baud rate/100, DX = 0 (always a clean divide)
+		
+	mov		si,10							; Now separate the whole portion from the fractional for "K" display
+	div		si								; and divide...  Now AX = baud rate/1000, DX = low order digit
+		
+	cmp		ax,si							; <= 10: "2400", "9600", etc.; >10: "19.2K", "38.4K", etc.
+	jae		.pushAndPrint
 
-	mov		al,ch						; Unpack baud rate postfix ('0' or 'K')
-	eSHR_IM	al,2				        ; also effectively masks off the postfix
-	add		al,DEVICE_SERIAL_PRINTBAUD_POSTCHARADD
-	push	ax
-%endif
-						
+	mov		cl, (g_szDetectCOMSmall-$$) & 0xff	; Setup secondary print string for "COMn/XXy00"
+		
+.pushAndPrint:	
+	push	cx								; Push print string
+	push	ax								; Push high order digits, or port address, or N/A
+	push	dx								; Push low order digit, or N/A
+
+	mov		si, g_szDetectOuter				; Finally load SI with wrapper string "IDE %s at %s: "
+
 	jmp		short DetectPrint_BootMenuPrint_FormatCSSIfromParamsInSSBP_Relay	
 
@@ -92,2 +125,3 @@
 
 
+
Index: trunk/XTIDE_Universal_BIOS/Src/Main.asm
===================================================================
--- trunk/XTIDE_Universal_BIOS/Src/Main.asm	(revision 232)
+++ trunk/XTIDE_Universal_BIOS/Src/Main.asm	(revision 233)
@@ -112,6 +112,4 @@
 %ifdef MODULE_SERIAL
 	at	ROMVARS.ideVarsSerialAuto+IDEVARS.bDevice,		db	DEVICE_SERIAL_PORT
-	at	ROMVARS.ideVarsSerialAuto+IDEVARS.drvParamsMaster+DRVPARAMS.wFlags,	db	FLG_DRVPARAMS_BLOCKMODE
-	at	ROMVARS.ideVarsSerialAuto+IDEVARS.drvParamsSlave+DRVPARAMS.wFlags,	db	FLG_DRVPARAMS_BLOCKMODE
 %endif
 %else
@@ -145,6 +143,4 @@
 %ifdef MODULE_SERIAL
 	at	ROMVARS.ideVarsSerialAuto+IDEVARS.bDevice,		db	DEVICE_SERIAL_PORT
-	at	ROMVARS.ideVarsSerialAuto+IDEVARS.drvParamsMaster+DRVPARAMS.wFlags,	db	FLG_DRVPARAMS_BLOCKMODE
-	at	ROMVARS.ideVarsSerialAuto+IDEVARS.drvParamsSlave+DRVPARAMS.wFlags,	db	FLG_DRVPARAMS_BLOCKMODE
 %endif
 %endif
Index: trunk/XTIDE_Universal_BIOS/Src/Strings.asm
===================================================================
--- trunk/XTIDE_Universal_BIOS/Src/Strings.asm	(revision 232)
+++ trunk/XTIDE_Universal_BIOS/Src/Strings.asm	(revision 233)
@@ -12,9 +12,24 @@
 g_szRomAt:		db	"%s @ %x",LF,CR,NULL
 
-g_szMaster:				db	"IDE Master at ",NULL 
-g_szSlave:				db	"IDE Slave  at ",NULL
-g_szDetect:				db	"%s%x: ",NULL					   ; IDE Master at 1F0h:
-g_szDetectCOM:			db  "%sCOM%c/%u%c: ",NULL              ; IDE Master at COM1/115K:		
-g_szDetectCOMAuto:		db  "%sCOM Detect: ",NULL			   ; IDE Master at COM Detect:
+; The following strings are used by DetectPrint_StartDetectWithMasterOrSlaveStringInAXandIdeVarsInCSBP
+; To support an optimization in that code, these strings must start on the same 256 byte page, 
+; which is checked at assembly time below.
+;
+g_szDetectStart:		
+g_szDetectMaster:		db	"Master",NULL 
+g_szDetectSlave:		db	"Slave ",NULL
+g_szDetectOuter:		db	"IDE %s at %s: ",NULL
+g_szDetectPort:			db	"%x",NULL					   	; IDE Master at 1F0h:
+g_szDetectCOM:			db  "COM%c%s",NULL            
+g_szDetectCOMAuto:		db	" Auto",NULL
+g_szDetectCOMSmall:		db	"/%u%u00",NULL					; IDE Master at COM1/9600:
+g_szDetectEnd:
+g_szDetectCOMLarge:		db	"/%u.%uK",NULL					; IDE Master at COM1/19.2K:
+		
+%ifndef CHECK_FOR_UNUSED_ENTRYPOINTS				
+%if ((g_szDetectEnd-$$) & 0xff00) <> ((g_szDetectStart-$$) & 0xff00)
+%error "g_szDetect* strings must be on the same 256 byte page, required by DetectPrint_StartDetectWithMasterOrSlaveStringInAXandIdeVarsInCSBP.  Please move this block up or down within strings.asm"
+%endif
+%endif				
 				
 ; Boot loader strings
@@ -137,10 +152,10 @@
 ;$translate{200}      = 18;    # DOUBLE_BOTTOM_LEFT_CORNER
 ;$translate{181}      = 19;    # DOUBLE_LEFT_HORIZONTAL_TO_SINGLE_VERTICAL
+;$translate{ord('0')} = 20;    # DOUBLE_LEFT_HORIZONTAL_TO_SINGLE_VERTICAL		
 ;
 ; Formats begin immediately after the last Translated character (they are in the same table)
 ;
-;$format_begin = 20;
+;$format_begin = 21;
 ;
-;$format{"s"}   = 20;        # n/a
 ;$format{"c"}   = 21;        # n/a
 ;$format{"2-I"} = 22;        # must be even
@@ -152,4 +167,5 @@
 ;$format{"2-u"} = 28;        # must be even
 ;$format{"A"}   = 29;        # n/a
+;$format{"s"}   = 30;        # n/a		
 ;
 ; NOTE: The last $format cannot exceed 31 (stored in a 5-bit quantity).
Index: trunk/XTIDE_Universal_BIOS/Src/StringsCompressed.asm
===================================================================
--- trunk/XTIDE_Universal_BIOS/Src/StringsCompressed.asm	(revision 232)
+++ trunk/XTIDE_Universal_BIOS/Src/StringsCompressed.asm	(revision 233)
@@ -20,32 +20,56 @@
 g_szRomAt:		; db	"%s @ %x",LF,CR,NULL
           		; db	 25h,  73h,  20h,  40h,  20h,  25h,  78h,  0ah,  0dh,  00h    ; uncompressed
-          		  db	 34h,  20h, 0c6h,  39h,  1bh                                  ; compressed
-
-
-g_szMaster:				; db	"IDE Master at ",NULL 
-           				; db	 49h,  44h,  45h,  20h,  4dh,  61h,  73h,  74h,  65h,  72h,  20h,  61h,  74h,  20h,  00h    ; uncompressed
-           				  db	 4fh,  4ah, 0cbh,  53h,  67h,  79h,  7ah,  6bh, 0f8h,  67h,  7ah,  00h                      ; compressed
-
-g_szSlave:				; db	"IDE Slave  at ",NULL
-          				; db	 49h,  44h,  45h,  20h,  53h,  6ch,  61h,  76h,  65h,  20h,  20h,  61h,  74h,  20h,  00h    ; uncompressed
-          				  db	 4fh,  4ah, 0cbh,  59h,  72h,  67h,  7ch, 0ebh,  20h,  67h,  7ah,  00h                      ; compressed
-
-g_szDetect:				; db	"%s%x: ",NULL					   ; IDE Master at 1F0h:
-           				; db	 25h,  73h,  25h,  78h,  3ah,  20h,  00h    ; uncompressed
-           				  db	 34h,  39h,  40h,  00h                      ; compressed
-
-g_szDetectCOM:			; db  "%sCOM%c/%u%c: ",NULL              ; IDE Master at COM1/115K:		
-              			; db   25h,  73h,  43h,  4fh,  4dh,  25h,  63h,  2fh,  25h,  75h,  25h,  63h,  3ah,  20h,  00h    ; uncompressed
-              			  db   34h,  49h,  55h,  53h,  35h,  2ah,  37h,  35h,  40h,  00h                                  ; compressed
-
-g_szDetectCOMAuto:		; db  "%sCOM Detect: ",NULL			   ; IDE Master at COM Detect:
-                  		; db   25h,  73h,  43h,  4fh,  4dh,  20h,  44h,  65h,  74h,  65h,  63h,  74h,  3ah,  20h,  00h    ; uncompressed
-                  		  db   34h,  49h,  55h, 0d3h,  4ah,  6bh,  7ah,  6bh,  69h,  7ah,  40h,  00h                      ; compressed
-
+          		  db	 3eh,  20h, 0c6h,  39h,  1bh                                  ; compressed
+
+
+; The following strings are used by DetectPrint_StartDetectWithMasterOrSlaveStringInAXandIdeVarsInCSBP
+; To support an optimization in that code, these strings must start on the same 256 byte page, 
+; which is checked at assembly time below.
+;
+g_szDetectStart:		
+g_szDetectMaster:		; db	"Master",NULL 
+                 		; db	 4dh,  61h,  73h,  74h,  65h,  72h,  00h    ; uncompressed
+                 		  db	 53h,  67h,  79h,  7ah,  6bh, 0b8h          ; compressed
+
+g_szDetectSlave:		; db	"Slave ",NULL
+                		; db	 53h,  6ch,  61h,  76h,  65h,  20h,  00h    ; uncompressed
+                		  db	 59h,  72h,  67h,  7ch,  6bh,  00h          ; compressed
+
+g_szDetectOuter:		; db	"IDE %s at %s: ",NULL
+                		; db	 49h,  44h,  45h,  20h,  25h,  73h,  20h,  61h,  74h,  20h,  25h,  73h,  3ah,  20h,  00h    ; uncompressed
+                		  db	 4fh,  4ah, 0cbh,  3eh,  20h,  67h, 0fah,  3eh,  40h,  00h                                  ; compressed
+
+g_szDetectPort:			; db	"%x",NULL					   	; IDE Master at 1F0h:
+               			; db	 25h,  78h,  00h    ; uncompressed
+               			  db	 19h                ; compressed
+
+g_szDetectCOM:			; db  "COM%c%s",NULL            
+              			; db   43h,  4fh,  4dh,  25h,  63h,  25h,  73h,  00h    ; uncompressed
+              			  db   49h,  55h,  53h,  35h,  1eh                      ; compressed
+
+g_szDetectCOMAuto:		; db	" Auto",NULL
+                  		; db	 20h,  41h,  75h,  74h,  6fh,  00h    ; uncompressed
+                  		  db	 20h,  47h,  7bh,  7ah, 0b5h          ; compressed
+
+g_szDetectCOMSmall:		; db	"/%u%u00",NULL					; IDE Master at COM1/9600:
+                   		; db	 2fh,  25h,  75h,  25h,  75h,  30h,  30h,  00h    ; uncompressed
+                   		  db	 2ah,  37h,  37h,  34h,  14h                      ; compressed
+
+g_szDetectEnd:
+g_szDetectCOMLarge:		; db	"/%u.%uK",NULL					; IDE Master at COM1/19.2K:
+                   		; db	 2fh,  25h,  75h,  2eh,  25h,  75h,  4bh,  00h    ; uncompressed
+                   		  db	 2ah,  37h,  29h,  37h,  91h                      ; compressed
+
+
+%ifndef CHECK_FOR_UNUSED_ENTRYPOINTS				
+%if ((g_szDetectEnd-$$) & 0xff00) <> ((g_szDetectStart-$$) & 0xff00)
+%error "g_szDetect* strings must be on the same 256 byte page, required by DetectPrint_StartDetectWithMasterOrSlaveStringInAXandIdeVarsInCSBP.  Please move this block up or down within strings.asm"
+%endif
+%endif				
 
 ; Boot loader strings
 g_szTryToBoot:			; db	"Booting from %s %x",ANGLE_QUOTE_RIGHT,"%x",LF,CR,NULL
               			; db	 42h,  6fh,  6fh,  74h,  69h,  6eh,  67h,  20h,  66h,  72h,  6fh,  6dh,  20h,  25h,  73h,  20h,  25h,  78h, 0afh,  25h,  78h,  0ah,  0dh,  00h    ; uncompressed
-              			  db	 48h,  75h,  75h,  7ah,  6fh,  74h, 0edh,  6ch,  78h,  75h, 0f3h,  34h,  20h,  39h,  24h,  39h,  1bh                                              ; compressed
+              			  db	 48h,  75h,  75h,  7ah,  6fh,  74h, 0edh,  6ch,  78h,  75h, 0f3h,  3eh,  20h,  39h,  24h,  39h,  1bh                                              ; compressed
 
 g_szBootSectorNotFound:	; db	"Boot sector "
@@ -77,5 +101,5 @@
 g_szHotkey:		; db	"%A%c%c%A%s%A ",NULL
            		; db	 25h,  41h,  25h,  63h,  25h,  63h,  25h,  41h,  25h,  73h,  25h,  41h,  20h,  00h    ; uncompressed
-           		  db	 3dh,  35h,  35h,  3dh,  34h,  3dh,  00h                                              ; compressed
+           		  db	 3dh,  35h,  35h,  3dh,  3eh,  3dh,  00h                                              ; compressed
 
 
@@ -88,5 +112,5 @@
 g_szFDLetter:	; db	"%s %c",NULL
              	; db	 25h,  73h,  20h,  25h,  63h,  00h    ; uncompressed
-             	  db	 34h,  20h,  15h                      ; compressed
+             	  db	 3eh,  20h,  15h                      ; compressed
 
 g_szFloppyDrv:	; db	"Floppy Drive",NULL
@@ -106,9 +130,9 @@
 g_szSizeSingle:	; db	"%s%u.%u %ciB",NULL
                	; db	 25h,  73h,  25h,  75h,  2eh,  25h,  75h,  20h,  25h,  63h,  69h,  42h,  00h    ; uncompressed
-               	  db	 34h,  37h,  29h,  37h,  20h,  35h,  6fh,  88h                                  ; compressed
+               	  db	 3eh,  37h,  29h,  37h,  20h,  35h,  6fh,  88h                                  ; compressed
 
 g_szSizeDual:	; db	"%s%5-u.%u %ciB /%5-u.%u %ciB",LF,CR,NULL
              	; db	 25h,  73h,  25h,  35h,  2dh,  75h,  2eh,  25h,  75h,  20h,  25h,  63h,  69h,  42h,  20h,  2fh,  25h,  35h,  2dh,  75h,  2eh,  25h,  75h,  20h,  25h,  63h,  69h,  42h,  0ah,  0dh,  00h    ; uncompressed
-             	  db	 34h,  38h,  29h,  37h,  20h,  35h,  6fh, 0c8h,  2ah,  38h,  29h,  37h,  20h,  35h,  6fh,  48h,  1bh                                                                                        ; compressed
+             	  db	 3eh,  38h,  29h,  37h,  20h,  35h,  6fh, 0c8h,  2ah,  38h,  29h,  37h,  20h,  35h,  6fh,  48h,  1bh                                                                                        ; compressed
 
 g_szCfgHeader:	; db	"Addr.",SINGLE_VERTICAL,"Block",SINGLE_VERTICAL,"Bus",  SINGLE_VERTICAL,"IRQ",  SINGLE_VERTICAL,"Reset",LF,CR,NULL
@@ -118,5 +142,5 @@
 g_szCfgFormat:	; db	"%s"   ,SINGLE_VERTICAL,"%5-u", SINGLE_VERTICAL,"%s",SINGLE_VERTICAL," %2-I",SINGLE_VERTICAL,"%5-x",  NULL
               	; db	 25h,  73h, 0b3h,  25h,  35h,  2dh,  75h, 0b3h,  25h,  73h, 0b3h,  20h,  25h,  32h,  2dh,  49h, 0b3h,  25h,  35h,  2dh,  78h,  00h    ; uncompressed
-              	  db	 34h,  23h,  38h,  23h,  34h,  23h,  20h,  36h,  23h,  1ah                                                                            ; compressed
+              	  db	 3eh,  23h,  38h,  23h,  3eh,  23h,  20h,  36h,  23h,  1ah                                                                            ; compressed
 
 
@@ -159,13 +183,13 @@
 g_szFddUnknown:	; db	"%sUnknown",NULL
                	; db	 25h,  73h,  55h,  6eh,  6bh,  6eh,  6fh,  77h,  6eh,  00h    ; uncompressed
-               	  db	 34h,  5bh,  74h,  71h,  74h,  75h,  7dh, 0b4h                ; compressed
+               	  db	 3eh,  5bh,  74h,  71h,  74h,  75h,  7dh, 0b4h                ; compressed
 
 g_szFddSizeOr:	; db	"%s5",ONE_QUARTER,QUOTATION_MARK," or 3",ONE_HALF,QUOTATION_MARK," DD",NULL
               	; db	 25h,  73h,  35h, 0ach,  22h,  20h,  6fh,  72h,  20h,  33h, 0abh,  22h,  20h,  44h,  44h,  00h    ; uncompressed
-              	  db	 34h,  2fh,  21h,  26h,  20h,  75h, 0f8h,  2dh,  22h,  26h,  20h,  4ah,  8ah                      ; compressed
+              	  db	 3eh,  2fh,  21h,  26h,  20h,  75h, 0f8h,  2dh,  22h,  26h,  20h,  4ah,  8ah                      ; compressed
 
 g_szFddSize:	; db	"%s%s",QUOTATION_MARK,", %u kiB",NULL	; 3½", 1440 kiB
             	; db	 25h,  73h,  25h,  73h,  22h,  2ch,  20h,  25h,  75h,  20h,  6bh,  69h,  42h,  00h    ; uncompressed
-            	  db	 34h,  34h,  26h,  27h,  20h,  37h,  20h,  71h,  6fh,  88h                            ; compressed
+            	  db	 3eh,  3eh,  26h,  27h,  20h,  37h,  20h,  71h,  6fh,  88h                            ; compressed
 
 
@@ -265,10 +289,10 @@
 ;$translate{200}      = 18;    # DOUBLE_BOTTOM_LEFT_CORNER    [StringsCompress Processed]
 ;$translate{181}      = 19;    # DOUBLE_LEFT_HORIZONTAL_TO_SINGLE_VERTICAL    [StringsCompress Processed]
+;$translate{ord('0')} = 20;    # DOUBLE_LEFT_HORIZONTAL_TO_SINGLE_VERTICAL		    [StringsCompress Processed]
 ;
 ; Formats begin immediately after the last Translated character (they are in the same table)
 ;
-;$format_begin = 20;    [StringsCompress Processed]
-;
-;$format{"s"}   = 20;        # n/a    [StringsCompress Processed]
+;$format_begin = 21;    [StringsCompress Processed]
+;
 ;$format{"c"}   = 21;        # n/a    [StringsCompress Processed]
 ;$format{"2-I"} = 22;        # must be even    [StringsCompress Processed]
@@ -280,4 +304,5 @@
 ;$format{"2-u"} = 28;        # must be even    [StringsCompress Processed]
 ;$format{"A"}   = 29;        # n/a    [StringsCompress Processed]
+;$format{"s"}   = 30;        # n/a		    [StringsCompress Processed]
 ;
 ; NOTE: The last $format cannot exceed 31 (stored in a 5-bit quantity).
@@ -299,5 +324,5 @@
 StringsCompressed_NormalBase     equ   58
 
-StringsCompressed_FormatsBegin   equ   20
+StringsCompressed_FormatsBegin   equ   21
 
 StringsCompressed_TranslatesAndFormats: 
@@ -322,5 +347,5 @@
         db     200  ; 18
         db     181  ; 19
-        db     (DisplayFormatCompressed_BaseFormatOffset - DisplayFormatCompressed_Format_s)    ; 20
+        db     48  ; 20
         db     (DisplayFormatCompressed_BaseFormatOffset - DisplayFormatCompressed_Format_c)    ; 21
         db     (DisplayFormatCompressed_BaseFormatOffset - DisplayFormatCompressed_Format_2_I)    ; 22
@@ -332,35 +357,36 @@
         db     (DisplayFormatCompressed_BaseFormatOffset - DisplayFormatCompressed_Format_2_u)    ; 28
         db     (DisplayFormatCompressed_BaseFormatOffset - DisplayFormatCompressed_Format_A)    ; 29
+        db     (DisplayFormatCompressed_BaseFormatOffset - DisplayFormatCompressed_Format_s)    ; 30
 
 %ifndef CHECK_FOR_UNUSED_ENTRYPOINTS
+%if DisplayFormatCompressed_BaseFormatOffset < DisplayFormatCompressed_Format_c || DisplayFormatCompressed_BaseFormatOffset - DisplayFormatCompressed_Format_c > 255
+%error "DisplayFormatCompressed_Format_c is out of range of DisplayFormatCompressed_BaseFormatOffset"
+%endif
+%if DisplayFormatCompressed_BaseFormatOffset < DisplayFormatCompressed_Format_2_I || DisplayFormatCompressed_BaseFormatOffset - DisplayFormatCompressed_Format_2_I > 255
+%error "DisplayFormatCompressed_Format_2_I is out of range of DisplayFormatCompressed_BaseFormatOffset"
+%endif
+%if DisplayFormatCompressed_BaseFormatOffset < DisplayFormatCompressed_Format_u || DisplayFormatCompressed_BaseFormatOffset - DisplayFormatCompressed_Format_u > 255
+%error "DisplayFormatCompressed_Format_u is out of range of DisplayFormatCompressed_BaseFormatOffset"
+%endif
+%if DisplayFormatCompressed_BaseFormatOffset < DisplayFormatCompressed_Format_5_u || DisplayFormatCompressed_BaseFormatOffset - DisplayFormatCompressed_Format_5_u > 255
+%error "DisplayFormatCompressed_Format_5_u is out of range of DisplayFormatCompressed_BaseFormatOffset"
+%endif
+%if DisplayFormatCompressed_BaseFormatOffset < DisplayFormatCompressed_Format_x || DisplayFormatCompressed_BaseFormatOffset - DisplayFormatCompressed_Format_x > 255
+%error "DisplayFormatCompressed_Format_x is out of range of DisplayFormatCompressed_BaseFormatOffset"
+%endif
+%if DisplayFormatCompressed_BaseFormatOffset < DisplayFormatCompressed_Format_5_x || DisplayFormatCompressed_BaseFormatOffset - DisplayFormatCompressed_Format_5_x > 255
+%error "DisplayFormatCompressed_Format_5_x is out of range of DisplayFormatCompressed_BaseFormatOffset"
+%endif
+%if DisplayFormatCompressed_BaseFormatOffset < DisplayFormatCompressed_Format_nl || DisplayFormatCompressed_BaseFormatOffset - DisplayFormatCompressed_Format_nl > 255
+%error "DisplayFormatCompressed_Format_nl is out of range of DisplayFormatCompressed_BaseFormatOffset"
+%endif
+%if DisplayFormatCompressed_BaseFormatOffset < DisplayFormatCompressed_Format_2_u || DisplayFormatCompressed_BaseFormatOffset - DisplayFormatCompressed_Format_2_u > 255
+%error "DisplayFormatCompressed_Format_2_u is out of range of DisplayFormatCompressed_BaseFormatOffset"
+%endif
+%if DisplayFormatCompressed_BaseFormatOffset < DisplayFormatCompressed_Format_A || DisplayFormatCompressed_BaseFormatOffset - DisplayFormatCompressed_Format_A > 255
+%error "DisplayFormatCompressed_Format_A is out of range of DisplayFormatCompressed_BaseFormatOffset"
+%endif
 %if DisplayFormatCompressed_BaseFormatOffset < DisplayFormatCompressed_Format_s || DisplayFormatCompressed_BaseFormatOffset - DisplayFormatCompressed_Format_s > 255
 %error "DisplayFormatCompressed_Format_s is out of range of DisplayFormatCompressed_BaseFormatOffset"
-%endif
-%if DisplayFormatCompressed_BaseFormatOffset < DisplayFormatCompressed_Format_c || DisplayFormatCompressed_BaseFormatOffset - DisplayFormatCompressed_Format_c > 255
-%error "DisplayFormatCompressed_Format_c is out of range of DisplayFormatCompressed_BaseFormatOffset"
-%endif
-%if DisplayFormatCompressed_BaseFormatOffset < DisplayFormatCompressed_Format_2_I || DisplayFormatCompressed_BaseFormatOffset - DisplayFormatCompressed_Format_2_I > 255
-%error "DisplayFormatCompressed_Format_2_I is out of range of DisplayFormatCompressed_BaseFormatOffset"
-%endif
-%if DisplayFormatCompressed_BaseFormatOffset < DisplayFormatCompressed_Format_u || DisplayFormatCompressed_BaseFormatOffset - DisplayFormatCompressed_Format_u > 255
-%error "DisplayFormatCompressed_Format_u is out of range of DisplayFormatCompressed_BaseFormatOffset"
-%endif
-%if DisplayFormatCompressed_BaseFormatOffset < DisplayFormatCompressed_Format_5_u || DisplayFormatCompressed_BaseFormatOffset - DisplayFormatCompressed_Format_5_u > 255
-%error "DisplayFormatCompressed_Format_5_u is out of range of DisplayFormatCompressed_BaseFormatOffset"
-%endif
-%if DisplayFormatCompressed_BaseFormatOffset < DisplayFormatCompressed_Format_x || DisplayFormatCompressed_BaseFormatOffset - DisplayFormatCompressed_Format_x > 255
-%error "DisplayFormatCompressed_Format_x is out of range of DisplayFormatCompressed_BaseFormatOffset"
-%endif
-%if DisplayFormatCompressed_BaseFormatOffset < DisplayFormatCompressed_Format_5_x || DisplayFormatCompressed_BaseFormatOffset - DisplayFormatCompressed_Format_5_x > 255
-%error "DisplayFormatCompressed_Format_5_x is out of range of DisplayFormatCompressed_BaseFormatOffset"
-%endif
-%if DisplayFormatCompressed_BaseFormatOffset < DisplayFormatCompressed_Format_nl || DisplayFormatCompressed_BaseFormatOffset - DisplayFormatCompressed_Format_nl > 255
-%error "DisplayFormatCompressed_Format_nl is out of range of DisplayFormatCompressed_BaseFormatOffset"
-%endif
-%if DisplayFormatCompressed_BaseFormatOffset < DisplayFormatCompressed_Format_2_u || DisplayFormatCompressed_BaseFormatOffset - DisplayFormatCompressed_Format_2_u > 255
-%error "DisplayFormatCompressed_Format_2_u is out of range of DisplayFormatCompressed_BaseFormatOffset"
-%endif
-%if DisplayFormatCompressed_BaseFormatOffset < DisplayFormatCompressed_Format_A || DisplayFormatCompressed_BaseFormatOffset - DisplayFormatCompressed_Format_A > 255
-%error "DisplayFormatCompressed_Format_A is out of range of DisplayFormatCompressed_BaseFormatOffset"
 %endif
 %endif
@@ -374,14 +400,14 @@
 ;; 5-u:3
 ;; x:6
+;; s:15
 ;; 5-x:1
-;; s:15
 ;; nl:6
 ;; 2-I:1
-;; c:8
-;; u:6
+;; c:7
+;; u:9
 ;; total format: 10
 
 ;; alphabet usage stats
-;; 58,::4
+;; 58,::2
 ;; 59,;:
 ;; 60,<:
@@ -390,19 +416,19 @@
 ;; 63,?:
 ;; 64,@:1
-;; 65,A:3
+;; 65,A:4
 ;; 66,B:11
-;; 67,C:5
-;; 68,D:12
-;; 69,E:4
+;; 67,C:4
+;; 68,D:10
+;; 69,E:3
 ;; 70,F:3
 ;; 71,G:
 ;; 72,H:4
-;; 73,I:3
+;; 73,I:2
 ;; 74,J:
-;; 75,K:
+;; 75,K:1
 ;; 76,L:3
-;; 77,M:4
+;; 77,M:3
 ;; 78,N:
-;; 79,O:3
+;; 79,O:2
 ;; 80,P:1
 ;; 81,Q:1
@@ -422,9 +448,9 @@
 ;; 95,_:
 ;; 96,`:
-;; 97,a:7
+;; 97,a:6
 ;; 98,b:
-;; 99,c:5
+;; 99,c:4
 ;; 100,d:4
-;; 101,e:11
+;; 101,e:9
 ;; 102,f:2
 ;; 103,g:2
@@ -436,14 +462,14 @@
 ;; 109,m:1
 ;; 110,n:9
-;; 111,o:17
+;; 111,o:18
 ;; 112,p:3
 ;; 113,q:
 ;; 114,r:11
 ;; 115,s:6
-;; 116,t:13
-;; 117,u:2
+;; 116,t:11
+;; 117,u:3
 ;; 118,v:2
 ;; 119,w:1
 ;; 120,x:
 ;; 121,y:2
-;; alphabet used count: 39
+;; alphabet used count: 40
Index: trunk/XTIDE_Universal_BIOS/Src/VariablesAndDPTs/FindDPT.asm
===================================================================
--- trunk/XTIDE_Universal_BIOS/Src/VariablesAndDPTs/FindDPT.asm	(revision 232)
+++ trunk/XTIDE_Universal_BIOS/Src/VariablesAndDPTs/FindDPT.asm	(revision 233)
@@ -124,7 +124,8 @@
 
 ;--------------------------------------------------------------------
-; IterateToDptWithInterruptInServiceFlagSet
+; IterateToDptWithFlagsHighInBL
 ;	Parameters:
 ;		DS:DI:	Ptr to DPT to examine
+;       BL:		Bit(s) to test in DPT.bFlagsHigh 
 ;	Returns:
 ;		CF:		Set if wanted DPT found
@@ -134,7 +135,7 @@
 ;--------------------------------------------------------------------
 ALIGN JUMP_ALIGN
-IterateToDptWithInterruptInServiceFlagSet:
-	test	BYTE [di+DPT.bFlagsHigh], FLGH_DPT_INTERRUPT_IN_SERVICE		; Clears CF (but we need the clc
-																		; below anyway for callers above)
+IterateToDptWithFlagsHighInBL:		
+	test	BYTE [di+DPT.bFlagsHigh], bl		; Clears CF (but we need the clc
+												; below anyway for callers above)
 	jnz		SHORT ReturnRightDPT
 
@@ -144,5 +145,5 @@
 
 ;--------------------------------------------------------------------
-; FindDPT_ToDSDIforInterruptInService
+; FindDPT_ToDSDIforSerialDevice
 ;	Parameters:
 ;		DS:		RAMVARS segment
@@ -154,7 +155,24 @@
 ;		SI
 ;--------------------------------------------------------------------
-ALIGN JUMP_ALIGN
-FindDPT_ToDSDIforInterruptInService:
-	mov		si, IterateToDptWithInterruptInServiceFlagSet
+ALIGN JUMP_ALIGN		
+FindDPT_ToDSDIforSerialDevice:			
+	mov		bl, FLGH_DPT_SERIAL_DEVICE
+; fall-through
+				
+;--------------------------------------------------------------------
+; FindDPT_ToDSDIforFlagsHigh
+;	Parameters:
+;		DS:		RAMVARS segment
+;       BL:		Bit(s) to test in DPT.bFlagsHigh
+;	Returns:
+;		DS:DI:	Ptr to DPT
+;		CF:		Set if wanted DPT found
+;				Cleared if DPT not found
+;	Corrupts registers:
+;		SI
+;--------------------------------------------------------------------
+ALIGN JUMP_ALIGN
+FindDPT_ToDSDIforFlagsHighInBL:		
+	mov		si, IterateToDptWithFlagsHighInBL
 	; Fall to IterateAllDPTs
 
