Information Technology Reference
In-Depth Information
Command
b 7
b 6
b 5 b 4
b 3
b 2
1
b 0 Related registers
Calibrate drive 0 0 0 1 - -
- - 1F6h
Read sector 0 0 1 0 -
-
L R 1F2h-1F6h
Write sector 0 0 1 1 -
-
L R 1F2h-1F6h
Verify sector 0 1 0 0 -
-
- R 1F2h-1F6h
Format track 0 1 0 1 -
-
- - 1F3h-1F6h
Seek 0 1 1 1 -
-
- - 1F4h-1F6h
Diagnostics 1 0 0 1 -
-
- - 1F2h, 1F6h
Read sector buffer 1 1 1 0 0
1
0 0 1F6h
Write sector buffer 1 1 1 0 1
0
0 0 1F6h
Identify drive 1 1 1 0 1
1
- - 1F6h
where R is set to 0 if the command is automatically retried and L identifies the long-bit.
Digital output register (3F6h)
This is a write-only 8-bit register which allows drives to be reset and also IRQ14 to be
masked. Its definitions are
b 7
b 6
b 5
b 4
b 3 b 2
b 1
b 0
-
- - - - - SRST IEN
where
SRST- set to a 1 to reset all connected drives, else accept the command.
IEN - controls the interrupt enable. If set to 1 then IRQ14 is always masked, else inter-
rupted after each command.
Drive address register (3F7h)
The drive address register is a read-only register which contains information on which drive
and which head is currently active. Its definitions are:
b 7
b 6
b 5
b 4
b 3 b 2
b 1
b 0
DS0
-
WTGT HS3
HS2
HS1
HS0
DS1
where
WTGT - set to 1 if the write gate is closed, else the write gate is open.
HS3 - HS0 - 1's complement value of currently active head.
DS1 - DS0 - identifies the selected drive.
6.8.2 Command phase
The IRQ14 line is used by the disk to when it wants to interrupt the processor, either when it
wants to read or write data to/from memory. For example, using Microsoft C++ (for Borland
replace _outp() and _inp() with outport() and inport() ) to write to a disk at cylinder
150, head 0 and sector 7:
 
Search WWH ::




Custom Search