Requirements

Interrupts
The floppy controller raises IRQ 6 when it has finished executing a command. You will need to be able to detect this.

Port IO
Most people refer to this as out[b] and in[b], which are the assembly instructions for them. I have created a C wrapper for them with the following functions:

void WriteByteToPort(unsigned short Port, unsigned short Value);
unsigned short ReadByteFromPort(unsigned short Port);

Simply replace any references to these functions with your own Port I/O functions.

DMA (8-bit)
This is used only in the ReadWrite function. DMA copies the data from the floppy drive to memory (or vice versa) so the CPU can handle other tasks at the same time. You can use a floppy drive without using DMA, but DMA is simple to use and makes the floppy driver a lot more efficient. Floppy drives use DMA channel 2.