Computer Systems

As most children know, a computer contains a microprocessor, random access memory (RAM) and read-only memory (ROM). The processor, the heart of the machine, handles the digital mathematical operations necessary for its operation, the RAM acts as a temporary storage area and the ROM contains computer code that’s fixed at the time of manufacture.

Most machines incorporate a hard disk drive for storing documents and data that’s retained between turning the computer off and on again. They also need some sort of display, either built-in or provided via a special port for the connection of a monitor. Finally, most machines include a range of ports for peripheral devices such as printers or scanners.

  Operating Systems

An operating system (OS) transfers data between the parts of a machine and presents information to the user. For optimum speed, each kind of system is normally tailored to suit a computer with matching hardware. A group of machines that use a common OS, although they may have small variations in hardware, are said to share a common computer platform.

All computer systems provide a user interface that communicates information between the machine and the operator. Older machines use a command line interface (CLI), requiring the user to type specific instructions. Fortunately for our sanity, most modern systems use a graphical user interface (GUI), showing computer items as icons on a desktop.

The most common platform is Microsoft’s Windows system, although earlier versions of this OS are actually based on the Microsoft Disk Operating System (MS-DOS), as devised for IBM’s original Personal Computer (PC). For not entirely altruistic reasons, IBM allowed other companies to make clones of the PC, giving both systems an assured future.

The Macintosh Operating System (Mac OS) only has a minority stake in the domestic computer market, although Mac users are usually highly committed to their system. Unlike Windows, the Classic version of this system didn’t have to accommodate such a wide range of hardware, making it very reliable.

Finally, there’s Unix, developed by AT&T Bell Laboratories for minicomputers, but latterly adopted for mainframe machines and microcomputers. Various versions of Unix are available for PC and Mac OS machines, including the popular form known as Linux. However, the most notable development is Mac OS X, itself based on the standard form of Unix.

Task Handling

All systems needs rules to distribute the processor’s resources to active applications or processes. In a multi-tasking system, several processes run at once. In preemptive multi-tasking each task is given a priority, depending on its importance, unlike cooperative multi-tasking, where the resources are simply divided equally among the tasks.

The allocation of resources is set by a scheduler. The preemptive schedulers in the Mac OS and Windows give priority to the front application, leaving other applications to fight for the remaining memory. However, in Windows 98 this only works when using 32-bit applications, whilst in Windows NT the priorities are set by the applications themselves.

Multithreading is really multi-tasking within an application, enabling the efficient processing of instructions. Pervasive multithreading, as used in the defunct Be OS, is an extended form of multithreading that breaks instructions down into smaller and easily-handled components.

A Universal System?

In theory, a common OS could be used for all computers, with instructions from the system converted into a form that’s understood by specific hardware. However, each instruction would require several instructions at ‘machine level’, slowing the computer down by a proportionate amount.

This slowing-down effect can be seen whenever you run an emulation programme, a special software application that allows one computer to use another machine’s operating system. One example is SoftPC, an application that allows a Mac OS computer to run Windows applications. It works surprisingly well, but it’s significantly slower than running a real PC.

Special systems such as Java can run executable code on any kind of computer, usually over the Internet, but are rarely used instead of Windows or the Mac OS. In fact, Unix is a much better contender as a universal system.

As it happens, the choice of an operating systems is becoming less important, especially since the document files used on different platforms and over the Internet are usually the same.

The following systems may be encountered:-

  Classic Mac OS

Originally, the Mac OS was designed for Motorola’s 680x0 processors and Apple’s quirky hardware, although the latter eventually became more standardised. Apple also transferred their system to the new IBM PowerPC processor, initially by emulating the 680x0, but in later versions of the Classic Mac OS, they used code that was almost entirely PowerPC-native. In Mac OS 8.x, the system was finally disentangled from the hardware, allowing an OpenFirmware ROM to be used.

Unlike many other systems, the Mac OS included a GUI at the outset. However, the Mac’s uniqueness was also its worst enemy. For example, a PostScript-based application in the Classic Mac OS had to use Apple’s QuickDraw software for the on-screen presentation: anyone with a 680x0-based machine knows how slow this can be. And, although PostScript fonts came with the original LaserWriter printer, Apple confused everyone by introducing TrueType fonts, which then migrated onto the PC platform. Hopefully, the new OpenType font format should finally clear up this particular mess.

The Classic Mac OS was so easy at first: just a few simple applications like MacWrite, MacPaint, a few TEXT and PICT files, and hardly any system extensions. But as time progressed, we had to cope with PostScript files, EPSFs, TIFFs, GIFs and all sorts of junk from other horrible computers, which the system then had to accommodate. A glance inside the System Folder used in later versions of the Classic Mac OS is quite frightening; almost as bad as using Windows.

  Mac OS X

Many people thought that although the Mac OS needed to be simplified, it also had to expand to meet modern requirements. And in many ways that’s exactly what happened. Apple’s much-publicised Mac OS X (Ten) was developed from NeXTStep and OpenStep, both based on the Berkeley Standard Distribution (BSD) form of Unix (see below). The core mechanism of Mac OS X, known as Darwin, provides BSD networking via TCP/IP and accommodates the Apache web server.

The system requires a PowerPC machine with a least 256 MB of RAM. In theory, it can be used with other processors: in fact, the kernel of the system has been ported as OpenDarwin to the AMD/Intel x86 family of processors. However, it’s unlikely that Mac OS X can challenge Windows, as this could easily threaten the future of Apple’s own hardware products.

Mac OS X provides protected memory for each application, together with preemptive multi-tasking. Existing applications can work in OS X by using a reduced set of application programming interfaces (APIs) known as Carbon, although newer applications really should use Cocoa, the native OS X environment. The system also includes the Classic environment for running older non-optimised applications, although they don’t look like modern applications and can’t use many of the features found in the Carbon. environment. If any Classic application fails, all other such applications crash, but the system itself remains intact. The OS also incorporates a PDF-based graphics architecture known as Quartz and comes with support for Java applications, as provided by Java 2 Standard Edition (J2SE) and the Java Runtime Environment (JRE).

This new system doesn’t use the themes introduced with Mac OS 8.x. Instead, it incorporates a standardised environment known as Aqua. Many features in the Apple menu, as well as the application menu and control strip, have been discarded in favour of the Dock, which is positioned at one edge of the screen.

  Microsoft Disk Operating System (MS-DOS)

The Microsoft Disk Operating System (MS-DOS) and IBM’s similar Personal Computer Disk Operating System (PC-DOS), are both commonly known as DOS. This operating system derives from Control Program for Microcomputer (CP/M), a system used with Zilog’s Z80 and 8080 microprocessors. When the 16-bit version of CP/M, known as CP/M-86, was abandoned, many of its outdated features found their way into MS-DOS, probably because the software conversion process was undertaken in only six weeks. This system is very efficient in terms of memory and disk space, but is limited to a single user and doesn’t support multi-tasking. In addition, it presents the user with an unfriendly command line interface.

Used with the PC at an early stage, DOS was intended to be independent of hardware, since each machine had its own Basic Input/Output Services (BIOS) routines kept in an area of ROM known as ROM-BIOS. In practice, DOS is often tailored to match the hardware, using a software component known as DOS-BIOS. Version 2.0 of DOS imported several features from Microsoft’s XENIX operating system, another variant of Unix, and added the CONFIG.SYS configuration file for specifying software drivers. Finally, DOS 3.0 added a provision for sharing files over a network.

  Operating System/2 (OS/2 Warp)

This was IBM’s original multi-tasking replacement for MS-DOS, using a Presentation Manager to give a GUI similar to Windows NT (see below). Although OS/2 is designed for 32-bit operation, 16-bit applications designed for Windows 3.x can also be used, although their operation with this system is slower. OS/2 has been superseded by Windows NT.

  Windows

There are several versions of Microsoft’s Windows software. The older versions operate as a visual shell program that wraps around MS-DOS and provides a graphical user interface. Sadly, the ancient origins of the underlying DOS software and the PC itself can lead to complications. All forms of Windows are demanding, both on RAM and other hardware, making it impossible to use on older machines. Generally speaking, later versions work best on an Intel Pentium processor, usually used with Windows to create what’s commonly known as a Wintel computer.

The following variations of Windows may be encountered:-

  Unix

This system was originally developed in 1969 at the AT&T Bell Laboratories, as witnessed by the system clock that begins on January 1, 1970. The Berkeley Standard Distribution (BSD) version, also known as Berkeley Software Distribution, is the definitive form, with System V being the most significant revision. Unix is very stable, making it ideal as an Internet server. Its system ‘shell’ is text-based, allowing an advanced user to delve in and customise many of its features. Best of all, it provides preemptive multi-tasking as well as memory protection for each application. In its original form, Unix came with a simple command line interface, but modern additions, including MIT’s X Window, have given it a full graphical user interface. X Window also allows Unix to be used to run applications designed for a DEC or Sun Microsystems workstation.

Linux, a clone of Unix created by Linus Torvalds in 1990, can be used on any PC equipped with a 386, 486 or an Intel Pentium processor. And, if you don’t want to use Mac OS X, which is also based on BSD, you can run LinuxPPC on a PowerPC-based Macintosh or MkLinux on an older 680x0--based Mac. Other derivatives of Unix, such as FreeBSD, NetBSD, OpenBSD and Minix were less successful than Linux, although IBM also created their own version known as AIX. Today, Unix is normally used with an IBM PowerPC processor, the same device found in modern Macintosh machines, whilst the Mac’s latest operating system, Mac OS X, is also built around BSD.

Older Apple products include Apple/Unix (A/UX), a Classic Mac OS package that lets you run Unix applications alongside normal Mac programs, to which a GUI can be added using X Window. In addition, you can run Classic Mac OS applications on a Unix-based Sun SPARC workstation or other PowerPC-based computer by means of Apple’s Macintosh Applications Environment (MAE) or Macintosh Applications Services (MAS). MAE emulates an older 680x0-based version of the Mac OS while MAS supports PowerPC-native applications, but only if the machine has the PowerOpen version of Unix.

  Handheld Devices

A handheld computer, also known as a personal organiser or personal digital assistant (PDA), also needs an operating system. The most common organisers, including Palm products, the Handspring Visor and Sony ‘clones’, all use the Palm OS. Some versions of the Mac OS include Palm Desktop, a general-purpose application for organising information on the Mac. With HotSync software, such information can be synchronised between a Mac or a PC and a Palm OS device.

The now-defunct Psion Series 7, Series 5mx and Revo handheld devices use the EPOC 32 system, devised by Symbian, jointly owned by Psion, Matsushita, Ericsson, Nokia and other companies.

  Other Systems

Several systems have been developed for professional workstations, usually used as part of a larger network. Examples include Irix, for SGI machines, and Solaris, a 32-bit operating system with its own communications and networking software. The latter, devised by SunSoft for PowerPC-based Sun Microsystems workstations, has also been ported onto the PC platform to create Solaris x86.

The Virtual Memory System (VMS), from Digital Equipment Corporation (DEC) provided multi-tasking and multi-user operation on a VAX mainframe computer or a MicroVAX minicomputer. The latter included the famous PDP series, notably the PDP-1, PDP-6 and PDP-11.

Over the years, several CLI-based systems have bitten the dust. These include ProDOS, used in the original Apple II computer with its 6502 processor, and TRS/DOS or CP/M-80, both built around the old Z80 and 8080 processors. However, CP/M did go on to form the basis of MS-DOS.

  Mac Hardware

The Macintosh computer, introduced by Apple in 1984, was originally based on the ‘cutting edge’ 68000 processor. Apple’s revolutionary machine was unusual in that its system had a built-in GUI, making it highly efficient in terms of processor speed and memory. However, it was also a very quirky, having non-standard file structures and proprietary interfaces.

  Disk Formatting

The earliest Macs used Apple’s Macintosh Filing System (MFS) for 400 KB floppy disks. These were recorded using the non-standard group code recording (GCR) system, although Apple eventually adopted the universal modified frequency modulation (MFM) or double-density (DS) system for 720 KB double-sided (DS) and 1440 KB high-density (HD) diskettes.

When hard disks were adopted, the Hierarchical Filing System (HFS), latterly known as Mac OS Standard formatting, was used. When this became inadequate for large drives, Apple introduced the Hierarchical Filing System Plus (HFS+), also known as Mac OS Extended formatting. And in Mac OS X, you can also use Unix formatting for compatibility with Unix disk drives.

File Structure

All computers use a sub-system file on each disk, known as a catalogue or directory, that maintains information about all the files and where they’re kept. The Classic Mac OS uses one or two files, collectively known as the desktop file, to store information specific to the Finder, the Mac’s desktop environment. This ‘file’ also ties every application and its documents together by assigning a four-letter creator code and type code to each file. This ensures that every item appears with the correct icon and that double-clicking a document always launches its parent application.

Other computer systems, including Mac OS X to a degree, don’t use creator and type codes, relying instead on filename extensions. Unfortunately, if such an extension is incorrect or missing, the wrong application can be launched for the document, possibly causing the software to crash. However, at least the results with such systems are consistent. The Classic Mac OS can suffer even worse problems when the filename extension and the codes don’t correspond.

  Files

Most computer systems use flat files: in other words, each file seen by the user only occupies one actual file on a disk. However, the Mac uses up to two files, known as a data fork and resource fork, to represent each file. Although both forks have the same name, they’re treated differently by the system. The data fork usually contains information, as on other computers, but the resource fork stores special resources, such as icons, pictures or computer code that can be used by software. Therefore a document usually only has a data fork whilst an application only has a resource fork.

This makes the Classic Mac OS highly efficient, but has a distinct drawback: when files are transferred from this system directly over the Internet the resource fork is lost. To prevent this from happening, both forks of a file have to be encoded into a flat file using a system such as MacBinary.

With the arrival of PowerPC-based machines, Apple moved away from using resource forks. In a fat application, containing both 680x0 and PowerPC code, the older 680x0 code was left inside the resource fork, but the modern PowerPC code was placed in the data fork. And in Mac OS X resource forks are scrapped completely. Instead, groups of files are kept in a special kind of folder, known as a package or bundle, that’s seen as a single entity by the system and by the user.

  Interfaces

Most early Macs had unusual interfaces. For example, the original Mac had proprietary keyboard and mouse connectors, as well as RS-422 serial ports on 9-way miniature D sockets. Although the latter seemed non-standard, they accepted almost any RS-232 or RS-422 device and provided a +5 volt supply suitable for powering small accessories. In later machines, an 8-way mini-DIN connector was used, unfortunately without a supply circuit. This was rectified in the GeoPort version of the interface, provided via a 9-way mini-DIN socket that also accepted the older 8-way plugs.

Most ‘classic’ Macs had Apple Desktop Bus (ADB) connections. This unusual synchronous serial interface allowed daisy-chaining of a keyboard, mouse, other controllers and accessories. Apple also adopted ‘cutting edge’ SCSI drives, with external drives also connected via SCSI, employing a 25-way miniature D socket wired according to the Mac standard.

With the arrival of Universal Serial Bus (USB) and FireWire ports these older interfaces were abandoned. Apple’s own monitor port, using a 15-way miniature D socket, was also replaced by a standard SVGA port on a 15-way high-density connector. However, Apple hasn’t entirely given up on its own standards: some recent computers have an Apple Display Connector (ADC) for flat-screen displays, although this interface conveys perfectly standard signals, including USB data. Other models have a Digital Video Interface (DVI) port, sometimes in addition to an ADC output.

The later G5 models incorporate the faster USB 2.0 version of USB, ‘standard’ FireWire ports (also known as FireWire 400) and FireWire 800 connections.

  G3 and G4 Machines

Later Mac hardware is similar to a PC. For example, a desktop G4 (with a 7400 processor) has an ATI or NVidia graphics controller on an industry-standard Accelerated Graphics Port (AGP) card, as well as standard PCI slots. And Apple’s proprietary ports, as well as 10Base-T Ethernet, have been replaced by USB, FireWire and faster Ethernet connections.

Unlike the processors in G3 models, the Motorola 7400 incorporates AltiVec technology for multimedia support, competing with the MMX system used in Intel-based PCs. AltiVec, also known as Velocity Engine, provides 128-bit vector-processing, as well as 162 extra computer instructions.

Modern machines contain both North bridge and South bridge controllers, which are roughly equivalent to the Frontside Bus (FSB) and Backside Bus devices used in recent PCs (see below). The North bridge controller is connected directly to fast components such as memory and AGP or PCI slots. It’s also wired to the South bridge controller, which handles data to and from slower devices, such as USB and FireWire ports, networking circuits, audio interfaces and disk drives.

The connection between the two bridges often consists of the PCI bus itself, operating at 66, 100, 133, 166, 200 MHz or higher, although in G4 models it normally runs at 133 MHz. However, the actual PCI slots usually operate at 33 MHz, giving a maximum throughput of 286 Mbit/s.

In a G4 machine with a processor running at 733 MHz or higher, the RAM operates at 133 MHz or 166 MHz, while other devices are even slower. Both the fast 32 or 64 KB level 1 cache, which runs at the processor’s clock rate, and the level 2 cache, usually of 256 KB, are normally built into the processor. The final cache, known as a level 3 cache and having a capacity of 1 or 2 MB, usually runs at one-third of the processor’s rate and is often in the form of a separate device.

The performance of the 7400 processor doesn’t look too good in comparison to a modern PC. For example, a 3.02 GHz Pentium 4 has a 533 MHz FSB, transferring data at up to 4.3 GB/s, whilst a 1.42 GHz Mac G4 with its humble 166 MHz bus can only convey 1.3 GB/s. In addition, the 7400 employs 32-bit addressing, limiting the maximum amount of RAM to 4 GB. Although it’s possible to use virtual memory, this can be 40 times slower than real memory.

The G5 Computers

Apple’s G5 machines have a PowerPC 970 processor, an AltiVec-compatible device developed by IBM. The first G5 model has up to two such processors, each running at 2 GHz. Other developments include the use of an AGP 8× Pro slot, with its 66 MHz bus, providing a data rate of 533 MHz and a maximum bandwidth of 2.1 Gbit/s, as well as serial ATA hard disk drives.

One of the biggest breakthroughs is the FSB, which operates at an amazing 1 GHz. This also accommodates PCI-X slots, running at 133 MHz and giving a maximum rate of 2 Gbit/s. The use of 64-bit addressing also dispenses with the memory limit that exists on G4 machines. This gives a full address range of 18 exabytes, or 18 billion billion bytes. In practice, however, only 42 bits are used for memory addressing, which limits the maximum RAM to 4,000 GB or 4 terabytes (TB). At the time of writing, other physical limitations restrict the memory to a realistic 8 GB

  PC Hardware

The First PC

International Business Machines (IBM) launched its Personal Computer (PC) in 1981. It was based on Intel’s 8088 processor, a similar device to the 16-bit 8086 but with external 8-bit interfacing. Up to 640 KB of RAM could be fitted, whilst adding a hard disk drive converted it into an XT model. However, most machines had two 514 inch floppy disks, each of 360 KB capacity, one containing the operating system and applications and the other for storing data.

The interface between hardware and software, known as Basic Input/Output Services (BIOS), was kept in a special ROM known as ROM-BIOS. This dealt with power-on self-test (POST) and machine initialisation, input and output devices, disk drives, date-stamping of files and the machine’s ID byte code. The BIOS also accepted numbered interrupts from several sources, including the processor, standard PC hardware, the PC’s built-in software, DOS software and other applications. BIOS settings were originally kept in a battery-backed CMOS memory chip or in a Flash BIOS chip, the latter not requiring a battery. Whatever hardware was used, the setup software was given a name such as CMOS Setup or Setup Menu.

The processor addressed up to 65,536 external ports (not to be confused with physical ports), controlling anything from a serial interface to a sound device. The machine also had a direct memory access (DMA) controller, which allowed data to pass from one device (such as a disk drive) to another device without going through the processor, so saving processing time. An optional maths co-processor, also known as a numeric data processor (NDP), performed floating-point calculations, using 10-byte temporary real values. thereby giving an accuracy of 18 decimal digits.

The machine had five PC Bus slots that also accepted video cards such as a Monochrome Display Adaptor (MDA), Colour Graphics Adaptor (CGA) or an Enhanced Graphics Adaptor (EGA), the latter used for both monochrome and RGB monitors.

  Addressing

A processor with only 16 address bits would normally be limited to addressing 64 KB, including the RAM area. But the original PC used shifted addition to create a 20-bit address from two 16-bit addresses, so increasing the range to 1 MB and the maximum RAM capacity to 640 KB. To do this, the address segment number was shifted and added to the address offset so as to create a final address or absolute address, as shown in this example:-

ABCD0 + 1234 = ACF04

where ABDC0 is the shifted segment address and 1234 is the offset address. Note that the absolute address can be written as ACF04 or as ABCD:1234. Unfortunately, although some applications could use any number of the 64 KB RAM segments, others only worked in a single segment, whilst some were limited to one segment for the program itself and another for data.

The 1 MB range was split into 15 blocks, using addresses from 0×××× (0-block) through to F×××× (F-block). The 640 MB RAM was fitted into 0-block to 9-block, extended video memory was kept in A-block, standard video memory was in B-block and C-block was set aside for ROM expansion, although the latter was also used for the hard disk in the XT version, for EGA graphics and more. The remaining D-block and E-block were used for other purposes while F-block contained ROM-BIOS.

To get beyond the 640 KB limit, some PCs were fitted with expanded memory, not to be confused with extended memory (see below). The earlier extended memory used a bank-switched system that worked with 64 KB blocks of extra RAM.

  DOS Disk Formatting

In its original form, DOS used a fixed disk sector size of 512 bytes, with each sector identified by a 16-bit integer. This limited the maximum disk size to 65,536 × 512 bytes or 32 MB. Larger sectors could be used to avoid this limit, although this wasted disk space if there were numerous small files.

DOS formatting used 2% of the space on an original 160 KB PC diskette or 0.3% of a 20 MB hard disk. However, disks for special applications such as games, or where copy-protection was required, weren’t always formatted to the DOS standard. DOS formatting occupied four areas on a disk:-

32 bytes were used for each file entry in a directory, allowing 16 entries in each 512-byte sector. The original 160 KB diskette had 4 sectors in the root directory, which meant that up to 64 items could be contained at the root level. Similarly, a double-sided diskette had 7 sectors, increasing this capacity to 112 items, whilst a 20 MB hard disk had 32 sectors, allowing for up to 512 items at the root level. There was no limit, however, on the number of files in each sub-directory.

The IBM AT

The AT model contained the 80286 processor, better known as the 286, which featured an external 16-bit bus. It could operate either in real mode, in a similar way to an 8086, or in protected mode, when it would stop programs from interfering with the operating system or with any other applications.

Protected mode also gave extended memory, accommodating up to 16 MB of RAM, virtual memory (VM), giving up to 1 GB of extra memory, and hardware multi-tasking. Unfortunately, earlier programs didn’t work in protected mode and initially even MS-DOS didn’t work with VM. The AT also used an improved form of PC Bus, which also accepted older cards.

  Later IBM Models

The wide variations in PC hardware led IBM to standardise their computers, beginning with the Personal System 2 (PS/2), a successor to the less-notable PS/1. One significant introduction was the PS/2 port, used for keyboard, joystick or other types of controller. Some confusing video interfaces appeared with the PS/1 and PS/2 machines, including Extended Graphics Array (XGA), the subsequent XGA-2 and Multi-Colour Graphics Array (MCGA).

More recent 32-bit processors such as the 80386, 80486 and 80586 were soon commonplace. The original PC Bus slots found in older PCs were also replaced by newer AGP, ISA, EISA, MCA, PCI and VESA slots. And although some early machines came with a cassette port for loading and saving files via audio tape, this system soon dropped out of favour.

514 inch diskette drives didn’t appear in later machines, having been replaced by either one or two 312 inch devices, although some PCs produced in the 1990s were equipped with a 514 inch drive as well as a 312 inch drive.

  Modern Machines

Modern PCs often contain one of several versions of the Intel Pentium processor (with its Intel Inside trademark) or a low-cost Intel Celeron processor, although numerous other processors, such as the IBM 6x86MX, PR200 or PR233, have also been used. All modern devices incorporate Multimedia Extended (MMX) technology, designed to provide optimum results with multimedia material. At the time of writing, most new desktop machines have a 2.4 GHz Pentium 4 or better, although slower processors, including Celeron devices, still exist, whilst laptop models sometimes use a Pentium 3.

The system bus in Pentium 4 machines consists of a Frontside Bus (FSB), typically running at 533 MHz and connected to Double Data Rate (DDR) SDRAM memory chips (older machines use EDO-RAM), and a slower Backside Bus, also known as the expansion bus, host bus or local bus, which conveys data to other devices. A PCI bus, usually running at 133 MHz, can connect the two buses, although Via’s V-Link system and Intel’s Hub Link technology operates at a higher rate of 266 MHz.

A typical machine has a 512 K level 1 cache, as well as a 512 or 256 K level 2 cache, the latter usually located on the motherboard via a Card Edge Low Profile (CELP) socket or in the form of a ‘stick’ module. SGRAM video RAM is commonly used, although some machines employ part of the main RAM as video memory. Most modern machines contain an Ultra ATA or SMART hard disk drive and invariably have a ‘year 2000’ (Y2K) compliant version of the BIOS.

A typical PC has at least two standard serial ports, usually called communication ports, although with different connectors to a ‘classic’ Mac. Traditional machines also have one or more Centronics interfaces, also known as parallel ports, for connecting PC-style printers. As time progresses, these older interfaces are being superseded by USB or FireWire ports. An extra joystick, track ball or mouse can be connected to a USB port, communications port or PS/2 port, although older PCs may need an expansion card. If you want to point to the screen with a light pen you’ll usually need extra hardware.

The architecture of a PC was never intended to provide integral sound inputs or outputs, although most modern machines come with a sound card, typically of the SoundBlaster variety, or compatible hardware. In addition, some recent models incorporate a PC-TV system, complete with Teletext and a video capture facility.

  The DOS Environment

This brief introduction to DOS terminology and usage is designed for those readers who have not used anything other than a computer with a GUI. So, if you’re of a nervous disposition, you may prefer not to read this section. Fortunately, a knowledge of DOS is now rarely required, since Windows is employed on virtually every modern PC.

Getting Started

To use DOS you’ll need a printed list of commands and an understanding of the syntax. When the machine’s ready for a command it shows a command prompt, usually a flashing cursor. The PC’s diskette drive is identified by the letter A, a second floppy by B and an internal hard disk drive by C. Hence a machine with only a diskette shows an A:\> prompt but one with a hard disk shows C:\>. During some operations, other prompts appear, working like dialogue boxes in the Mac OS.

The following table gives more information about the letters used for disk identification:-

ID LetterDrive
AFirst or only floppy disk
BSecond floppy disk
CInternal hard disk •
DCD-ROM
EExternal hard disk
Not fitted in older machines

DOS stores files in the same way as any other computer system. Each volume (disk drive or drive partition) has a root directory, created during formatting, where all files are stored. This corresponds to the first window that you see when opening a volume in the Mac OS. At the ‘top level’, the user adds trunk folders (directories) and branch sub-folders (sub-directories), which appear as folders in the Mac OS. As you work on the machine you’ll also add leaves, the actual files.

Unlike later systems, DOS imposes a strict limit on the length of every filename. Only eight characters can be used in the actual name, which must be followed by a full-stop (period) and up to three further characters known as a filename extension. These extra characters identify each kind of file, connecting it to a ‘parent’ application. Only ASCII characters can be used in filenames, whilst a _ (underscore character) must be used instead of spaces. Under these restrictions, a name such as NEWFILE.TXT is acceptable but MYNEWFILE.TXT or NEWFILE.MSWD will be rejected.

Similarly, the names of DOS hard disks are restricted to 11 characters. This limitation can also appear on Windows-compatible disks that have been prepared on another type of computer.

  Command Structure

Each DOS command begins with a command name, frequently followed by parameters or switches that show how it should operate. The parameters can be used to select the item (such as a file or directory) on which a command or batch program (see below) will operate. A switch determines specific options, as, for example, in the switches that follow a PRINT command. The simplest type of switch is a / (forward slash) followed by a single letter. Here’s a more complex example:-

FORMAT A: /S /V

Commands can be piped, allowing the output of one command to feed the input of another command. In addition, wild-carding can be used to select several files according to parts of their names. You can then process the resultant group of files as a single item, an operation that’s impossible in the Classic Mac OS without special software.

Internal Commands

All internal commands are kept in the DOS command processor file, which has the name COMMAND.COM. The names of these commands can’t be modified and usually include:-

BREAK, CD or CHDIR, CLOSE, COPY, DATE, DEL or ERASE, DIR, ECHO, MD/MKDIR, REN or RENAME, PATH, PROMPT, READ or RMDIR, SET, TIME, TYPE, VER, VERIFY, VOL

Commands such as DIR and TYPE put information on the screen, whilst COPY and RENAME simply keep you informed of progress. If required, output redirection can be employed to retain any such information as a text (.TXT) file for later examination, whilst input redirection lets you prepare your commands as a text file that can be implemented later.

When the DEL command is used, only the file’s entry in the directory is removed. This is the same as throwing away a Mac OS file and then emptying the Trash. In fact, when DEL is used, the chosen file isn’t really deleted, it simply has the first letter of its filename changed to hex E5 (decimal 229).

DIR provides a directory list of the files in the current directory. A path is a list of directories you pass through to reach a file or directory. DOS uses a \ (backslash) to separate the adjacent directory names, as in:-

\DOCS\LETTERS\FD010708.TXT

which is an absolute path, since it begins with a backslash and starts at the outermost directory of the disk. A relative path, on the other hand, begins with a directory name and starts from the current directory.

External Commands

An external command can be kept in an individual file that has a filename extension of .COM, .EXE or .BAT. Such a command can be invoked by keying-in the filename of the actual file.

A .COM file, or image file, contains a replica of what’s to be loaded into RAM. This loads quickly, since conversion isn’t required, although it can be limited to 64 KB in size. An .EXE file, or executable file, on the other hand, has to be processed by DOS before it can be placed into RAM. It includes a table that tells DOS how its contents should be loaded into memory.

A .BAT, or batch file, similar to a macro or script in the Mac OS, contains a series of DOS commands or other instructions written in the batch command language. The file must be prepared as standard ASCII text and the machine must be told to execute it. Alternatively, you can use LOG to create a log file that you can run later as a batch file. Once you’ve issued a LOG command, just enter the required sequence of commands and stop the log when you’ve finished.

The AUTOEXEC.BAT file is a special batch file that’s launched at startup, setting many of the preferences for your PC. These preferences are kept as global variables, whilst temporary variables are used in the execution of other batch programs.

  User Interfaces

The method of human communication with a computer is known as the user interface. Unfortunately, most older computer systems employ cumbersome and non-standardised mechanisms that are difficult for a novice to understand.

The most common types of user interfaces are:-

Command Line Interface (CLI)

This off-putting mechanism appears in early mainframes and in older CP/M or MS-DOS microcomputers. It provides a prompt character and a flashing cursor that seems menacing to an inexperienced user. On a PC it looks like this:-

C:\>

Of course, this isn’t a problem if you know what to type. If not, you can waste hours leafing through incomprehensible instructions and lists of codes. And when you do enter something, you’ll often get an unhelpful error message. If you like crossword puzzles you’ll love this interface. Advocates of CLI favour the power and immediacy of keyboard control. Undoubtedly, you’re less likely to make mistakes, although, there again, you’re less likely to do anything!

Menu-based Interfaces

These interfaces let you choose from a selection of items, usually by pressing an appropriate key on the keyboard. The following systems may be encountered:-

Graphical User Interface (GUI)

The modern GUI, as created at the Xerox Palo Alto Research Center (PARC), uses pull-down menus that occupy part of the screen whilst a selection is being made. First used in the Apple Lisa, this idea was further developed in the Mac OS. The graphical interfaces in Windows and the Presentation Manager element of OS/2 are also based on the PARC concept.

Reference

MacWorld magazine (UK), IDG Communications, 2003

©Ray White 2004.