Index: trunk/XTIDE_Universal_BIOS/Src/Handlers/Int13h.asm
===================================================================
--- trunk/XTIDE_Universal_BIOS/Src/Handlers/Int13h.asm	(revision 88)
+++ trunk/XTIDE_Universal_BIOS/Src/Handlers/Int13h.asm	(revision 90)
@@ -1,8 +1,3 @@
-; File name		:	Int13h_Jump.asm
-; Project name	:	IDE BIOS
-; Created date	:	21.9.2007
-; Last update	:	14.1.2011
-; Author		:	Tomi Tilli,
-;				:	Krister Nordvall (optimizations)
+; Project name	:	XTIDE Universal BIOS
 ; Description	:	Int 13h BIOS functions (Floppy and Hard disk).
 
@@ -227,5 +222,5 @@
 	dw	AH3h_HandlerForWriteDiskSectors					; 03h, Write Disk Sectors (All)
 	dw	AH4h_HandlerForVerifyDiskSectors				; 04h, Verify Disk Sectors (All)
-	dw	AH5h_HandlerForFormatDiskTrack					; 05h, Format Disk Track (XT, AT, EISA)
+	dw	Int13h_UnsupportedFunction						; 05h, Format Disk Track (XT, AT, EISA)
 	dw	Int13h_UnsupportedFunction						; 06h, Format Disk Track with Bad Sectors (XT)
 	dw	Int13h_UnsupportedFunction						; 07h, Format Multiple Cylinders (XT)
@@ -242,5 +237,5 @@
 	dw	Int13h_UnsupportedFunction						; 12h, Controller RAM Diagnostic (XT)
 	dw	Int13h_UnsupportedFunction						; 13h, Drive Diagnostic (XT)
-	dw	AH14h_HandlerForControllerInternalDiagnostic	; 14h, Controller Internal Diagnostic (All)
+	dw	Int13h_UnsupportedFunction						; 14h, Controller Internal Diagnostic (All)
 	dw	AH15h_HandlerForReadDiskDriveSize				; 15h, Read Disk Drive Size (AT+)
 	dw	Int13h_UnsupportedFunction						; 16h, 
Index: trunk/XTIDE_Universal_BIOS/Src/Handlers/Int13h/AH14h_HDiag.asm
===================================================================
--- trunk/XTIDE_Universal_BIOS/Src/Handlers/Int13h/AH14h_HDiag.asm	(revision 88)
+++ 	(revision )
@@ -1,39 +1,0 @@
-; File name		:	AH14h_HDiag.asm
-; Project name	:	IDE BIOS
-; Created date	:	28.9.2007
-; Last update	:	14.1.2011
-; Author		:	Tomi Tilli,
-;				:	Krister Nordvall (optimizations)
-; Description	:	Int 13h function AH=14h, Controller Internal Diagnostic.
-
-; Section containing code
-SECTION .text
-
-;--------------------------------------------------------------------
-; Int 13h function AH=14h, Controller Internal Diagnostic.
-;
-; AH14h_HandlerForControllerInternalDiagnostic
-;	Parameters:
-;		AH:		Bios function 14h
-;		DL:		Drive number (8xh)
-;	Parameters loaded by Int13h_Jump:
-;		DS:		RAMVARS segment
-;	Returns:
-;		AH:		BIOS Error code
-;		AL:		0 (custom for this BIOS: .bReset byte from DPT)
-;		CF:		0 if succesfull, 1 if error
-;		IF:		1
-;	Corrupts registers:
-;		Flags
-;--------------------------------------------------------------------
-ALIGN JUMP_ALIGN
-AH14h_HandlerForControllerInternalDiagnostic:
-	call	FindDPT_ForDriveNumber		; DS:DI now points to DPT
-	mov		al, [di+DPT.bReset]			; Load reset byte to AL
-	test	al, al						; Any error?
-	mov		ah, RET_HD_RESETFAIL		; Assume there was an error
-	stc
-	jnz		SHORT .Return
-	xor		ah, ah						; Zero AH and CF since success
-.Return:
-	jmp		Int13h_PopDiDsAndReturn
Index: trunk/XTIDE_Universal_BIOS/Src/Handlers/Int13h/AH5h_HFormat.asm
===================================================================
--- trunk/XTIDE_Universal_BIOS/Src/Handlers/Int13h/AH5h_HFormat.asm	(revision 88)
+++ 	(revision )
@@ -1,44 +1,0 @@
-; File name		:	AH5h_HFormat.asm
-; Project name	:	IDE BIOS
-; Created date	:	2.11.2007
-; Last update	:	12.4.2010
-; Author		:	Tomi Tilli
-; Description	:	Int 13h function AH=5h, Format Disk Track.
-
-; Section containing code
-SECTION .text
-
-;--------------------------------------------------------------------
-; Int 13h function AH=5h, Format Disk Track.
-;
-; AH5h_HandlerForFormatDiskTrack
-;	Parameters:
-;		AH:		Bios function 5h
-;		CH:		Cylinder number, bits 7...0
-;		CL:		Bits 7...6: Cylinder number bits 9 and 8
-;				Bits 5...0:	Starting sector number (1...63)
-;		DH:		Starting head number (0...255)
-;		DL:		Drive number
-;		ES:BX:	Pointer to address table
-;	Parameters loaded by Int13h_Jump:
-;		DS:		RAMVARS segment
-;	Returns:
-;		AH:		Int 13h/40h floppy return status
-;		CF:		0 if successfull, 1 if error
-;		IF:		1
-;	Corrupts registers:
-;		Flags
-;--------------------------------------------------------------------
-ALIGN JUMP_ALIGN
-AH5h_HandlerForFormatDiskTrack:
-	push	dx
-	push	cx
-	push	bx
-	push	ax
-
-	; Format command is vendor specific on IDE drives.
-	; Let's do verify instead.
-	call	FindDPT_ForDriveNumber		; DS:DI now points to DPT
-	mov		al, [di+DPT.bPSect]			; Load Sectors per Track to AL
-	call	AH4h_VerifySectors
-	jmp		Int13h_PopXRegsAndReturn
Index: trunk/XTIDE_Universal_BIOS/Src/Handlers/Int18h.asm
===================================================================
--- trunk/XTIDE_Universal_BIOS/Src/Handlers/Int18h.asm	(revision 88)
+++ 	(revision )
@@ -1,23 +1,0 @@
-; Project name	:	XTIDE Universal BIOS
-; Description	:	Int 18h BIOS functions (ROM boot and Boot error).
-
-; Section containing code
-SECTION .text
-
-;--------------------------------------------------------------------
-; Int 18h software interrupt handler.
-; Enters boot menu again after displaying callback message.
-;
-; Int18h_BootError
-;	Parameters:
-;		Nothing
-;	Returns:
-;		Nothing (jumps to Int19hMenu_Display)
-;	Corrupts registers:
-;		Doesn't matter
-;--------------------------------------------------------------------
-ALIGN JUMP_ALIGN
-Int18h_BootError:
-	mov		si, g_sz18hCallback
-	call	PrintNullTerminatedStringFromCSSIandSetCF
-	jmp		Int19hMenu_Display		; Return to boot menu
Index: trunk/XTIDE_Universal_BIOS/Src/Handlers/Int19h.asm
===================================================================
--- trunk/XTIDE_Universal_BIOS/Src/Handlers/Int19h.asm	(revision 88)
+++ trunk/XTIDE_Universal_BIOS/Src/Handlers/Int19h.asm	(revision 90)
@@ -1,8 +1,3 @@
-; File name		:	Int19h.asm
-; Project name	:	IDE BIOS
-; Created date	:	3.8.2007
-; Last update	:	14.1.2011
-; Author		:	Tomi Tilli,
-;				:	Krister Nordvall (optimizations)
+; Project name	:	XTIDE Universal BIOS
 ; Description	:	Int 19h BIOS functions (Boot Strap Loader).
 
@@ -12,47 +7,4 @@
 B_READ_RETRY_TIMES	EQU	3	; Number of times to retry
 
-
-;--------------------------------------------------------------------
-; Int 19h software interrupt handler for late initialization.
-; Calls actual Int 19h after initialization is complete.
-;
-; Int19h_LateInitialization
-;	Parameters:
-;		Nothing
-;	Returns:
-;		Never returns
-;--------------------------------------------------------------------
-ALIGN JUMP_ALIGN
-Int19h_LateInitialization:
-	call	Initialize_ShouldSkip			; Skip initialization?
-	jc		SHORT .SkipInitialization
-	call	Initialize_AndDetectDrives
-	int		INTV_BOOTSTRAP					; Call actual boot loader
-.SkipInitialization:
-	call	RamVars_Initialize				; RAMVARS must be initialized even for simple boot loader
-	; Fall to Int19h_SimpleBootLoader
-
-;--------------------------------------------------------------------
-; Simple boot loader.
-; Boot sequence is fixed to 00h, 80h and INT 18h.
-;
-; Int19h_SimpleBootLoader
-;	Parameters:
-;		Nothing
-;	Returns:
-;		Never returns
-;--------------------------------------------------------------------
-ALIGN JUMP_ALIGN
-Int19h_SimpleBootLoader:
-	sti										; Enable interrupts
-	call	RamVars_GetSegmentToDS
-	xor		dx, dx
-	call	Int19h_TryToLoadBootSectorFromDL
-	jc		SHORT Int19h_JumpToBootSector
-	mov		dl, 80h
-	call	Int19h_TryToLoadBootSectorFromDL
-	jc		SHORT Int19h_JumpToBootSector
-	call	Int19h_BootFailure				; Should never return		
-	jmp		SHORT Int19h_SimpleBootLoader
 
 ;--------------------------------------------------------------------
Index: trunk/XTIDE_Universal_BIOS/Src/Handlers/Int19hLate.asm
===================================================================
--- trunk/XTIDE_Universal_BIOS/Src/Handlers/Int19hLate.asm	(revision 90)
+++ trunk/XTIDE_Universal_BIOS/Src/Handlers/Int19hLate.asm	(revision 90)
@@ -0,0 +1,39 @@
+; Project name	:	XTIDE Universal BIOS
+; Description	:	Late initialization for XT builds.
+
+; Section containing code
+SECTION .text
+
+;--------------------------------------------------------------------
+; Int19hLate_InitializeInt19h
+;	Parameters:
+;		ES:		BDA segment
+;	Returns:
+;		Nothing
+;	Corrupts registers:
+;		BX, SI
+;--------------------------------------------------------------------
+ALIGN JUMP_ALIGN
+Int19hLate_InitializeInt19h:
+	mov		bx, INTV_BOOTSTRAP
+	mov		si, HandlerForLateInitialization
+	jmp		Interrupts_InstallHandlerToVectorInBXFromCSSI
+
+
+;--------------------------------------------------------------------
+; HandlerForLateInitialization
+;	Parameters:
+;		Nothing
+;	Returns:
+;		Never returns
+;--------------------------------------------------------------------
+ALIGN JUMP_ALIGN
+HandlerForLateInitialization:
+	LOAD_BDA_SEGMENT_TO	es, ax
+	call	Initialize_ShouldSkip		; Skip initialization?
+	jnz		SHORT .SkipInitialization
+	call	Initialize_AndDetectDrives	; Installs boot menu loader
+	int		INTV_BOOTSTRAP
+.SkipInitialization:
+	call	RamVars_Initialize			; RAMVARS must be initialized even for simple boot loader
+	int		INTV_BOOTSTRAP				; Call default system boot loader
Index: trunk/XTIDE_Universal_BIOS/Src/Handlers/Int19hMenu.asm
===================================================================
--- trunk/XTIDE_Universal_BIOS/Src/Handlers/Int19hMenu.asm	(revision 88)
+++ trunk/XTIDE_Universal_BIOS/Src/Handlers/Int19hMenu.asm	(revision 90)
@@ -1,7 +1,3 @@
-; File name		:	Int19hMenu.asm
-; Project name	:	IDE BIOS
-; Created date	:	25.3.2010
-; Last update	:	12.4.2010
-; Author		:	Tomi Tilli
+; Project name	:	XTIDE Universal BIOS
 ; Description	:	Int 19h BIOS functions for Boot Menu.
 
@@ -24,5 +20,4 @@
 	LOAD_BDA_SEGMENT_TO	ds, ax
 	call	BootVars_StorePostStackPointer
-	call	BootVars_StoreSystemInt18hAndInstallOurs
 
 	; Install new INT 19h handler now that BOOTVARS has been initialized
@@ -111,6 +106,4 @@
 ALIGN JUMP_ALIGN
 .Int18hRomBoot:
-	call	BootVars_RestoreSystemInt18h
 	call	BootVars_SwitchBackToPostStack
-	call	Int19h_BootFailure			; Should never return
-	jmp		SHORT Int19hMenu_BootLoader	; Status unknown so reinitialize boot loader
+	jmp		Int19h_BootFailure			; Never returns
