Interface between software and hardware.

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
SUPBRO20
Posts: 1
Joined: Tue Mar 17, 2015 10:12 pm

Interface between software and hardware.

Post by SUPBRO20 »

How can I make my kernel communicate with my software, like getting raw input from keyboard, printing to the screen, and writing to drives?

(0x00 : Hex interface level)
User avatar
Muazzam
Member
Member
Posts: 543
Joined: Mon Jun 16, 2014 5:59 am
Location: Shahpur, Layyah, Pakistan

Re: Interface between software and hardware.

Post by Muazzam »

I think, you should get required knowledge before asking such a questions. http://wiki.osdev.org/Required_Knowledge
Last edited by Muazzam on Tue Mar 17, 2015 11:37 pm, edited 1 time in total.
Antti
Member
Member
Posts: 923
Joined: Thu Jul 05, 2012 5:12 am
Location: Finland

Re: Interface between software and hardware.

Post by Antti »

We should start by designing how we want it to work. The interface between software and hardware is a difficult topic and I am sure that it is not "required knowledge". If it was, then I would be totally lost. The "required knowledge" may help you to get started but this question is very in-depth and it will follow you through your OSDev career. It will just change its meaning. At first it may be enough to get raw input from "PS/2 keyboard" and put characters into the text-mode framebuffer (printing to the screen).

To do to this properly, i.e. "get input" and "put output", is very hard. It means that you basically have all the essential OS elements.
User avatar
bluemoon
Member
Member
Posts: 1761
Joined: Wed Dec 01, 2010 3:41 am
Location: Hong Kong

Re: Interface between software and hardware.

Post by bluemoon »

This should goes to How_To_Ask_Questions indeed.

It's like asking how to build a rocket, without telling us about your knowledge, what have you try and any arising concerns that make you feel difficult to make design choices.

And people here assume you have read the wiki, including PS2_Keyboard (note, it will not work on some hardware that miss the PS2 controller) and Printing_to_Screen which provide information on very very basic implementation.

If you are really talking about driver interface design, there are a few driver interfaces quite popular among hobby OSes like UDI.
User avatar
williderwurm
Posts: 13
Joined: Wed Mar 18, 2015 5:28 am
Location: Hyperspace

Re: Interface between software and hardware.

Post by williderwurm »

SUPBRO20 wrote:How can I make my kernel communicate with my software, like getting raw input from keyboard, printing to the screen, and writing to drives?

(0x00 : Hex interface level)
For the use in a bootloader using bios interrupts is suitable. But because you asked for a way of communication in the kernel ring, you should write your own drivers / functions to fulfill those tasks. You have to gain knowledge about the devices you would like to support and write functions to access them. Writing your own drivers is a lot harder than using bios interrupts, though you can use your drivers outside of real mode.
Post Reply