OSDev.org
https://forum.osdev.org/

How to interact with Hardware?
https://forum.osdev.org/viewtopic.php?f=13&t=31186
Page 1 of 1

Author:  MrRobotS3 [ Mon Jan 09, 2017 8:06 am ]
Post subject:  How to interact with Hardware?

How do i Interact with hardware and i guess it's C as Osdev driver programming in C language.
hardware makes interrupt. But how to handle with them in C programming language it might be ASM aswell.
Can you suggest me anything or snippet of source code to better understand.

Author:  iansjack [ Mon Jan 09, 2017 8:35 am ]
Post subject:  Re: How to interact with Hardware?

http://wiki.osdev.org/Interrupts

Author:  Schol-R-LEA [ Mon Jan 09, 2017 2:25 pm ]
Post subject:  Re: How to interact with Hardware?

Could you please tell us more about what you are trying to accomplish? The question is rather open-ended, and we really would need additional information in order to give you any advice.

Is this for your own OS project, and if not, what OS are you using? Which hardware are you trying to interface with? Is it something which your OS provides any kind of API or library for, and if so, is there a reason you can't use that?

What programming language are you using, and what compiler/interpreter are you using it with? Are you trying to cross-compile (that is, compiling on one OS or hardware platform to be run on a different one)?

As a newcomer to the forum, you probably need to be very specific about what you are doing, as we don't know anything about your projects yet. Please, give as much detail as you think is relevant for what you are doing, and if you are unsure about how to explain things, read this essay for advice on asking questions on a technical forum - I don't know if you have read it before, or have experience in other technical message boards, but it is always helpful to re-read it.

If you have questions regarding operating system development, and aren't sure where to start, I would suggest reading the introductions on the OSDev Wiki:

While this is a lot of reading, it simply reflects the due diligence that any OS-devver needs to go through in order to get anywhere. OS development, even as a simple project, is not amenable to the Stack Overflow cut-and-paste model of software development; you really need to understand a fair amount of the concepts and principles before writing any code, and the examples given in tutorials and forum posts generally are exactly that. Copying an existing code snippet without at least a basic idea of what it is doing simply won't do. While learning itself is an iterative process - you learn one thing, try it out, see what worked and what didn't, read some more, etc. - in this case a basic foundation is needed at the start. Without a solid understanding of at least some of the core ideas before starting, you simply can't get very far in OS dev.


Hopefully, this won't scare you off; it isn't nearly as bad as it sounds. It just takes a lot of patience and a bit of effort, a little at a time.

Author:  MrRobotS3 [ Mon Jan 09, 2017 9:35 pm ]
Post subject:  Re: How to interact with Hardware?

Which programming language are you using ?
- I suppose i should use C and ASM programming language. Yes i am using these to languages.

Which Compiler or Interpreter are you using ?
- Suggest me which i should use ? .
--- Not Cross platform.

is This for you own OS project?
-- Yes this is.

Is it something which your OS provides any kind of API or library for, and if so, is there a reason you can't use that?
-- Suggest me something to read so i can learn. How to Create my own api for my OS and use and them.

I hope it answers of basic questions of mine.
Thanks

Author:  MrRobotS3 [ Mon Jan 09, 2017 10:02 pm ]
Post subject:  Re: How to interact with Hardware?

[*] Please suggest the guide of where to begin ?
[*] I have experience in C & ASM.
Any Guidance to grasp the basic, I will highly appreciate your concern.

Author:  Schol-R-LEA [ Tue Jan 10, 2017 12:15 am ]
Post subject:  Re: How to interact with Hardware?

Did you read the wiki pages I linked for you? I would presume you had read at least some of them even before posting here, but either way, the rest of us would need to have some idea of what parts of the introductory material you've already covered in order to gauge what you need.

As for simply linking you to a tutorial... there aren't any, not really. While some of the very, very beginning parts are covered by the Bare Bones and Baby Steps pages and tutorials such as Bran's (which are quite popular despite having many known many bugs and weaknesses), and the wiki has a section called What order should I make things in on different possible starting points for where to take things after those, this really isn't the kind of project that you can just cut and paste something together for. You really do need to read a lot of material about both the theory and the actual techniques needed before you start coding on an OS project.

Page 1 of 1 All times are UTC - 6 hours
Powered by phpBB © 2000, 2002, 2005, 2007 phpBB Group
http://www.phpbb.com/