Page 1 of 1

kernel problem..

Posted: Tue Sep 09, 2003 11:00 pm
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..=)

RE:kernel problem..

Posted: Tue Sep 09, 2003 11:00 pm
by bubach
forgot to tell u that the os is in realmode at the moment.. =)

/ Christoffer

RE:kernel problem..

Posted: Tue Sep 09, 2003 11:00 pm
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

RE:kernel problem..

Posted: Wed Sep 10, 2003 11:00 pm
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

RE:kernel problem..

Posted: Sun Sep 14, 2003 11:00 pm
by bubach
anyone know how to fix the interrupts?