kernel problem..

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.
Post Reply
User avatar
bubach
Member
Member
Posts: 1223
Joined: Sat Oct 23, 2004 11:00 pm
Location: Sweden
Contact:

kernel problem..

Post by bubach »

i have a problem...
i am new to os dev..

i have made a "hello world os" (only boot loader), and it worked well..

then i made a "os" (bootloader) with a command line for commands like:
reboot, ver, help.. the os had also some interrupts (at INT 20h) working, like:
terminate user program, print to screen and input from keyboard..

it all worked fine util my 512 byte of space was filled and i started to make a kernel..
i changed the bootloader so it supported FAT12 and loaded osdata.bin into the memory..
i don´t think that the problem lies at the botloader, but my kernel don´t work at all after this...
i even tested to load a kernel that only prints hello and hangs but _all_ text that i want to print from the kernel becomes strange symbols instead.. =(
(other things that my kernel does, like waiting for a key to be pressed before rebooting, seems to work!)
i think that i got some kind of memory problem, but i have tested to load the
kernel at all kinds of diffrent memory locations without any success...

what am i going to do?
thankful for answer...

/ Christoffer (from sweden..=)
"Simplicity is the ultimate sophistication."
http://bos.asmhackers.net/ - GitHub
User avatar
bubach
Member
Member
Posts: 1223
Joined: Sat Oct 23, 2004 11:00 pm
Location: Sweden
Contact:

RE:kernel problem..

Post by bubach »

forgot to tell u that the os is in realmode at the moment.. =)

/ Christoffer
"Simplicity is the ultimate sophistication."
http://bos.asmhackers.net/ - GitHub
Robert Lee

RE:kernel problem..

Post by Robert Lee »

Where are you loading the kernel to? Is it a flat binary? How are the segments ordered? Is the kernel segment-aligned in memory?

-Robert
User avatar
bubach
Member
Member
Posts: 1223
Joined: Sat Oct 23, 2004 11:00 pm
Location: Sweden
Contact:

RE:kernel problem..

Post by bubach »

don´t know really.. =) as i said i am a newbie at this..
but i have fixed some of the problems now.. the bootloader is at 7c00 or whatever the standard was..
the stack is at 9000:2000 and the kernel is loaded at 1000:0000, i think.. =)

i think that the problem is my interrupts.. it worked fine to have interrupts in the bootsector, but not in the kernel.. is it made in a diffrent way?


/ Christoffer
"Simplicity is the ultimate sophistication."
http://bos.asmhackers.net/ - GitHub
User avatar
bubach
Member
Member
Posts: 1223
Joined: Sat Oct 23, 2004 11:00 pm
Location: Sweden
Contact:

RE:kernel problem..

Post by bubach »

anyone know how to fix the interrupts?
"Simplicity is the ultimate sophistication."
http://bos.asmhackers.net/ - GitHub
Post Reply