How to interact with Hardware?

Programming, for all ages and all languages.
Post Reply
MrRobotS3
Posts: 3
Joined: Fri Dec 30, 2016 5:41 am
Libera.chat IRC: ee

How to interact with Hardware?

Post by MrRobotS3 »

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.
User avatar
iansjack
Member
Member
Posts: 4685
Joined: Sat Mar 31, 2012 3:07 am
Location: Chichester, UK

Re: How to interact with Hardware?

Post by iansjack »

User avatar
Schol-R-LEA
Member
Member
Posts: 1925
Joined: Fri Oct 27, 2006 9:42 am
Location: Athens, GA, USA

Re: How to interact with Hardware?

Post by Schol-R-LEA »

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.
Rev. First Speaker Schol-R-LEA;2 LCF ELF JAM POEE KoR KCO PPWMTF
Ordo OS Project
Lisp programmers tend to seem very odd to outsiders, just like anyone else who has had a religious experience they can't quite explain to others.
MrRobotS3
Posts: 3
Joined: Fri Dec 30, 2016 5:41 am
Libera.chat IRC: ee

Re: How to interact with Hardware?

Post by MrRobotS3 »

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
MrRobotS3
Posts: 3
Joined: Fri Dec 30, 2016 5:41 am
Libera.chat IRC: ee

Re: How to interact with Hardware?

Post by MrRobotS3 »

[*] 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.
User avatar
Schol-R-LEA
Member
Member
Posts: 1925
Joined: Fri Oct 27, 2006 9:42 am
Location: Athens, GA, USA

Re: How to interact with Hardware?

Post by Schol-R-LEA »

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.
Rev. First Speaker Schol-R-LEA;2 LCF ELF JAM POEE KoR KCO PPWMTF
Ordo OS Project
Lisp programmers tend to seem very odd to outsiders, just like anyone else who has had a religious experience they can't quite explain to others.
Post Reply