Page 2 of 2

Re:Kernel Print problems

Posted: Mon Jul 26, 2004 4:23 pm
by Neo
so did it work?

Re:Kernel Print problems

Posted: Mon Aug 02, 2004 5:39 am
by Vladaz
It restarts me when writes "a" and "b". I think it still doesn't work. :'(

Re:Kernel Print problems

Posted: Mon Aug 02, 2004 6:58 am
by Pype.Clicker

Code: Select all

        xor bx, bx
   mov es, bx
   mov bx, 60000
Hmm ? how is *this* supposed to work ? are you in unreal mode ? Oh wait! it's mov bx, 60000 and not mov bx,0x60000, thus it will assemble fine.

However, i doubt you wanted to place your kernel at that place .

Code: Select all

 .text 0x100000
in your .ld file let me believe that your kernel expect to be located at 1MB barrier ... correct ?

Re:Kernel Print problems

Posted: Mon Aug 02, 2004 10:04 am
by Vladaz
Sorry, i forgot to upload new source to the internet.
http://avnet.sytes.net/~vladas/kernel.txt
I updated the link.ld and video.c files like Neo told me.

Re:Kernel Print problems

Posted: Mon Aug 02, 2004 11:43 am
by Neo
Try the attached one out, you will see that the line gets printed.
The compile.bat file instead of writing to a floppy just generates a image file called 'test.img' give this to bochs and see the output. Let me know what you get.

Re:Kernel Print problems

Posted: Tue Aug 03, 2004 12:04 am
by Neo
btw it would be more helpful if you use comments in your code.

Re:Kernel Print problems

Posted: Tue Aug 03, 2004 7:04 am
by Vladaz
Yeeee! ;D Now it works. Thank you! ;D

Re:Kernel Print problems

Posted: Tue Aug 03, 2004 11:19 am
by Neo
Vladaz wrote: Yeeee! ;D Now it works. Thank you! ;D
yeah it works with a few calls to the print function only. i just realised what was 'wrong'.

The 'error' was that I was using partcopy with the wrong file size. I mean i was testing your code out with a single print statement in kernel_main() and was using the size that was generated by that file. Afterward when i used your code with the other print statements the thing crashed because the whole file was not read in. (I had to run this through BOCHS debugger single-stepping to realize that pure nothing was being executed after a point).
Change the relevant line in the compile.bat file to this

Code: Select all

patcopy kernel.bin 0 200 test.img 200
If it doesn't work after this, knock me down.