initializing

Question about which tools to use, bugs, the best way to implement a function, etc should go here. Don't forget to see if your question is answered in the wiki first! When in doubt post here.
User avatar
Troy Martin
Member
Member
Posts: 1686
Joined: Fri Apr 18, 2008 4:40 pm
Location: Langley, Vancouver, BC, Canada
Contact:

Re: initializing

Post 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.
Image
Image
Solar wrote:It keeps stunning me how friendly we - as a community - are towards people who start programming "their first OS" who don't even have a solid understanding of pointers, their compiler, or how a OS is structured.
I wish I could add more tex
mobruan
Member
Member
Posts: 71
Joined: Thu Oct 09, 2008 8:25 am
Location: Rio de Janeiro - Brazil

Re: initializing

Post 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
User avatar
Troy Martin
Member
Member
Posts: 1686
Joined: Fri Apr 18, 2008 4:40 pm
Location: Langley, Vancouver, BC, Canada
Contact:

Re: initializing

Post 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.
Image
Image
Solar wrote:It keeps stunning me how friendly we - as a community - are towards people who start programming "their first OS" who don't even have a solid understanding of pointers, their compiler, or how a OS is structured.
I wish I could add more tex
mobruan
Member
Member
Posts: 71
Joined: Thu Oct 09, 2008 8:25 am
Location: Rio de Janeiro - Brazil

Re: initializing

Post 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
User avatar
Troy Martin
Member
Member
Posts: 1686
Joined: Fri Apr 18, 2008 4:40 pm
Location: Langley, Vancouver, BC, Canada
Contact:

Re: initializing

Post by Troy Martin »

That would be the problem, having no segment registers set up. Never assume the BIOS sets them up for you.
Image
Image
Solar wrote:It keeps stunning me how friendly we - as a community - are towards people who start programming "their first OS" who don't even have a solid understanding of pointers, their compiler, or how a OS is structured.
I wish I could add more tex
mobruan
Member
Member
Posts: 71
Joined: Thu Oct 09, 2008 8:25 am
Location: Rio de Janeiro - Brazil

Re: initializing

Post 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
ruisleipa
Member
Member
Posts: 46
Joined: Wed Sep 10, 2008 8:39 am
Location: Finland

Re: initializing

Post 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. :)
http://code.google.com/p/rmmtos/ - Real Mode MultiTasking Operating System
kay10
Member
Member
Posts: 30
Joined: Mon Apr 13, 2009 6:10 am
Location: Oldenburg, Germany

Re: initializing

Post 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?
Post Reply