How Computers Work 12

Barely 15 years ago computer programs were based on the text prompt:

Do you want to save your work? Yes | No

Some of these ancient programs were pretty sophisticated for their small size. One company I know of still likes to use a DOS program that offered a data base, word processor, address book, spell checker and invoice generator, all of which merged. This 64 Kb program allowed the company to keep handy names and addresses which could be called into a letter written in the text processor, send them invoices and statements, plus it had a data base filled with information on their clients.

You used F keys to move from one module to another. You used the up and down arrow keys to move through the fields for entering or updating data.

The whole program and much of the data could fit on a single sided 5 ¼” floppy disk.

Soon people started writing program with better “front ends” (the data entry part used by you, the user). An example of this was the old Alpha Four DOS data base which used the common dBase file types associated with dBase III and dBase IV.

This kind of a program used DOS text characters that had graphic elements. White bars, gray bars, dotted bars. So, they could build something that looked like a “window” in DOS and then you used the up and down arrow keys to navigate. The closest thing to this we have today is Scan Disk for Windows 98 and ME which uses these DOS characters to show the progress of file checking and allows you to the operation.

To make these more sophisticated programs work the programmer had to parcel off space on the screen and write code to let the program know where the cursor was on the screen.

Today’s Windows and Mac programs are still based on this concept, except the programmer is given a set of pre-written “tools” to create the “windows” or “forms” and “push buttons” or “scroll bars.” The Windows and Mac operation systems then keep track of these “objects” the programmer puts on to the form. If you mouse pointer crosses over a given “object” then the operating system is fully aware of this fact and then if you click on the button the “object” that is “in focus” (by virtue of your mouse pointer over it) does some “action” such as save a file, open a file, change windows or call up the printer control box so that you can generate a hard copy of the data on the screen.

Because of all these “objects” which are apart of the Microsoft API Library (or the Macintosh ToolBox or the Atari ST VDI Library or the Amiga Library) and the pre-written code to keep track of the object “handle” (an address in memory which contains the parameters of the object, such as font size, color, prompt text and state of being, such as a check box having no check or a check inside the box) the size of the operating systems has grown to epic proportions.

The old DOS operating system did all this work using “” which was small enough to fit on a 3” floppy disk and still leave room for other programs. Windows 98 or ME requires about half a CD worth of files be installed on your system (that’s about ten million times more files than DOS) and a whole bunch of these files must be loaded into both disk based and RAM memory so that a given program such as Excel, Word or WinMX can connect to the built-in sensors and library of “tools” (called OCX files in Windows, of which Comdlg32.OCX generates your file open, file save, printer control, font selection and color palette tools).

When you drag your mouse over a menu item or button marked PRINT you bring this PRINT object into “focus” and then if you make an “action” such as clicking on the left button your program sends notice to the operating system, which then connects your program to the Comdlg32.OCX file stored in Windows/System. This OCX file then sends information back to your program that allows it to generate the printer control box.

This printer control box (part of Comdlg32.OCX) allows you to clean your printer, select alignment (portrait or landscape), size certain aspects, adjust the quality from rough draft to high quality, print as black and white or color, print a range of pages and deliver a quantity of duplicated printed page copies.

Once you click on the printer control box this sends information back through your program to the operating system which then locates the printer driver stored elsewhere in Windows. Your date is then steamed to an output port selected by the operating systems (Windows XP or on older systems Windows ME via DOS, which actually opens the output area).

In Windows 98 or ME the actual desktop area of Windows is generated through DOS. Programs executed on this desk top then talk to DOS through Windows. The Windows API library files often have to access a DOS interrupt to do something such as send serial data through a communications port (COM1, COM2, COM3, COM4, USB1, USB2, LPT, etc.) to a device such as a printer.

Your program talks to Windows via libraries of OCX, DLL (Dynamic Link Libraries) and DRV (drivers for items like printers) into DOS which then actives the old interrupt system that dates back to 1981 and this communicates with your printer so you can get a data hard copy.

In the case of something like a USB port, which was invented long after DOS was obsolete, Windows simply convinces DOS that the USB port is just another COM port. Your start up BIOS told DOS that this USB was just another COM port. As far as DOS is concerned the USB port is no different than the port used for your mouse, modem or the old printer ports on your computer. DOS has no idea that the USB port is something it was never created to see! It is simply told to treat the USB as if it were a vacant COM or PRINTER port.

The makers of the USB ports designed that port to work much like a COM port. So, DOS gets fooled into working with a piece of hardware created 10 years after the last version of DOS was written!


The Musician's PlaceTo Shop!
Instant Gift Certificates!

© 2001-2005 Issues Magazine.
All Rights Reserved.

Get 15 FREE prints!