Page 1 of 1

INT 13h problem can't progress

Posted: Sun Jan 06, 2008 7:27 pm
by jerryleecooper
I decided to use the bios int 13h call instead of my floppy driver to read my flkoppy (for now an image, will be a real floppy and a cd usb fob when things will work), it doesn't work :cry:
I get some strange values and I don't know if im calling the INT correctly, and now Im doubting I don't even know if my vm86 is correct anymore :cry: :cry: :cry:
Switching to and from some vga mode was correct, but I tried to read some sector with ((uchar*)&ax)[0] = 1; ((uchar*)&ax)[1] = 2; things like that.
What's the correct way in C to set some variables to call interrupt 13h?
Im confused with the register cx in particular, where I need to put the cylinder in the upper 8 bits and the 2 bits 0x300 from cylinder in 0xc0?

Re: INT 13h problem can't progress

Posted: Mon Jan 07, 2008 3:53 am
by jal
jerryleecooper wrote:Im confused with the register cx in particular, where I need to put the cylinder in the upper 8 bits and the 2 bits 0x300 from cylinder in 0xc0?
See here. I can't respond to any other questions, as I have no clue what you mean.


JAL

Posted: Mon Jan 07, 2008 11:37 am
by jerryleecooper
Thank you dor the link. My source for the INT 13h was wikipedia, not a good source for that.
So now I think I understand, my bootloader works because when theres an error in int 13 it tries again, which is not the case in my vm86 trickery.
I will try that.