What all do I need to achieve this?

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.
TheChuckster

Re:What all do I need to achieve this?

Post by TheChuckster »

I have no idea what solar said (before the edit), but nonetheless my respect of him has vanished.
User avatar
Solar
Member
Member
Posts: 7615
Joined: Thu Nov 16, 2006 12:01 pm
Location: Germany
Contact:

Re:What all do I need to achieve this?

Post by Solar »

TheChuckster wrote: ...nonetheless my respect of him has vanished.
Nice. Thanks for being such an understanding pal.

The comment I edited away because I did not really want to offend you was, "there is usually a reason why there is a FAQ or a thread that is made sticky by the moderators so it always shows up on top". I also removed the boldface "obviously" from the part that's still there.

Remember me not to help next time you ask for help, because you can't stand the criticism.

>:(
Every good solution is obvious once you've found it.
TheChuckster

Re:What all do I need to achieve this?

Post by TheChuckster »

Oh. I misunderstood you then. It seemed as if you said something that intended to be harmful (aka "finger of justice) to flame me. Then I thought the mods got to it and editted out before I could read it. Sorry.
User avatar
Solar
Member
Member
Posts: 7615
Joined: Thu Nov 16, 2006 12:01 pm
Location: Germany
Contact:

Re:What all do I need to achieve this?

Post by Solar »

TheChuckster wrote: Oh. I misunderstood you then. It seemed as if you said something that intended to be harmful (aka "finger of justice) to flame me.
Nope, just worded it a bit more harsh than strictly necessary.

I'm glad that's settled. :-\ :)
Every good solution is obvious once you've found it.
beyond infinity lazy

Re:What all do I need to achieve this?

Post by beyond infinity lazy »

@chuckster: ];->

I sometimes use words full of flowers and figures, and this might lead to misunderstanding. Sorry for that.
User avatar
Pype.Clicker
Member
Member
Posts: 5964
Joined: Wed Oct 18, 2006 2:31 am
Location: In a galaxy, far, far away
Contact:

Re:What all do I need to achieve this?

Post by Pype.Clicker »

glad to see everyone is happy again. let's move back to OSdev class ...
TheChuckster

Re:What all do I need to achieve this?

Post by TheChuckster »

All right. I got all that down. I've read the tutorials on osdever.net on IDTs, but they are above my head. Considering such a simple subject is above my head, should I give up? :-[ Well, I've gotten so far (memory manager, display driver, keyboard driver, "floppy driver" that turns on motor and seeks tracks ;D) to my goal of loading external programs. But I still have plenty of roadblocks to confuse me with filesystems, DMA, ISRs, flat binary loading.

Any how. As much as I hate to use copied code, I had to borrow Code Slasher's code because I have no other option if I'd like to move on. Well. I have remapped the PICs to start the IRQs at interrupt 0x20 then 0x28. Then I do:

outportb(PIC1 + 1, 0xFF);

This disables all IRQs. Later on I'd like to enable IRQ0, but I don't know how. ??? Also, calling

asm("sti");

causes Bochs to panic. Can't do that so how do I enable interrupts? Is that even necessary? (I am in PMode of course.)

Last, where am I supposed to get an IDT (obviously I lack the skill to code my own)?! I found a tutorial on one that calls exception ISRs, but my dreaded copy and paste method just gave me an invalid executable format error.

I've read everything at osdever.net and looked at older posts on this forum. All above my head.

Like I said, if this is too advanced for me, tell me and I'll stop. Why waste my time with something I can't do?
User avatar
Solar
Member
Member
Posts: 7615
Joined: Thu Nov 16, 2006 12:01 pm
Location: Germany
Contact:

Re:What all do I need to achieve this?

Post by Solar »

Have you downloaded / ordered the Intel manuals (as linked in post #1 of the Quick Links)? Knowing the CPU is usually a prerequisite for getting a kernel to work.
Every good solution is obvious once you've found it.
bkilgore

Re:What all do I need to achieve this?

Post by bkilgore »

TheChuckster wrote: I've read the tutorials on osdever.net on IDTs, but they are above my head. Considering such a simple subject is above my head, should I give up? :-[

-- snip --

...if this is too advanced for me, tell me and I'll stop. Why waste my time with something I can't do?
I don't think finding something as complex as operating system development confusing is a very good reason to give up on it. You're definitely going to find yourself confused on things a lot as you progress, I know I have. Even if it seems like a simple concept or idea, it doesn't necessarily mean it will be easy to figure out. Conversely, sometimes you'll find that things you thought would be difficult turn out to be easier than expected.

So being confused is not a good reason in itself to think you should give up. But you seem to be very eager to give up, in many of your posts that i've read you mention that you're frustrated and ready to give up. So maybe you do need to look at how committed you are to really following through on it. Personally seeing some of the code you've written and the ideas you have on the board, I think you got what it takes if you really want to, but it's your own decision to quit or keep going.
TheChuckster

Re:What all do I need to achieve this?

Post by TheChuckster »

Well. I found a good temporary solution to no IDT, and thus no timer. I found a snippet that uses the RTC for delays (inaccurate, but it works). At least I'll be able to move on.
User avatar
Pype.Clicker
Member
Member
Posts: 5964
Joined: Wed Oct 18, 2006 2:31 am
Location: In a galaxy, far, far away
Contact:

Re:What all do I need to achieve this?

Post by Pype.Clicker »

there are some small-but-working ASM idt code in this week posts ... http://www.mega-tokyo.com/forum/index.p ... eadid=4173

maybe this can help.

You can re-enable interrupt #i on master with

Code: Select all

current_mask&=~(1<<i)
out(0x21,current_mask);
(i.e. clearing bit I :))
Post Reply