FRIHOST FORUMS SEARCH FAQ TOS BLOGS COMPETITIONS
You are invited to Log in or Register a free Frihost Account!


How does software communicate with hardware?





likeabreeze
Isaac Newton says, If I have seen further it is by standing on the shoulders of giants.
To me, standing on the shoulders of giants is exactly what today's programmers do.
Programmers use programming languages to create software, which can communicate perfectly with hardware, but we never need to know how software do that, rather, we only need to know how to transform code into software.
Besides, actually, even most high-level programming languages are based on low-level programming languages!
So, now, let's get down to low-level programming language.
How exactly does low-level programming language communicate with the machine?
How exactly does the machine made of diode, capacitor and resistor understand code like if, else?
You have to do something "physical" to the machine, right?
Well, How did the giants do that?
jmraker
The simple answer is every program runs on your computer as a machine code
http://en.wikipedia.org/wiki/Machine_code
To see the machine code you'd open an .exe file in a hex editor. You'd see some seemingly random data and parts that contain strings.

The way that I understand it, talking to the hardware is mostly the job of the operating system through an API that gets filtered into a device driver that does the work. Devices like your keyboard/mouse/speaker do not execute programs from your computer, they would have their own independent basic input & output system for that.

It also handles plug and play and IRQ's
http://en.wikipedia.org/wiki/Plug_and_play
http://en.wikipedia.org/wiki/Interrupt
http://en.wikipedia.org/wiki/Interrupt_request
http://en.wikipedia.org/wiki/INT_%28x86_instruction%29
Related topics
Some interesting Software
More forums for Hardware and Software
Merge the 2 computer forums
What do you think about Mac OS X?
Review: GNOME 2.14 (from Linux.com)
Mac or Windows -- the cool vs. the shizznik
FTP Problem
About soul, body, ghost. What do you think about this?
Linux vs. Windows (for businesses)
McAfee. Do I really need it?
Why people hate Windows?
XP and sub-interfaces
http://cp.frihost.org/ not working
Windows Firewall windows security component
Reply to topic    Frihost Forum Index -> Computers -> Hardware and Electronics

FRIHOST HOME | FAQ | TOS | ABOUT US | CONTACT US | SITE MAP
© 2005-2011 Frihost, forums powered by phpBB.