From owner-freebsd-drivers@FreeBSD.ORG Thu Jun 21 09:42:38 2007 Return-Path: X-Original-To: freebsd-drivers@freebsd.org Delivered-To: freebsd-drivers@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 8B07116A41F for ; Thu, 21 Jun 2007 09:42:38 +0000 (UTC) (envelope-from mjalvarez@fastmail.fm) Received: from out3.smtp.messagingengine.com (out3.smtp.messagingengine.com [66.111.4.27]) by mx1.freebsd.org (Postfix) with ESMTP id 5327A13C484 for ; Thu, 21 Jun 2007 09:42:38 +0000 (UTC) (envelope-from mjalvarez@fastmail.fm) Received: from compute1.internal (compute1.internal [10.202.2.41]) by out1.messagingengine.com (Postfix) with ESMTP id 8EB741858 for ; Thu, 21 Jun 2007 05:28:21 -0400 (EDT) Received: from web6.messagingengine.com ([10.202.2.215]) by compute1.internal (MEProxy); Thu, 21 Jun 2007 05:28:21 -0400 Received: by web6.messagingengine.com (Postfix, from userid 99) id 9AD6B1F6AF; Thu, 21 Jun 2007 05:28:21 -0400 (EDT) Message-Id: <1182418101.6802.1196302545@webmail.messagingengine.com> X-Sasl-Enc: owKbb4CUy17bqIhpWw41c8idgqOC16CED6GQvvrLcSkj 1182418101 From: "Mark Jayson Alvarez" To: freebsd-drivers@freebsd.org Content-Disposition: inline Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset="ISO-8859-1" MIME-Version: 1.0 X-Mailer: MessagingEngine.com Webmail Interface Date: Thu, 21 Jun 2007 17:28:21 +0800 Subject: Where software meets hardware.. X-BeenThere: freebsd-drivers@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Writing device drivers for FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 21 Jun 2007 09:42:38 -0000 Hi, Good day! I could have sent this to questions@freebsd.org but I know it will get treated as irrelevant topic as well. Just trying my luck here though. Those of you who've been inspired with my curiosity may email me directly. :-) Just f***ing google it advices are also welcome. I have a cousin who's taking up a programming course. He doesn't have background with programming nor an in depth understanding of how the computer works. I tried explaining him that it all started with abacus, and that people wanted to use something that could make their arithmetic life easier and that Charles Babbage tried automating this manual calculator with his steam engine or some sort... and that... oh, forget about these craps.=20 This is how my programming teacher explains how a program gets executed. First you compile it into a machine readable code, then the operating system writes it in the memory, and finally the CPU fetches it and it finally gets toasted by the electricity flowing on the CPU's surface. It doesn't make things clearer though.:-( Here's how I understand it: Suppose I'm writing this email. If I press a letter in the keyboard,=20 it generates an tiny electric current which eventually translated to interrupt. Next the keyboard driver picks this up and tell the operating to talk to the monitor driver and output the letter in my=20 monitor.. I really don't get it. Can you in a very simple sentence explain to me how and where a software program meets the hardware? Does it have anything to do with the bios? Wiki entry for it doesn't say much about this. It only says, this is how things get started when you power on your pc. The bios initializes all your computer parts, then call the boot loader and so on and so forth.. I really wanted to get down really really low. Someone told me to read a driver source code in C but if I compile it, it will still be translated into assembly code or something. Still the operating system reads that code and the cycle goes on again. I am no programmer by profession but I do know how to program. I told my cousin, that someday he will be a real programmer and that even if he will be dealing only with java, html, animation and all sorts of high level programming stuffs, in the spirit of open source (and freebsd of course), it's better that he knows exactly how a program interacts with the physical computer. Thanks for the time. I hope this one doesn't bounce back. :-) --=20 Mark Jayson Alvarez mjalvarez@fastmail.fm --=20 http://www.fastmail.fm - Same, same, but different=85