I am currently working on a really simple file system for UNICORN OS, called UNES.
I got all my disk drivers working, so i can read and write through system calls.
So i wrote a formatter first of all. It sets up the FAT and the root folder, and of course sector 0: Disk Data.
This is the part containing the disk name and format mark.
So i tried making it write the disk name to 0x0020, and a loop code at 0x0000 (if the disk is booted from).
All this went well and reading and writing was successful.
Here comes the point where my problem started:
I wanted to make a format-mark, simply writing the fou letters "UNES" to 0x0010. This will work as an identification string of a UNES formatted disk.
BUT!
After making the formatter write "UNES" to 0x0010 of the disk, the int 0x13 have begun giving me an error 0xff (sense operation failed) every time i try to read from the disk.
I then erase sector 0 of the disc... and then i can read again with no errors!
So... what went wrong?
Why cant i use 0x0010 to write "UNES"? This seems very wierd, right?
Also... What is sense operation, and how can it fail?
EDIT:
I tried moving the "UNES"-string to 0x0030, and it works great. So from that i will now conclude that using 0x0010 for storing "UNES" on a disk, triggers error 0xff... Which is very confusing. :S
Int 0x13 error: 0xff - "sense operation failed"
Int 0x13 error: 0xff - "sense operation failed"
Daniel Broder Jensen
UNICORN OS
Re: Int 0x13 error: 0xff - "sense operation failed"
You say you erase sector 0... Are you aware that sector begins at 1? Also, what interrupts are you using?
Re: Int 0x13 error: 0xff - "sense operation failed"
I made my system call to convert from sectors starting at 0, to CHS-address. And that system call is using int 0x13, ah=0x02 and ah=0x03.
Daniel Broder Jensen
UNICORN OS