INT13h Dilemma !
Posted: Wed Jul 23, 2008 1:57 am
Here is something strange !
- I implemented a bootloader, which reads from disk using INT13 AH=08.
Code looks something like this:
STAGE2_SECTORS is a macro, defined at 25 (size in blocks of stage2) ... On Bochs this works fine, but when I boot my computer using a floppy, the function fails, setting CF;
This is strange, because, I've seen that other bootloaders read one sector at a time, using loops for reading consecutive sectors. Should I read sectors that way too ?
- I implemented a bootloader, which reads from disk using INT13 AH=08.
Code looks something like this:
Code: Select all
xorw %bx , %bx
movw $STAGE2_SEG , %ax
movw %ax , %es
movb $0x02 , %ah
movb $STAGE2_SECTORS, %al
movb $0 , %ch
movb $2 , %cl
movb $0 , %dh
int $0x13
This is strange, because, I've seen that other bootloaders read one sector at a time, using loops for reading consecutive sectors. Should I read sectors that way too ?