Simple reading and writing on Floppy Disk
for(unsigned index = 0; index&lt;=8; index++)


I think that need to be 

for(unsigned index = 0; index&lt;8; index++)


Otherwise you are trying to read the 9th bit in a byte.