Index: trunk/XTIDE_Universal_BIOS/Inc/CustomDPT.inc
===================================================================
--- trunk/XTIDE_Universal_BIOS/Inc/CustomDPT.inc	(revision 150)
+++ trunk/XTIDE_Universal_BIOS/Inc/CustomDPT.inc	(revision 152)
@@ -43,5 +43,5 @@
 FLG_DPT_SERIAL_DEVICE			EQU	(1<<9)	; Serial Port Device
 FLG_DPT_BLOCK_MODE_SUPPORTED	EQU	(1<<10)	; Use block transfer commands
-
+FLG_DPT_INTERRUPT_IN_SERVICE	EQU	(1<<11)	; Set when waiting for IRQ
 FLG_DPT_RESET_nDRDY				EQU	(1<<12)	; Drive ready to accept commands
 FLG_DPT_RESET_nINITPRMS			EQU	(1<<13)	; Initialize Device Parameters successfull
Index: trunk/XTIDE_Universal_BIOS/Inc/IDE_8bit.inc
===================================================================
--- trunk/XTIDE_Universal_BIOS/Inc/IDE_8bit.inc	(revision 150)
+++ trunk/XTIDE_Universal_BIOS/Inc/IDE_8bit.inc	(revision 152)
@@ -6,10 +6,10 @@
 
 ;--------------------------------------------------------------------
-; Emulates INSW for XTIDE dual (8-bit) data port.
+; Emulates INSW for XTIDE.
 ;
-; eDUAL_BYTE_PORT_INSW
+; XTIDE_INSW
 ;	Parameters:
 ;		BX:		Bit mask for toggling XTIDE data low/high reg
-;		DX:		Port address (must be IDE Data Register)
+;		DX:		XTIDE Data Low Register address
 ;		ES:DI:	Ptr to destination buffer
 ;	Returns:
@@ -18,5 +18,5 @@
 ;		AL, FLAGS
 ;--------------------------------------------------------------------
-%macro eDUAL_BYTE_PORT_INSW 0
+%macro XTIDE_INSW 0
 %ifdef USE_186	; INS instruction available
 	insb						; Load low byte from port DX to [ES:DI]
@@ -36,10 +36,10 @@
 
 ;--------------------------------------------------------------------
-; Emulates OUTSW for XTIDE dual (8-bit) data port.
+; Emulates OUTSW for XTIDE.
 ;
-; eDUAL_BYTE_PORT_OUTSW
+; XTIDE_OUTSW
 ;	Parameters:
 ;		BX:		Bit mask for toggling XTIDE data low/high reg
-;		DX:		Port address (must be IDE Data Register)
+;		DX:		XTIDE Data Low Register address
 ;		DS:SI:	Ptr to source buffer
 ;	Returns:
@@ -48,10 +48,10 @@
 ;		AX, FLAGS
 ;--------------------------------------------------------------------
-%macro eDUAL_BYTE_PORT_OUTSW 0
+%macro XTIDE_OUTSW 0
 %ifdef USE_186	; OUTS instruction available
 	lodsb						; Load low byte from [DS:SI] to AL
 	xor		dx, bx				; IDE Data Reg to XTIDE Data High Reg
 	outsb						; Output high byte from [DS:SI]
-	xor		dx, bx				; IDE Data Reg to XTIDE Data Low Reg
+	xor		dx, bx				; XTIDE Data High Reg to Data Low Reg
 	out		dx, al				; Output low byte from AL
 %else	; If 8088/8086
@@ -60,5 +60,36 @@
 	xchg	al, ah				; => AL=high byte, AH=low byte
 	out		dx, al				; Output high byte
-	xor		dx, bx				; XTIDE Data High Reg to IDE Data Reg
+	xor		dx, bx				; XTIDE Data High Reg to Data Low Reg
+	mov		al, ah				; Copy low byte to AL
+	out		dx, al				; Output low byte
+%endif
+%endmacro
+
+
+;--------------------------------------------------------------------
+; Emulates OUTSW for modified XTIDE.
+;
+; XTIDE_MOD_OUTSW
+;	Parameters:
+;		DX:		XTIDE Data Low Register address
+;		DS:SI:	Ptr to source buffer
+;	Returns:
+;		SI:		Incremented/decremented for next word
+;	Corrupts registers:
+;		AX, FLAGS
+;--------------------------------------------------------------------
+%macro XTIDE_MOD_OUTSW 0
+%ifdef USE_186	; OUTS instruction available
+	lodsb						; Load low byte from [DS:SI] to AL
+	inc		dx					; IDE Data Reg to XTIDE MOD Data High Reg
+	outsb						; Output high byte from [DS:SI]
+	dec		dx					; XTIDE Data High Reg to Data Low Reg
+	out		dx, al				; Output low byte from AL
+%else	; If 8088/8086
+	lodsw						; Load word from [DS:SI]
+	inc		dx					; IDE Data Reg to XTIDE MOD Data High Reg
+	xchg	al, ah				; => AL=high byte, AH=low byte
+	out		dx, al				; Output high byte
+	dec		dx					; XTIDE Data High Reg to Data Low Reg
 	mov		al, ah				; Copy low byte to AL
 	out		dx, al				; Output low byte
Index: trunk/XTIDE_Universal_BIOS/Inc/IntController.inc
===================================================================
--- trunk/XTIDE_Universal_BIOS/Inc/IntController.inc	(revision 152)
+++ trunk/XTIDE_Universal_BIOS/Inc/IntController.inc	(revision 152)
@@ -0,0 +1,52 @@
+; Project name	:	XTIDE Universal BIOS
+; Description	:	Equates for 8259 Interrupt Controllers.
+%ifndef INT_CONTROLLER_INC
+%define INT_CONTROLLER_INC
+
+; 8259 Master and Slave Interrupt Controller Ports
+MASTER_8259_IRR_AND_ISR_in	EQU		20h		; Interrupt Request Register / Interrupt In-Service Register
+MASTER_8259_COMMAND_out		EQU		20h		; Command output
+MASTER_8259_IMR				EQU		21h		; Interrupt Mask Register
+MASTER_8259_INIT_out		EQU		21h		; Initialization Command Parameters
+SLAVE_8259_IRR_AND_ISR_in	EQU		0A0h	; Interrupt Request Register / Interrupt In-Service Register
+SLAVE_8259_COMMAND_out		EQU		0A0h	; Command output
+SLAVE_8259_IMR				EQU		0A1h	; Interrupt Mask Register
+SLAVE_8259_INIT_out			EQU		0A1h	; Initialization Command Parameters
+
+; 8259 Interrupt Controller Commands
+COMMAND_CLEAR_ROTATE_IN_AUTOMATIC_EOI_MODE	EQU		00h
+COMMAND_READ_INTERRUPT_REQUEST_REGISTER		EQU		0Ah
+COMMAND_READ_INTERRUPT_INSERVICE_REGISTER	EQU		0Bh
+COMMAND_END_OF_INTERRUPT					EQU		20h
+COMMAND_NO_OPERATION						EQU		40h
+COMMAND_CLEAR_SPECIAL_MASK_MODE				EQU		48h
+COMMAND_SPECIFIC_EOI_FOR_IR0				EQU		60h
+COMMAND_SPECIFIC_EOI_FOR_IR1				EQU		61h
+COMMAND_SPECIFIC_EOI_FOR_IR2				EQU		62h
+COMMAND_SPECIFIC_EOI_FOR_IR3				EQU		63h
+COMMAND_SPECIFIC_EOI_FOR_IR4				EQU		64h
+COMMAND_SPECIFIC_EOI_FOR_IR5				EQU		65h
+COMMAND_SPECIFIC_EOI_FOR_IR6				EQU		66h
+COMMAND_SPECIFIC_EOI_FOR_IR7				EQU		67h
+COMMAND_SET_SPECIAL_MASK_MODE				EQU		68h
+COMMAND_SET_ROTATE_IN_AUTOMATIC_EOI_MODE	EQU		80h
+COMMAND_ROTATE_ON_NONSPECIFIC_EOI			EQU		0A0h
+COMMAND_IR0_LOWEST_PRIORITY					EQU		0C0h
+COMMAND_IR1_LOWEST_PRIORITY					EQU		0C1h
+COMMAND_IR2_LOWEST_PRIORITY					EQU		0C2h
+COMMAND_IR3_LOWEST_PRIORITY					EQU		0C3h
+COMMAND_IR4_LOWEST_PRIORITY					EQU		0C4h
+COMMAND_IR5_LOWEST_PRIORITY					EQU		0C5h
+COMMAND_IR6_LOWEST_PRIORITY					EQU		0C6h
+COMMAND_IR7_LOWEST_PRIORITY					EQU		0C7h
+COMMAND_EOI_AND_IR0_LOWEST_PRIORITY			EQU		0E0h
+COMMAND_EOI_AND_IR1_LOWEST_PRIORITY			EQU		0E1h
+COMMAND_EOI_AND_IR2_LOWEST_PRIORITY			EQU		0E2h
+COMMAND_EOI_AND_IR3_LOWEST_PRIORITY			EQU		0E3h
+COMMAND_EOI_AND_IR4_LOWEST_PRIORITY			EQU		0E4h
+COMMAND_EOI_AND_IR5_LOWEST_PRIORITY			EQU		0E5h
+COMMAND_EOI_AND_IR6_LOWEST_PRIORITY			EQU		0E6h
+COMMAND_EOI_AND_IR7_LOWEST_PRIORITY			EQU		0E7h
+
+
+%endif ; INT_CONTROLLER_INC
Index: trunk/XTIDE_Universal_BIOS/Inc/Interrupts.inc
===================================================================
--- trunk/XTIDE_Universal_BIOS/Inc/Interrupts.inc	(revision 150)
+++ 	(revision )
@@ -1,91 +1,0 @@
-; File name		:	Interrupts.inc
-; Project name	:	IDE BIOS
-; Created date	:	29.7.2007
-; Last update	:	6.11.2009
-; Author		:	Tomi Tilli
-; Description	:	Equates for Interrupts.
-%ifndef INTERRUPTS_INC
-%define INTERRUPTS_INC
-
-; 8259 Master and Slave Interrupt Controller Ports
-RPORT_8259MA_IRR_ISR		EQU		20h		; Master 8259 Read IRR / ISR
-WPORT_8259MA_COMMAND		EQU		20h		; Master 8259 Write command
-WPORT_8259MA_INIT			EQU		21h		; Master 8259 Write Init command
-PORT_8259MA_IMR				EQU		21h		; Master 8259 IMR
-RPORT_8259SL_IRR_ISR		EQU		0A0h	; Slave 8259 Read IRR / ISR
-WPORT_8259SL_COMMAND		EQU		0A0h	; Slave 8259 Write command
-WPORT_8259SL_INIT			EQU		0A1h	; Slave 8259 Write Init command
-PORT_8259SL_IMR				EQU		0A1h	; Slave 8259 IMR
-
-; Valid commands to port 20h (master, WPORT_8259MA_COMMAND) 
-; and A0h (slave, WPORT_8259SL_COMMAND)
-CMD_ROT_IN_AUTO_EOI_MODE_CLEAR	EQU		000h
-CMD_READ_IRR					EQU		00Ah
-CMD_READ_ISR					EQU		00Bh
-CMD_END_OF_INTERRUPT			EQU		020h
-CMD_NO_OPERATION				EQU		040h
-CMD_CLEAR_SPECIAL_MASK_MODE		EQU		048h
-CMD_SPEC_EOI_IRQ0				EQU		060h
-CMD_SPEC_EOI_IRQ1				EQU		061h
-CMD_SPEC_EOI_IRQ2				EQU		062h
-CMD_SPEC_EOI_IRQ3				EQU		063h
-CMD_SPEC_EOI_IRQ4				EQU		064h
-CMD_SPEC_EOI_IRQ5				EQU		065h
-CMD_SPEC_EOI_IRQ6				EQU		066h
-CMD_SPEC_EOI_IRQ7				EQU		067h
-CMD_SET_SPECIAL_MASK_MODE		EQU		068h
-CMD_ROT_IN_AUTO_EOI_MODE_SET	EQU		080h
-CMD_ROT_ON_NONSPEC_EOI			EQU		0A0h
-CMD_IRQ0_LOWST_PRIO				EQU		0C0h
-CMD_IRQ1_LOWST_PRIO				EQU		0C1h
-CMD_IRQ2_LOWST_PRIO				EQU		0C2h
-CMD_IRQ3_LOWST_PRIO				EQU		0C3h
-CMD_IRQ4_LOWST_PRIO				EQU		0C4h
-CMD_IRQ5_LOWST_PRIO				EQU		0C5h
-CMD_IRQ6_LOWST_PRIO				EQU		0C6h
-CMD_IRQ7_LOWST_PRIO				EQU		0C7h
-CMD_EOI_AND_IRQ0_LOWST_PRIO		EQU		0E0h
-CMD_EOI_AND_IRQ1_LOWST_PRIO		EQU		0E1h
-CMD_EOI_AND_IRQ2_LOWST_PRIO		EQU		0E2h
-CMD_EOI_AND_IRQ3_LOWST_PRIO		EQU		0E3h
-CMD_EOI_AND_IRQ4_LOWST_PRIO		EQU		0E4h
-CMD_EOI_AND_IRQ5_LOWST_PRIO		EQU		0E5h
-CMD_EOI_AND_IRQ6_LOWST_PRIO		EQU		0E6h
-CMD_EOI_AND_IRQ7_LOWST_PRIO		EQU		0E7h
-
-
-; Interrupt Vector Table
-INTV_IRQ0						EQU		08h		; System timer
-INTV_IRQ1						EQU		09h		; Keyboard
-INTV_IRQ2						EQU		0Ah
-INTV_IRQ3						EQU		0Bh
-INTV_IRQ4						EQU		0Ch
-INTV_IRQ5						EQU		0Dh
-INTV_IRQ6						EQU		0Eh
-INTV_IRQ7						EQU		0Fh
-INTV_EQUIPMENT_CONF				EQU		11h		; Equipment configuration
-INTV_MEMORY_SIZE				EQU		12h		; Base memory size
-INTV_DISK_FUNC					EQU		13h		; Disk functions
-INTV_SYSTEM_SERVICES			EQU		15h		; Different system functions
-INTV_KEYBOARD_FUNC				EQU		16h		; Keyboard functions
-INTV_BOOT_FAILURE				EQU		18h		; Process Boot Failure
-INTV_BOOTSTRAP					EQU		19h		; Boot Strap Loader
-INTV_TIME_OF_DAY				EQU		1Ah		; Time of day functions
-INTV_KEYB_BREAK					EQU		1Bh		; Keyboard break
-INTV_USER_TIMER_TICK			EQU		1Ch		; User timer tick
-INTV_DPT						EQU		1Eh		; Diskette Parameter Table
-INTV_FLOPPY_FUNC				EQU		40h		; Floppy functions
-INTV_HD0DPT						EQU		41h		; Ptr to HD0 Disk Parameter Table
-INTV_HD1DPT						EQU		46h		; Ptr to HD1 Disk Parameter Table
-INTV_USERS_ALARM				EQU		4Ah		; Users alarm
-INTV_IRQ8						EQU		70h
-INTV_IRQ9						EQU		71h
-INTV_IRQ10						EQU		72h
-INTV_IRQ11						EQU		73h
-INTV_IRQ12						EQU		74h
-INTV_IRQ13						EQU		75h
-INTV_IRQ14						EQU		76h
-INTV_IRQ15						EQU		77h
-
-
-%endif ; INTERRUPTS_INC
Index: trunk/XTIDE_Universal_BIOS/Inc/RamVars.inc
===================================================================
--- trunk/XTIDE_Universal_BIOS/Inc/RamVars.inc	(revision 150)
+++ trunk/XTIDE_Universal_BIOS/Inc/RamVars.inc	(revision 152)
@@ -22,5 +22,4 @@
 	.fpOldI13h			resb	4	; Far pointer to old INT 13h handler
 	.wTimeoutCounter	resb	2
-	.pInServiceDPT		resb	2	; Ptr to DPT for drive waiting for interrupt
 	.wSignature			resb	2	; Sign for finding stolen 1 kiB
 
