trying to get into pm and back
Posted: Sun Jul 15, 2007 12:38 pm
hi
i was trying to write some code in nasm that boots up and then enters protected mode, but it doesnt work...would someone please have a look at it..the first file (myboot.asm) is the 512 byte boot code read from the disk..the second file (mykernel1.asm) is the "kernel" and it needs to be placed on the floppy right after the 512 byte boot sector...the boot code reads the kernel from the floppy and jumps there..this works, i know for sure...you can try by commenting out all the switch-to-pm related stuff as described in the comments
the 512 byte boot sector asks the user to press a key and it will display the ascii and scan codes of the key hit; only when the user presses enter will the boot code load the kernel...i compile with:
nasm -f bin myboot.asm -o myboot.bin
nasm -f bin mykernel1.asm -o mykernel1.bin
dd if=mykernel1.bin of=myboot.bin count=1 seek=1
myboot.bin then is the floppy which i load in qemu
thanks for any help!
martin
i was trying to write some code in nasm that boots up and then enters protected mode, but it doesnt work...would someone please have a look at it..the first file (myboot.asm) is the 512 byte boot code read from the disk..the second file (mykernel1.asm) is the "kernel" and it needs to be placed on the floppy right after the 512 byte boot sector...the boot code reads the kernel from the floppy and jumps there..this works, i know for sure...you can try by commenting out all the switch-to-pm related stuff as described in the comments
the 512 byte boot sector asks the user to press a key and it will display the ascii and scan codes of the key hit; only when the user presses enter will the boot code load the kernel...i compile with:
nasm -f bin myboot.asm -o myboot.bin
nasm -f bin mykernel1.asm -o mykernel1.bin
dd if=mykernel1.bin of=myboot.bin count=1 seek=1
myboot.bin then is the floppy which i load in qemu
thanks for any help!
martin