mode after bare bones
mode after bare bones
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
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.
Re: mode after bar bones
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.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
JAL
Re: mode after bar bones
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.
- Troy Martin
- Member
- Posts: 1686
- Joined: Fri Apr 18, 2008 4:40 pm
- Location: Langley, Vancouver, BC, Canada
- Contact:
Re: mode after bar bones
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.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.
- Firestryke31
- Member
- Posts: 550
- Joined: Sat Nov 29, 2008 1:07 pm
- Location: Throw a dart at central Texas
- Contact:
Re: mode after bare bones
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?
- Troy Martin
- Member
- Posts: 1686
- Joined: Fri Apr 18, 2008 4:40 pm
- Location: Langley, Vancouver, BC, Canada
- Contact:
Re: mode after bare bones
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?
Re: mode after bar bones
In that case consider yourself not (yet) fit for making an OS.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.
JAL
Re: mode after bare bones
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.
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.
Re: mode after bare bones
/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]
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]
Re: mode after bare bones
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.AJ wrote:Remember that the Barebones is designed for complete beginners.
JAL
Re: mode after bare bones
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...
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...
Every good solution is obvious once you've found it.
Re: mode after bare bones
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.
(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.
Re: mode after bare bones
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...
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.
- Troy Martin
- Member
- Posts: 1686
- Joined: Fri Apr 18, 2008 4:40 pm
- Location: Langley, Vancouver, BC, Canada
- Contact:
Re: mode after bare bones
/agree=completelySolar wrote:Just a gut feeling that we, as a community, are getting a bit too aggressive and negative.
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.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...
Re: mode after bare bones
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? :)Troy Martin wrote:because I have asmbrain.
JAL