Problem with int 0x13 sector read
Posted: Sat May 02, 2009 10:18 am
Hello,
I'm making a multitasking OS in real mode, and trying to use the BIOS to read sectors from floppy but I have a problem with it.
I have three interrupt handlers, timer, keyboard and int 0x60. In them I instantly disable interrupts with the cli instruction, and in the end again enable them with sti instruction.
I have int 0x60 handler handling the system calls. Inside this handler I call the BIOS int 0x13 to read sectors from a floppy. It seems that BIOS at some point temporarily enables interrupts, and this causes one of my two other interrupt handlers to pop up messing everything up and crashing the system. Maybe because of those interrupt handlers are trying to do a task switch, but in reality the CPU is executing in the kernel.
So can you tell me what are my options? Can I keep using BIOS by somehow adjusting the interrupt priority levels, or do I have to program the floppy disk controller directly, ...?
I'm making a multitasking OS in real mode, and trying to use the BIOS to read sectors from floppy but I have a problem with it.
I have three interrupt handlers, timer, keyboard and int 0x60. In them I instantly disable interrupts with the cli instruction, and in the end again enable them with sti instruction.
I have int 0x60 handler handling the system calls. Inside this handler I call the BIOS int 0x13 to read sectors from a floppy. It seems that BIOS at some point temporarily enables interrupts, and this causes one of my two other interrupt handlers to pop up messing everything up and crashing the system. Maybe because of those interrupt handlers are trying to do a task switch, but in reality the CPU is executing in the kernel.
So can you tell me what are my options? Can I keep using BIOS by somehow adjusting the interrupt priority levels, or do I have to program the floppy disk controller directly, ...?