Interrupt Handling?

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.
Post Reply
TheScripterGeek
Posts: 4
Joined: Sun Jul 16, 2017 9:31 pm
Libera.chat IRC: TSG_

Interrupt Handling?

Post by TheScripterGeek »

So i've got the code from the bare bones section of osdev.org, and I have no idea where else I should go. I want to stay in VGA text mode, and I want keyboard and mouse input.
I have searched around the website for a while and I still can't find anything that can help me, so links to documentation will be very well appreciated :)


Edit:
(Almost forgot to say, i'm also stumped on handling interrupts!)
LtG
Member
Member
Posts: 384
Joined: Thu Aug 13, 2015 4:57 pm

Re: Interrupt Handling?

Post by LtG »

TheScripterGeek wrote:So i've got the code from the bare bones section of osdev.org, and I have no idea where else I should go. I want to stay in VGA text mode, and I want keyboard and mouse input.
I have searched around the website for a while and I still can't find anything that can help me, so links to documentation will be very well appreciated :)


Edit:
(Almost forgot to say, i'm also stumped on handling interrupts!)
For keyboard and mouse there's basically two choices, PS/2 and USB. USB is by far more complex and requires quite a bit of knowledge, so you probably want to stick with PS/2. Even if your physical machine doesn't have PS/2, the BIOS emulates PS/2 from USB keyboards.

For PS/2 you should check the wiki for both PS/2 controller and PS/2 keyboard. These are two different things, the controller and keyboard. They're both relatively simple.

As for interrupts, you're going to have to be more specific. Read the intel manuals?
TheScripterGeek
Posts: 4
Joined: Sun Jul 16, 2017 9:31 pm
Libera.chat IRC: TSG_

Re: Interrupt Handling?

Post by TheScripterGeek »

No I have not, and by interrupt handling I mean help with the keyboard, and I don't quite understand the PS/2 keyboard page(http://wiki.osdev.org/PS/2_Keyboard)
Mainly I pretty much just need help with interrupt stuff like keyboard presses and mouse stuff

Sorry if I seem professional, i'm new to making an OS
LtG
Member
Member
Posts: 384
Joined: Thu Aug 13, 2015 4:57 pm

Re: Interrupt Handling?

Post by LtG »

TheScripterGeek wrote:No I have not, and by interrupt handling I mean help with the keyboard, and I don't quite understand the PS/2 keyboard page(http://wiki.osdev.org/PS/2_Keyboard)
Mainly I pretty much just need help with interrupt stuff like keyboard presses and mouse stuff

Sorry if I seem professional, i'm new to making an OS
Is someone supposed to be able to answer to you in a meaningful way? What exactly do you want from us? You don't ask anything specific..

As for the intel manuals, you should read them. The old 386 manual maybe easier and is a lot shorter, though obviously doesn't cover long mode (64-bit), nor some of the finer details and newer stuff, but it has the basics for protected mode, interrupts, etc.

Bottom line, you want to do osdev on the x86, you need to read the manuals.
stevewoods1986
Member
Member
Posts: 80
Joined: Wed Aug 09, 2017 7:37 am

Re: Interrupt Handling?

Post by stevewoods1986 »

TheScripterGeek wrote:So i've got the code from the bare bones section of osdev.org, and I have no idea where else I should go. I want to stay in VGA text mode, and I want keyboard and mouse input.
I have searched around the website for a while and I still can't find anything that can help me, so links to documentation will be very well appreciated :)


Edit:
(Almost forgot to say, i'm also stumped on handling interrupts!)
For keyboard, PS2_Keyboard. By the way, do you understand this code by the way or are you just copying and pasting thinking that is what good OS developers do? The Bare Bones tutorial simply prints Hello, kernel World! Do you have any idea how it works and why 0xb800 is involved?

Printing_To_Screen will explain things. However, don't copy and paste out of that as well.
Beginner_Mistakes and Required_Knowledge should be the only thing you copy and paste out.

For anyone reading this, like okwani, INT 0x13 has nothing to do with VGA, keyboards or learning x86 Assembly.

The Intel manual has things at Section 6 (Basic Architecture - 1/10 volume) about handling. Now you do have to read it :D
https://software.intel.com/en-us/articles/intel-sdm

Learn user space first.

users browsing this forum... uh oh
Post Reply