Re: Problems with a beginner bootloader.
Posted: Wed Nov 30, 2011 8:24 am
I didn't really read everything, I just happened to randomly notice another bug as I was scrolling down:
The BIOS Boot Specification requires that BIOS firmware use 0000:7C00, not 07C0:0000, so if you want to be compliant with the specification (and use a more efficient encoding---you are restricted in terms of code size, are you not?), you ought to go with that. However, considering that there are some BIOSes which only care about the physical address, the best way to go about avoiding bugs is something like the following:sanjeevmk wrote:Code: Select all
org 0x0 bits 16 ;set up segment registers base to 0x07C0 stage1: mov ax,0x07C0 mov ds,ax mov es,ax
Code: Select all
org 7C00h
xor ax, ax
mov ds, ax
mov es, ax
jmp 0000h:next
next: