Page 2 of 2
Re: initializing
Posted: Sat May 02, 2009 5:49 pm
by Troy Martin
The NMI normally doesn't fire that often, but if the computer has some weird hardware or BIOS crap, that might be an issue.
Re: initializing
Posted: Sat May 02, 2009 6:23 pm
by mobruan
Hi,
1 - Im booting from a cd-rw.
2 - I try to disable the NMI, didnt work.
3 - I put the code, from wiki, to enable A20 and the computer start to beep!
4 - I put a "breakpoint" on the code and i saw that the code reset after a write to cr0.
Any Ideias?
Thanks,
Ângelo
Re: initializing
Posted: Sat May 02, 2009 6:49 pm
by Troy Martin
How old is the computer? If it's over 20 years old, it won't have a 386 or higher, but that's seriously unlikely.
Re: initializing
Posted: Sat May 02, 2009 8:44 pm
by mobruan
Hi, its a celeron.
I did the following modifications...it worked...
1- org 0x07c00
2- end_gdt - gdt - 1
3- bits 16 after the start label
4- mov ax, 0x0000
mov ds, ax
mov ss, ax before entering Protected mode.
thanks,
Ângelo
Re: initializing
Posted: Sat May 02, 2009 9:50 pm
by Troy Martin
That would be the problem, having no segment registers set up. Never assume the BIOS sets them up for you.
Re: initializing
Posted: Mon May 04, 2009 9:21 am
by mobruan
Hi, the biggest problem was in the org directive...and i dont understand why...
When i put org 0x07c0 or 0x7c0 it didnt work, only when i put 0x07c00.
Any ideias?
Thanks,
Ângelo
Re: initializing
Posted: Mon May 04, 2009 9:29 am
by ruisleipa
mobruan wrote:Hi, the biggest problem was in the org directive...and i dont understand why...
When i put org 0x07c0 or 0x7c0 it didnt work, only when i put 0x07c00.
Any ideias?
Thanks,
Ângelo
That's because 0x7c0 and 0x7c00 are different numbers.
Re: initializing
Posted: Mon May 04, 2009 9:30 am
by kay10
Is your problem a bit solved now or completely?
It's logical that it is only working with 0x7C00 because your bootstrap gets loaded to 0x0000:0x7C00 and not anywhere else.
Maybe some bioses would load it somewhere else, but that's not the point here.
In your posted code, you already had used ORG 0x7C00, why do you changed it?