mode after bare bones

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.
mittwoch
Posts: 4
Joined: Thu Mar 19, 2009 9:14 am

mode after bare bones

Post by mittwoch »

hello,

i've done the bare bones-tutorial, and now i'd like to go on.
i thought of trying something like switching to protected mode, but i don't know whether I'm already in there or not, since in the bare bones tutorial, i wrote some c code without doing a .code16-inline-assembly call.

So my question is what mode did grub my 'kernel' load in?

thanks in advance, mittwoch
Last edited by mittwoch on Thu Mar 19, 2009 11:18 am, edited 1 time in total.
jal
Member
Member
Posts: 1385
Joined: Wed Oct 31, 2007 9:09 am

Re: mode after bar bones

Post by jal »

mittwoch wrote:i've done the bare bones-tutorial, and now i'd like to go on. i thought of trying something like switching to protected mode, but i don't know whether I'm already in there or not
The bare bones tutorial is a tutorial, explaining exactly what it does (how and why). If you do not know when you are in protected mode, you are pretty clueless, and probably just compiled the bare bones code without actually reading the tutorial and code.


JAL
mittwoch
Posts: 4
Joined: Thu Mar 19, 2009 9:14 am

Re: mode after bar bones

Post by mittwoch »

i have read the tutorial and code, even searched it for the words 'protected mode' and 'real mode', but i didn't find something telling me in which mode i am.
User avatar
Troy Martin
Member
Member
Posts: 1686
Joined: Fri Apr 18, 2008 4:40 pm
Location: Langley, Vancouver, BC, Canada
Contact:

Re: mode after bar bones

Post by Troy Martin »

mittwoch wrote:i have read the tutorial and code, even searched it for the words 'protected mode' and 'real mode', but i didn't find something telling me in which mode i am.
Ah crap, either we need to add that in or make Getting Started and everything related to Bare bones mandatory before going to Bare bones itself.
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
User avatar
Firestryke31
Member
Member
Posts: 550
Joined: Sat Nov 29, 2008 1:07 pm
Location: Throw a dart at central Texas
Contact:

Re: mode after bare bones

Post by Firestryke31 »

Did you read up about GRUB? That would definitely have told you which mode you're in. Never just blindly use something, but understand at least what it does before using it. That will get you far in not only OS deving, but probably life in general.
Owner of Fawkes Software.
Wierd Al wrote: You think your Commodore 64 is really neato,
What kind of chip you got in there, a Dorito?
User avatar
Troy Martin
Member
Member
Posts: 1686
Joined: Fri Apr 18, 2008 4:40 pm
Location: Langley, Vancouver, BC, Canada
Contact:

Re: mode after bare bones

Post by Troy Martin »

I'm thinking about moving the bare bones kernel article to something named, say, Bare bones kernel, and having a page called Bare bones that is sort of a "STOP! Have you read through the following articles?..." page. Anyone think that's a good ideer?
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
jal
Member
Member
Posts: 1385
Joined: Wed Oct 31, 2007 9:09 am

Re: mode after bar bones

Post by jal »

mittwoch wrote:i have read the tutorial and code, even searched it for the words 'protected mode' and 'real mode', but i didn't find something telling me in which mode i am.
In that case consider yourself not (yet) fit for making an OS.


JAL
User avatar
Solar
Member
Member
Posts: 7615
Joined: Thu Nov 16, 2006 12:01 pm
Location: Germany
Contact:

Re: mode after bare bones

Post by Solar »

Oh, come on, give him a break. He's right in some way - Bare Bones is one of the most prominent pages, repeatedly referenced etc. How many of you have really done all the reading they should have before jumping right into it? And no, the page did not make mention of what the mode is after running the Bare Bones.

Yes, he could've looked it up in the Grub manual.

No, stuff like "you're not good enough yet" isn't called for here, IMHO. We've had much worse questions here.
Every good solution is obvious once you've found it.
User avatar
AJ
Member
Member
Posts: 2646
Joined: Sun Oct 22, 2006 7:01 am
Location: Devon, UK
Contact:

Re: mode after bare bones

Post by AJ »

/me Agrees with Solar.

I think that the mode thing could be made explicit Barebones tutorial. Remember that the Barebones is designed for complete beginners. If anything, this question highlights a problem with the barebones that should be fixed.

Cheers,
Adam

[Edit]Added some additional info to the tutorial preface.[/Edit]
jal
Member
Member
Posts: 1385
Joined: Wed Oct 31, 2007 9:09 am

Re: mode after bare bones

Post by jal »

AJ wrote:Remember that the Barebones is designed for complete beginners.
Complete beginners as in "first time OS development" yes. Complete beginners as in "not having the required knowledge as prescribed" no. But since it seems I'm being outnumbered, I stand corrected.


JAL
User avatar
Solar
Member
Member
Posts: 7615
Joined: Thu Nov 16, 2006 12:01 pm
Location: Germany
Contact:

Re: mode after bare bones

Post by Solar »

Just a gut feeling that we, as a community, are getting a bit too aggressive and negative.

Mittwoch came, read the Wiki first, actually found and executed the Bare Bones tutorial (successfully!), and knows enough to realize there's something strange going on with him doing C code without having done .code16 stuff, so he asks (politely).

That's his first post, and he got one heck of a lot further than most first-timers here!

@ Mittwoch:

Welcome to OSDev. Never mind the reception you've got, I think we've got a severe case of nerves here... 8)
Every good solution is obvious once you've found it.
mittwoch
Posts: 4
Joined: Thu Mar 19, 2009 9:14 am

Re: mode after bare bones

Post by mittwoch »

by the way, i found the answer for my question on my own: i'm in protected mode!
(i've read it in the GDT-Tutorial)

ps: i don't know whether it's a useful piece of information, but i when first tried to compile the c-kernel from the barebones-tutorial with the '-Werror' option (like i was advised by the tutorial), it didn't work since the two warnings of the compiler were treated as errors. then i compiled it without this option, and it worked without problems.
User avatar
Solar
Member
Member
Posts: 7615
Joined: Thu Nov 16, 2006 12:01 pm
Location: Germany
Contact:

Re: mode after bare bones

Post by Solar »

Yep... it's somewhat uncomfortable that way. It is expected that the comment line - "insert your code here" - actually makes use of the parameters.

I wouldn't want to take out either the -Werror nor the parameters (as both are helpful), but I wouldn't want to bloat the tutorial with parameter-handling code...
Every good solution is obvious once you've found it.
User avatar
Troy Martin
Member
Member
Posts: 1686
Joined: Fri Apr 18, 2008 4:40 pm
Location: Langley, Vancouver, BC, Canada
Contact:

Re: mode after bare bones

Post by Troy Martin »

Solar wrote:Just a gut feeling that we, as a community, are getting a bit too aggressive and negative.
/agree=completely
I wouldn't want to take out either the -Werror nor the parameters (as both are helpful), but I wouldn't want to bloat the tutorial with parameter-handling code...
It's possible we could "handle" the parameters in a clean and simple way, using just some kind of "if (param1 == param2);" that should count as usage without doing anything. If I'm wrong, it's because I have asmbrain.
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
jal
Member
Member
Posts: 1385
Joined: Wed Oct 31, 2007 9:09 am

Re: mode after bare bones

Post by jal »

Troy Martin wrote:because I have asmbrain.
You mean your thoughts are cut up in little pieces from which it is impossible to tell what you're thinking about without you explaining each fragment extensively? :)


JAL
Post Reply