Floppy Disk Controller: Difference between revisions

m
fixed a formatting issue
[unchecked revision][unchecked revision]
(Added a few more notes and comments)
m (fixed a formatting issue)
Line 115:
However, using IO Port reads to generate delays (or polling MSR) leads to poor performance in a multitasking environment, and
you may want to put the driver to sleep for the shortest possible period (microsleep), instead.
 
=== Reliability ===
In real hardware, floppy drives are extremely unreliable. On emulators, it doesn't matter -- but for code that is intended for
real hardware, make sure to retry every command at least twice more after any error.
 
== Registers ==
Line 121 ⟶ 125:
Note that code snippets and datasheets name these registers based on their trigrams (e.g. SRA, MSR, DIR, CCR, etc.).
Use standard "outb" and "inb" commands to access the registers.
 
== Reliability ==
In real hardware, floppy drives are extremely unreliable. On emulators, it doesn't matter -- but for code that is intended for
real hardware, make sure to retry every command at least twice more after any error.
 
The basic set of floppy registers can be found in the following enumeration:
Anonymous user