OSDev.org

The Place to Start for Operating System Developers
It is currently Thu Aug 17, 2017 1:19 pm

All times are UTC - 6 hours




Post new topic Reply to topic  [ 6 posts ] 
Author Message
 Post subject: How to interact with Hardware?
PostPosted: Mon Jan 09, 2017 8:06 am 
Offline

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


Top
 Profile  
 
 Post subject: Re: How to interact with Hardware?
PostPosted: Mon Jan 09, 2017 8:35 am 
Offline
Member
Member
User avatar

Joined: Sat Mar 31, 2012 3:07 am
Posts: 2940
Location: Chichester, UK
http://wiki.osdev.org/Interrupts


Top
 Profile  
 
 Post subject: Re: How to interact with Hardware?
PostPosted: Mon Jan 09, 2017 2:25 pm 
Offline
Member
Member
User avatar

Joined: Fri Oct 27, 2006 9:42 am
Posts: 925
Location: Athens, GA, USA
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
μή εἶναι βασιλικήν ἀτραπόν ἐπί γεωμετρίαν
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.


Top
 Profile  
 
 Post subject: Re: How to interact with Hardware?
PostPosted: Mon Jan 09, 2017 9:35 pm 
Offline

Joined: Fri Dec 30, 2016 5:41 am
Posts: 3
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


Top
 Profile  
 
 Post subject: Re: How to interact with Hardware?
PostPosted: Mon Jan 09, 2017 10:02 pm 
Offline

Joined: Fri Dec 30, 2016 5:41 am
Posts: 3
[*] 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.


Top
 Profile  
 
 Post subject: Re: How to interact with Hardware?
PostPosted: Tue Jan 10, 2017 12:15 am 
Offline
Member
Member
User avatar

Joined: Fri Oct 27, 2006 9:42 am
Posts: 925
Location: Athens, GA, USA
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
μή εἶναι βασιλικήν ἀτραπόν ἐπί γεωμετρίαν
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.


Top
 Profile  
 
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 6 posts ] 

All times are UTC - 6 hours


Who is online

Users browsing this forum: No registered users and 3 guests


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Jump to:  
Powered by phpBB © 2000, 2002, 2005, 2007 phpBB Group