Fail* directories reorganized, Code-cleanup (-> coding-style), Typos+comments fixed.
git-svn-id: https://www4.informatik.uni-erlangen.de/i4svn/danceos/trunk/devel/fail@1321 8c4709b5-6ec9-48aa-a5cd-a96041d1645a
This commit is contained in:
44
simulators/bochs/bios/notes
Normal file
44
simulators/bochs/bios/notes
Normal file
@ -0,0 +1,44 @@
|
||||
####################
|
||||
# Read Disk Sector #
|
||||
####################
|
||||
|
||||
System programming:
|
||||
-------------------
|
||||
|
||||
(Int 13h, ah=2)
|
||||
in 1f7 until BSY cleared
|
||||
out 1f2, AL # number of sectors
|
||||
out 1f3, cl (bits 0-5) # starting sector number
|
||||
out 1f4, ch # cylinder number bits 0..7, 0 based
|
||||
out 1f5, cl (bits 6,7) & dh (bits 6,7) # cyl, bits 8..9, 10..11
|
||||
out 1f6, dh (bits 0..3) --> bits 0..3 # head number
|
||||
dh (bits 4..5) --> ??? # head number
|
||||
dl (bit 0) --> bit 4 # drive number
|
||||
out 1f7, 0x20 # read sectors command normal
|
||||
|
||||
|
||||
|
||||
Drive response:
|
||||
---------------
|
||||
|
||||
* drive sets the busy bit in Status Reg to 1
|
||||
* if command parameters are wrong:
|
||||
> drive sets the aborted-command bit in the Error register and
|
||||
error bit in the Status register to 1.
|
||||
> Drive also sets the busy bit in the Status register to 0.
|
||||
> Drive then generates an interrupt to the system.
|
||||
* else:
|
||||
> drive executes an implied seek to desired track and
|
||||
reads sectors into sector buffer
|
||||
> when sector buffer is filled and the data is ready to be
|
||||
transferred, the drive sets the data-request bit to 1, sets
|
||||
the busy bit to 0, and generates an interrupt.
|
||||
> on a single-sector transfer, after the system has transferred
|
||||
the data, the drive sets the data-request bit and the busy bit to 0.
|
||||
> on a multiple-sector transfer, after the system has transferred
|
||||
the first sector of data, the drive sets the data-request bit to 0,
|
||||
and the busy bit to 1. When each subsequent sector is ready to be
|
||||
transferred, the drive sets the data-request bit to 1, the busy bit to 0,
|
||||
and generates an interrupt. When the system has tranferred the last sector,
|
||||
the drive sets the data-request bit and busy bit to 0.
|
||||
|
||||
Reference in New Issue
Block a user