Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

So, does the boot sector load to 0000:7C00 or to 07C0:0000 or to 03A0:4200, or what? :)


http://wiki.osdev.org/MBR_%28x86%29

"This is usually 0x0000:0x7c00 (CS = 0, offset address 0x7c00). However, some BIOSes load to 0x7c0:0x0000 (CS = 0x07c0, offset address 0) -- which resolves to the same physical address, but can cause problems."


Yeah, I encountered the problem when writing a bootloader, that's why I brought it up! :)

Don't rely on the BIOS' values. You can for example use a far jump to reset CS:IP if you rely on them having specific values.

[Edit: Or, maybe better, just don't rely on them.]




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: