Hey.
I've managed to use the default gcc and ld to successfully compile and link my test 'kernel' with the Bare Bones tutorial. I've made print functions, newline functions and that sort of stuff.
The problem is, I want to be able to get keyboard input. Although I don't know where to go from here, I've looked at the PS/2 keyboard wiki pages, although I don't know how to use the tables of make/break codes.
If anyone could give me a list (in order) of things I have to set-up or do with my kernel to get to the level where I can start getting keyboard input, I would be very greatful.
Thanks.
Going further with grub
Re: Going further with grub
1) boot.
2) set up environment
3) set up interrupts
4) figure out how you want to handle key presses for your ui/gui.
2) set up environment
3) set up interrupts
4) figure out how you want to handle key presses for your ui/gui.
Programming is 80% Math, 20% Grammar, and 10% Creativity <--- Do not make fun of my joke!
If you're new, check this out.
If you're new, check this out.
Re: Going further with grub
@m12
"2) set up environment"
That doesn't really help me, I need specifics.
By "set up interrupts" do you mean set up the interrupt table (or something called something similar)?
"2) set up environment"
That doesn't really help me, I need specifics.
By "set up interrupts" do you mean set up the interrupt table (or something called something similar)?
Re: Going further with grub
That is specific. Set up the environment to however your kernel will expect it. eg, (Brendan, skip to the comma) do you want real mode, protected mode, or long mode? do you want the A20 line enabled? Do you want to use paging or PAE?DrHaximus wrote:"2) set up environment"
That doesn't really help me, I need specifics.
In real mode, IVTBy "set up interrupts" do you mean set up the interrupt table (or something called something similar)?
Pmode and lmode, IDT
Programming is 80% Math, 20% Grammar, and 10% Creativity <--- Do not make fun of my joke!
If you're new, check this out.
If you're new, check this out.
Re: Going further with grub
@M12
Oh.. Thanks. I didn't know that.
But I'm using GRUB, which (to my knowledge) already drops me off in Protected Mode with A20 enabled.
Are you sure I need to set up the IDT alongside GRUB?
Oh.. Thanks. I didn't know that.
But I'm using GRUB, which (to my knowledge) already drops me off in Protected Mode with A20 enabled.
Are you sure I need to set up the IDT alongside GRUB?
Re: Going further with grub
You would be correct. The question is, do you want to stay there.DrHaximus wrote:But I'm using GRUB, which (to my knowledge) already drops me off in Protected Mode with A20 enabled.
No, actually, you don't have to do anything. If you want to intercept interrupts, you can implement an idt, but if you have no need for error handling (ints 0-31), keyboard/mouse/hard drive/clock/timer/etc, long battery life (see how long your battery lasts with continual polling), etc, nobodies making do an idt.Are you sure I need to set up the IDT alongside GRUB?
Programming is 80% Math, 20% Grammar, and 10% Creativity <--- Do not make fun of my joke!
If you're new, check this out.
If you're new, check this out.
Re: Going further with grub
Hey guys.
I hope someone answers this next question, I didn't see the point creating a new topic for it
I'm using osdever.net to get the core files for my OS so I can start making the higher level stuff with C. I had to edit a few functions in some of the tutorials to get it to compile (mostly just syntax/typo stuff) and the keyboard/PIT isn't working. Which in turn means the IRQ must not be working.
Everything compiles fine. Nothing errors, and the kernel.c file runs without flaw.
I have attached the source files, please read the
irq.c, irq.h, kb.c, kb.h, timer.c, timer.h and loader.s
which are the files I suspect are the culprits
Thanks!
I hope someone answers this next question, I didn't see the point creating a new topic for it
I'm using osdever.net to get the core files for my OS so I can start making the higher level stuff with C. I had to edit a few functions in some of the tutorials to get it to compile (mostly just syntax/typo stuff) and the keyboard/PIT isn't working. Which in turn means the IRQ must not be working.
Everything compiles fine. Nothing errors, and the kernel.c file runs without flaw.
I have attached the source files, please read the
irq.c, irq.h, kb.c, kb.h, timer.c, timer.h and loader.s
which are the files I suspect are the culprits
Thanks!
- Attachments
-
- src_files.tar.gz
- The source files of the kernel
- (10 KiB) Downloaded 74 times
- Combuster
- Member
- Posts: 9301
- Joined: Wed Oct 18, 2006 3:45 am
- Libera.chat IRC: [com]buster
- Location: On the balcony, where I can actually keep 1½m distance
- Contact:
Re: Going further with grub
You do know that the whole subject is discussed in-depth on the FAQ? Which cases have you checked?