Index: trunk/XTIDE_Universal_BIOS/Src/Handlers/Int13h/AH24h_HSetBlocks.asm
===================================================================
--- trunk/XTIDE_Universal_BIOS/Src/Handlers/Int13h/AH24h_HSetBlocks.asm	(revision 157)
+++ trunk/XTIDE_Universal_BIOS/Src/Handlers/Int13h/AH24h_HSetBlocks.asm	(revision 158)
@@ -22,5 +22,5 @@
 ALIGN JUMP_ALIGN
 AH24h_HandlerForSetMultipleBlocks:
-	test	WORD [di+DPT.wFlags], FLG_DPT_BLOCK_MODE_SUPPORTED
+	test	BYTE [di+DPT.bFlagsHigh], FLGH_DPT_BLOCK_MODE_SUPPORTED
 	jnz		SHORT .TryToSetBlockMode
 	stc
Index: trunk/XTIDE_Universal_BIOS/Src/Handlers/Int13h/AH2h_HRead.asm
===================================================================
--- trunk/XTIDE_Universal_BIOS/Src/Handlers/Int13h/AH2h_HRead.asm	(revision 157)
+++ trunk/XTIDE_Universal_BIOS/Src/Handlers/Int13h/AH2h_HRead.asm	(revision 158)
@@ -28,7 +28,9 @@
 ALIGN JUMP_ALIGN
 AH2h_HandlerForReadDiskSectors:
-	call	AH2h_ExitInt13hIfSectorCountInIntpackIsZero
+	cmp		BYTE [bp+IDEPACK.intpack+INTPACK.al], 0
+	je		SHORT AH2h_ExitInt13hSinceSectorCountInIntpackIsZero
+
 	mov		ah, COMMAND_READ_SECTORS	; Load sector mode command
-	test	WORD [di+DPT.wFlags], FLG_DPT_BLOCK_MODE_SUPPORTED
+	test	BYTE [di+DPT.bFlagsHigh], FLGH_DPT_BLOCK_MODE_SUPPORTED
 	eCMOVNZ	ah, COMMAND_READ_MULTIPLE	; Load block mode command
 	mov		bx, TIMEOUT_AND_STATUS_TO_WAIT(TIMEOUT_DRQ, FLG_STATUS_DRQ)
@@ -44,20 +46,11 @@
 
 ;--------------------------------------------------------------------
-; AH2h_ExitInt13hIfSectorCountInIntpackIsZero
+; AH2h_ExitInt13hSinceSectorCountInIntpackIsZero
 ;	Parameters:
-;		SS:BP:	Ptr to IDEPACK
-;	Parameters on INTPACK:
-;		AL:		Number of sectors to transfer (1...255)
+;		Nothing
 ;	Returns:
-;		Nothing (does not return if error)
-;	Corrupts registers:
-;		Nothing
+;		Jumps to Int13h_ReturnFromHandlerAfterStoringErrorCodeFromAH
 ;--------------------------------------------------------------------
-ALIGN JUMP_ALIGN
-AH2h_ExitInt13hIfSectorCountInIntpackIsZero:
-	cmp		BYTE [bp+IDEPACK.intpack+INTPACK.al], 0
-	je		SHORT .InvalidSectorCount
-	ret
-.InvalidSectorCount:
+AH2h_ExitInt13hSinceSectorCountInIntpackIsZero:
 	mov		ah, RET_HD_INVALID
 	jmp		Int13h_ReturnFromHandlerAfterStoringErrorCodeFromAH
Index: trunk/XTIDE_Universal_BIOS/Src/Handlers/Int13h/AH3h_HWrite.asm
===================================================================
--- trunk/XTIDE_Universal_BIOS/Src/Handlers/Int13h/AH3h_HWrite.asm	(revision 157)
+++ trunk/XTIDE_Universal_BIOS/Src/Handlers/Int13h/AH3h_HWrite.asm	(revision 158)
@@ -27,7 +27,9 @@
 ALIGN JUMP_ALIGN
 AH3h_HandlerForWriteDiskSectors:
-	call	AH2h_ExitInt13hIfSectorCountInIntpackIsZero
+	cmp		BYTE [bp+IDEPACK.intpack+INTPACK.al], 0
+	je		SHORT AH2h_ExitInt13hSinceSectorCountInIntpackIsZero
+
 	mov		ah, COMMAND_WRITE_SECTORS	; Load sector mode command
-	test	WORD [di+DPT.wFlags], FLG_DPT_BLOCK_MODE_SUPPORTED
+	test	BYTE [di+DPT.bFlagsHigh], FLGH_DPT_BLOCK_MODE_SUPPORTED
 	eCMOVNZ	ah, COMMAND_WRITE_MULTIPLE	; Load block mode command
 	mov		bx, TIMEOUT_AND_STATUS_TO_WAIT(TIMEOUT_DRQ, FLG_STATUS_DRQ)
Index: trunk/XTIDE_Universal_BIOS/Src/Handlers/Int13h/AH4h_HVerify.asm
===================================================================
--- trunk/XTIDE_Universal_BIOS/Src/Handlers/Int13h/AH4h_HVerify.asm	(revision 157)
+++ trunk/XTIDE_Universal_BIOS/Src/Handlers/Int13h/AH4h_HVerify.asm	(revision 158)
@@ -26,5 +26,7 @@
 ALIGN JUMP_ALIGN
 AH4h_HandlerForVerifyDiskSectors:
-	call	AH2h_ExitInt13hIfSectorCountInIntpackIsZero
+	cmp		BYTE [bp+IDEPACK.intpack+INTPACK.al], 0
+	je		SHORT AH2h_ExitInt13hSinceSectorCountInIntpackIsZero
+
 	mov		ah, COMMAND_VERIFY_SECTORS
 	mov		bx, TIMEOUT_AND_STATUS_TO_WAIT(TIMEOUT_DRQ, FLG_STATUS_DRDY)
Index: trunk/XTIDE_Universal_BIOS/Src/Handlers/Int13h/AH9h_HInit.asm
===================================================================
--- trunk/XTIDE_Universal_BIOS/Src/Handlers/Int13h/AH9h_HInit.asm	(revision 157)
+++ trunk/XTIDE_Universal_BIOS/Src/Handlers/Int13h/AH9h_HInit.asm	(revision 158)
@@ -46,15 +46,15 @@
 
 	; Try to select drive and wait until ready
-	or		WORD [di+DPT.wFlags], MASK_DPT_RESET		; Everything uninitialized
+	or		BYTE [di+DPT.bFlagsHigh], MASKH_DPT_RESET		; Everything uninitialized
 	call	AccessDPT_GetDriveSelectByteToAL
 	mov		[bp+IDEPACK.bDrvAndHead], al
 	call	Device_SelectDrive
 	jc		SHORT .ReturnNotSuccessfull
-	and		WORD [di+DPT.wFlags], ~FLG_DPT_RESET_nDRDY	; Clear since success
+	and		BYTE [di+DPT.bFlagsHigh], ~FLGH_DPT_RESET_nDRDY	; Clear since success
 
 	; Initialize CHS parameters if LBA is not used
 	call	InitializeDeviceParameters
 	jc		SHORT .RecalibrateDrive
-	and		WORD [di+DPT.wFlags], ~FLG_DPT_RESET_nINITPRMS
+	and		BYTE [di+DPT.bFlagsHigh], ~FLGH_DPT_RESET_nINITPRMS
 
 	; Recalibrate drive by seeking to cylinder 0
@@ -62,5 +62,5 @@
 	call	AH11h_RecalibrateDrive
 	jc		SHORT .InitializeBlockMode
-	and		WORD [di+DPT.wFlags], ~FLG_DPT_RESET_nRECALIBRATE
+	and		BYTE [di+DPT.bFlagsHigh], ~FLGH_DPT_RESET_nRECALIBRATE
 
 	; Initialize block mode transfers
@@ -68,5 +68,5 @@
 	call	InitializeBlockMode
 	jc		SHORT .ReturnNotSuccessfull
-	and		WORD [di+DPT.wFlags], ~FLG_DPT_RESET_nSETBLOCK	; Keeps CF clear
+	and		BYTE [di+DPT.bFlagsHigh], ~FLGH_DPT_RESET_nSETBLOCK	; Keeps CF clear
 
 .ReturnNotSuccessfull:
@@ -90,5 +90,5 @@
 InitializeDeviceParameters:
 	; No need to initialize CHS parameters if LBA mode enabled
-	test	BYTE [di+DPT.wFlags], FLG_DRVNHEAD_LBA	; Clear CF
+	test	BYTE [di+DPT.bFlagsLow], FLG_DRVNHEAD_LBA	; Clear CF
 	jnz		SHORT ReturnSuccessSinceInitializationNotNeeded
 
@@ -115,5 +115,5 @@
 ALIGN JUMP_ALIGN
 InitializeBlockMode:
-	test	WORD [di+DPT.wFlags], FLG_DPT_BLOCK_MODE_SUPPORTED	; Clear CF
+	test	BYTE [di+DPT.bFlagsHigh], FLGH_DPT_BLOCK_MODE_SUPPORTED	; Clear CF
 	jz		SHORT ReturnSuccessSinceInitializationNotNeeded
 
Index: trunk/XTIDE_Universal_BIOS/Src/Handlers/Int13h/Address.asm
===================================================================
--- trunk/XTIDE_Universal_BIOS/Src/Handlers/Int13h/Address.asm	(revision 157)
+++ trunk/XTIDE_Universal_BIOS/Src/Handlers/Int13h/Address.asm	(revision 158)
@@ -89,6 +89,6 @@
 	; (LCylinder << n) + (LHead / PHeadCount)
 	mov		dx, cx					; Copy L-CHS Cylinder number to DX
-	mov		cl, [di+DPT.wFlags]		; Load shift count
-	and		cl, MASK_DPT_CHS_SHIFT_COUNT
+	mov		cl, [di+DPT.bFlagsLow]	; Load shift count
+	and		cl, MASKL_DPT_CHS_SHIFT_COUNT
 	shl		dx, cl					; DX = LCylinder << n
 	add		ax, dx					; AX = P-CHS Cylinder number
