Index: trunk/XTIDE_Universal_BIOS/Inc/RomVars.inc
===================================================================
--- trunk/XTIDE_Universal_BIOS/Inc/RomVars.inc	(revision 175)
+++ trunk/XTIDE_Universal_BIOS/Inc/RomVars.inc	(revision 176)
@@ -28,5 +28,7 @@
 	.ideVars3		resb	IDEVARS_size
 
+%ifdef MODULE_SERIAL
 	.ideVarsSerialAuto	resb	IDEVARS_size
+%endif
 endstruc
 
@@ -34,8 +36,15 @@
 FLG_ROMVARS_FULLMODE	EQU	(1<<0)	; Full operating mode (steals base RAM, supports EBIOS etc.)
 FLG_ROMVARS_DRVXLAT		EQU	(1<<2)	; Enable drive number translation
+
 %ifdef MODULE_SERIAL
 FLG_ROMVARS_MODULE_SERIAL	EQU (1<<3)
 %else
 FLG_ROMVARS_MODULE_SERIAL   EQU 0
+%endif
+
+%ifdef MODULE_EBIOS
+FLG_ROMVARS_MODULE_EBIOS	EQU (1<<4)
+%else
+FLG_ROMVARS_MODULE_EBIOS    EQU 0
 %endif
 
Index: trunk/XTIDE_Universal_BIOS/Src/Device/Idepack.asm
===================================================================
--- trunk/XTIDE_Universal_BIOS/Src/Device/Idepack.asm	(revision 175)
+++ trunk/XTIDE_Universal_BIOS/Src/Device/Idepack.asm	(revision 176)
@@ -20,5 +20,9 @@
 	jmp		ax
 
-
+%ifdef MODULE_EBIOS
+;;; 
+;;; TODO: This code may be dead, even with EBIOS enabled?
+;;;
+		
 ;--------------------------------------------------------------------
 ; Idepack_ConvertDapToIdepackAndIssueCommandFromAH
@@ -58,5 +62,5 @@
 	les		si, [es:si+DAP.dwMemoryAddress]
 	jmp		SHORT GetDeviceControlByteToIdepackAndStartTransfer
-
+%endif
 
 ;--------------------------------------------------------------------
Index: trunk/XTIDE_Universal_BIOS/Src/Handlers/Int13h.asm
===================================================================
--- trunk/XTIDE_Universal_BIOS/Src/Handlers/Int13h.asm	(revision 175)
+++ trunk/XTIDE_Universal_BIOS/Src/Handlers/Int13h.asm	(revision 176)
@@ -36,7 +36,12 @@
 	shl		bx, 1
 	cmp		ah, 25h						; Possible EBIOS function?
+%ifdef MODULE_EBIOS
 	ja		SHORT .JumpToEbiosFunction
+%else
+	ja		SHORT Int13h_UnsupportedFunction
+%endif
 	jmp		[cs:bx+g_rgw13hFuncJump]	; Jump to BIOS function
 
+%ifdef MODULE_EBIOS
 	; Jump to correct EBIOS function
 ALIGN JUMP_ALIGN
@@ -51,5 +56,5 @@
 	jl		SHORT Int13h_UnsupportedFunction
 	jmp		[cs:bx+g_rgwEbiosFunctionJumpTable]
-
+%endif
 
 ;--------------------------------------------------------------------
@@ -241,4 +246,5 @@
 	dw	AH25h_HandlerForGetDriveInformation				; 25h, Get Drive Information (PS/1)
 
+%ifdef MODULE_EBIOS
 g_rgwEbiosFunctionJumpTable:
 	dw	AH41h_HandlerForCheckIfExtensionsPresent		; 41h, Check if Extensions Present (EBIOS)*
@@ -260,2 +266,3 @@
 ;  ** = Enhanced Disk Drive (EDD) Support
 ; *** = Drive Locking and Ejecting Support
+%endif
Index: trunk/XTIDE_Universal_BIOS/Src/Handlers/Int13h/Tools/CommandLookup.asm
===================================================================
--- trunk/XTIDE_Universal_BIOS/Src/Handlers/Int13h/Tools/CommandLookup.asm	(revision 175)
+++ trunk/XTIDE_Universal_BIOS/Src/Handlers/Int13h/Tools/CommandLookup.asm	(revision 176)
@@ -5,4 +5,5 @@
 SECTION .text
 
+%ifdef MODULE_EBIOS
 ;--------------------------------------------------------------------
 ; CommandLookup_GetEbiosIndexToBX
@@ -27,5 +28,6 @@
 	or		bx, dx					; Set block mode / single sector bit
 	ret
-
+%endif
+		
 ;--------------------------------------------------------------------
 ; CommandLookup_GetOldInt13hIndexToBX
Index: trunk/XTIDE_Universal_BIOS/Src/Main.asm
===================================================================
--- trunk/XTIDE_Universal_BIOS/Src/Main.asm	(revision 175)
+++ trunk/XTIDE_Universal_BIOS/Src/Main.asm	(revision 176)
@@ -19,5 +19,7 @@
 %include "IdeRegisters.inc"		; For ATA Registers, flags and commands
 %include "Int13h.inc"			; Equates for INT 13h functions
+%ifdef MODULE_EBIOS
 %include "EBIOS.inc"			; Equates for EBIOS functions
+%endif
 %include "CustomDPT.inc"		; For Disk Parameter Table
 %include "RomVars.inc"			; For ROMVARS and IDEVARS structs
@@ -54,5 +56,5 @@
 ;---------------------------;
 %ifdef USE_AT
-	at	ROMVARS.wFlags,			dw	FLG_ROMVARS_FULLMODE | FLG_ROMVARS_DRVXLAT | FLG_ROMVARS_MODULE_SERIAL
+	at	ROMVARS.wFlags,			dw	FLG_ROMVARS_FULLMODE | FLG_ROMVARS_DRVXLAT | FLG_ROMVARS_MODULE_SERIAL | FLG_ROMVARS_MODULE_EBIOS
 	at	ROMVARS.wDisplayMode,	dw	DEFAULT_TEXT_MODE
 	at	ROMVARS.wBootTimeout,	dw	30 * TICKS_PER_SECOND	; Boot Menu selection timeout
@@ -99,5 +101,5 @@
 ; XT and XT+ Build default settings ;
 ;-----------------------------------;
-	at	ROMVARS.wFlags,			dw	FLG_ROMVARS_DRVXLAT | FLG_ROMVARS_MODULE_SERIAL
+	at	ROMVARS.wFlags,			dw	FLG_ROMVARS_DRVXLAT | FLG_ROMVARS_MODULE_SERIAL | FLG_ROMVARS_MODULE_EBIOS		
 	at	ROMVARS.wDisplayMode,	dw	DEFAULT_TEXT_MODE
 	at	ROMVARS.wBootTimeout,	dw	30 * TICKS_PER_SECOND	; Boot Menu selection timeout
@@ -203,4 +205,5 @@
 %include "AH24h_HSetBlocks.asm"	; Required by Int13h_Jump.asm
 %include "AH25h_HDrvID.asm"		; Required by Int13h_Jump.asm
+%ifdef MODULE_EBIOS
 %include "AH41h_CheckIfExtensionsPresent.asm"
 %include "AH42h_ExtendedReadSectors.asm"
@@ -209,4 +212,5 @@
 %include "AH47h_ExtendedSeek.asm"
 %include "AH48h_GetExtendedDriveParameters.asm"
+%endif
 
 
Index: trunk/XTIDE_Universal_BIOS/makefile
===================================================================
--- trunk/XTIDE_Universal_BIOS/makefile	(revision 175)
+++ trunk/XTIDE_Universal_BIOS/makefile	(revision 176)
@@ -65,5 +65,5 @@
 # Assembler preprocessor defines.                               #
 #################################################################
-DEFINES = INCLUDE_MENU_LIBRARY EXCLUDE_FROM_XTIDE_UNIVERSAL_BIOS
+DEFINES = INCLUDE_MENU_LIBRARY EXCLUDE_FROM_XTIDE_UNIVERSAL_BIOS MODULE_EBIOS
 DEFINES_XT = ELIMINATE_CGA_SNOW
 DEFINES_XTPLUS = ELIMINATE_CGA_SNOW USE_186
