Demo problem

If you are new to OS Development, plan on spending some time here first before going into the other forums.

Moderator:Moderators

Post Reply

Is OS development easy or not

Yes
2
25%
No
2
25%
A bit here and there
4
50%
 
Total votes: 8

venk
Posts:14
Joined:Thu Oct 16, 2008 6:49 am
Contact:
Demo problem

Post by venk » Sun Nov 02, 2008 12:01 pm

I downloaded the demo of tutorial 7, got the settings right (hopefully), and compiled it. I ran the OS with bochs emulator(windows). The screen turned green (due to clrscr(int c) I think). Then nothing happened. Even the cursor did not move. When I changed the color in clrscr(int c); function, still it remained green, not any other color.
Please help me (I hardly changed anything except for changing all 64 bit values to 32 bit. (my comp. is 32 bit).

PS: is it possible to keep the settings for the project rather than setting it again and again. Also I have to keep on adding all files to the progect again and again.

User avatar
Mike
Site Admin
Posts:465
Joined:Sat Oct 20, 2007 7:58 pm
Contact:

Post by Mike » Sun Nov 02, 2008 4:58 pm

I downloaded the demo of tutorial 7
Tutorial 7 does not have a demo...
The screen turned green (due to clrscr(int c) I think).
Odd...Its not supposed to turn green at all ;)
Please help me (I hardly changed anything except for changing all 64 bit values to 32 bit. (my comp. is 32 bit).
64 bit values? The demo uses uint64_t when it is required. Changing them to uint32_t may cause problems. You can use uint64_t on 32 bit machines.
PS: is it possible to keep the settings for the project rather than setting it again and again. Also I have to keep on adding all files to the progect again and again.
Do you mean that you need to re-add all of the files whenever you open up the project? The settings should already be getting saved when the project or workspace is saved...

Also, because you are using Bochs, can you please post the last part of your Bochs log file and any warnings from it?

venk
Posts:14
Joined:Thu Oct 16, 2008 6:49 am
Contact:

Post by venk » Tue Nov 04, 2008 9:39 am

I mean the tutorial in which printf function is developed.

And the green color does not change whatever argument I pass, I can see the message "searching for os..." before the screen turns green. And it is due to the c program, as if I remove the program, or do not set its settings, then it does not turn green
Also the cursor remains where it is, no movement at all.

Visual C++ gives an error when long longis put saying "long followed by long is not allowed". So I commented all of "long lonf" declarations, and replaces all 64 bit values to 32 bit values.

Please help me.

venk
Posts:14
Joined:Thu Oct 16, 2008 6:49 am
Contact:

Post by venk » Thu Nov 06, 2008 9:27 am

I fugured out that the screen was turning green due to stage2. And th kernel was not getting loaded at all.
:?
Also bochs did not give any warning.
Help Me!!
SOS!!

User avatar
Mike
Site Admin
Posts:465
Joined:Sat Oct 20, 2007 7:58 pm
Contact:

Post by Mike » Sat Nov 08, 2008 3:45 pm

Can you please PM or email me a copy of your project so that I can test it? If not, thats okay. It will be hard to debug without a kernel mode debugger though ;) If your project is just one of the tutorials demos, please tell me what tutorial that you got it from.

It is possible for the display to turn a different color do to a buffer overrun bug (I had this happen myself). The only way to know for sure is by running it with a debugger (ie, Bochs debugger).

Andyhhp
Moderator
Posts:387
Joined:Tue Oct 23, 2007 10:05 am
Location:127.0.0.1
Contact:

Post by Andyhhp » Sat Nov 08, 2008 11:12 pm

Lol gl, especially if it is due to one of your interrupts.

While BOCHS debugger is technically a debugger, it lacks the ability to breakpoint in interrupt handlers and isn't, imo, the best interface that it could have.

Saying that, it is good in the fact that it is the only thing that can debug in such a way.

The method I find best is to follow your code logically and see if anything is glaringly obvious before resorting to debugging.

Then again, feel free to do it whichever way suits you

~Andrew
Image

venk
Posts:14
Joined:Thu Oct 16, 2008 6:49 am
Contact:

Post by venk » Fri Nov 14, 2008 11:08 am

Is it possible for the system to crash if I enable interrups and yet bochs does not warn me of it.
I will try to trace the interrut thingie, also I am trying to use JLoc to make a binary file by combining C and assembly object files, I will give the details if I succeed including the linker script.
My internet is not working so I am in a cyber cafe, as soon as it starts working I will mail you the code.

PS: Your tutorial is great!!

Thank You!!

venk
Posts:14
Joined:Thu Oct 16, 2008 6:49 am
Contact:

leaving C, continuing with asm

Post by venk » Wed Nov 19, 2008 10:34 am

Sorry, I could not get JLOC to work for me, so I am developing the kernel in asm completely, (unless something causes me to change my mind), if you want, I can mail you any developments that I have made (currently working on keyboard).

You did give me a start in writing the bootloader, I would never have got anywhere without it. Thank you.

If you have any ideas about how I go about converting from integer to string or vice-versa please tell me. I tried three codes (of my own), they did not work, please help me.

PS: I am not too good with asm, I know the theory bit, but for practical building well... this is my first large project.
Help Me!!
SOS!!

Andyhhp
Moderator
Posts:387
Joined:Tue Oct 23, 2007 10:05 am
Location:127.0.0.1
Contact:

Post by Andyhhp » Wed Nov 19, 2008 4:20 pm

Hi,

http://www.brokenthorn.com/forums/viewtopic.php?t=115

I wrote a post explaining the theory behind converting integers to strings in the topic above.

Does this help?
Image

Post Reply