SYSTEM NOTEBOOKby·AJan BoydIOver the past six months we've seen in detail how to work withalmost all of the DOS commands in versions 1.0 and 1.1 of theoperating system. This month we'll take a close look at one of theremaining commands-mode.This is one of the more obscure commands in the system. Noteveryone needs to understand or even acknowledge the existence ofthis command, but as you become more proficient at using your <strong>pc</strong>,you'll undoubtedly run into a situation where you'll findmode handy-particularly when it comes time to expand your <strong>pc</strong>beyond its present capabilities.Mode exists in two different flavors, depending on which versionof DOS you have. Many users of DOS 1.0 reported problemswith mode, so version 1.1 of the operating system sported a new,enhanced mode command, one that offered many new and desirablefeatures and included everything that had been available on theearlier version. We'll restrict this discussion to mode as it exists inDOS 1.1.Mode , an external DOS command residing on the master disk, isdesigned specifically for use in configuring peripheral equipment. Itactually has several rather distinct uses, and we'll get into each ofthem momentarily; but first we should digress long enough todefine and discuss the concept of peripheral equipment.The term peripheral is a general one denoting any external equipmentthat can be attached to the <strong>pc</strong>. Generally such equipment interfacesthrough one of the card slots inside the computer. Any of thedevices attached to the <strong>pc</strong> through a slot can be thought of as a peripheral.This, of course, includes memory cards, video interfacecards, disk controllers, and the like-although these devices are sointegral to the system that they're seldom referred to as peripherals.The Outside Inside. The most general of all peripherals is theprinter; other examples include modems, graphics digitizers (alsocalled bit pads), analog controllers, speech synthesizers, mechanicalarms, music synthesizers, pen plotters, and joysticks. Usually, theuse of the computer for any so-called real-world application requiresthe addition of one or more of these peripherals.Many people quickly discover that the <strong>pc</strong> can be molded into avery effective word processor simply by the addition of wordprocessing software and a printer. In fact, many of the popular''dedicated" word processing machines are actually microcomputers,and internally some of them closely resemble the <strong>pc</strong>. All ofwhich really means that the term word processor has become more ofa way of describing the position in the market taken by the manufacturerrather than the capabilities of the machine.Many " word processor" manufacturers are now offering20computational abilities in software as an adjunct to the wordprocessing software that their machines were originally shippedwith; this is not the result of any technological breakthrough, butrather a reaction to today's increasingly sophisticated consumermarket. Similarly, many manufacturers of personal computers arenow offering word processing software packages along with theirpersonal computers. Both the preceding statements apply to IBM,among other companies. You can now do general-purpose computingon their dedicated word processing. machines, and, of course,you can use your <strong>pc</strong> as a powerful word processing machine.In order for a word processor to be effective, a printer must beadded to the basic computer system. There are essentially two typesof printers on the market, the dot-matrix type and the letter-qualitytype. There are also two methods of interfacing these printers to the<strong>pc</strong>-through a serial interface or through a parallel interface.The IBM printer, which is actually manufactured by Epson, is adot-matrix parallel printer, whereas most of the letter-qualityprinters from companies such as Nippon Electric (NEC) and Diabloare serial.The difference between a dot-matrix printer and a letter-qualityprinter is self-evident, although the difference between a serialinterface and a parallel interface is not-and is not well understoodby the average personal computer user. The difference lies in thenumber of bits of information transmitted at one time.Interfacial Bits. In a parallel interface the computer sendsinformation across eight parallel wires. This setup makes it possibleto transmit eight bits at a time. A serial interface sendsinformation serially, or one bit at a time. Obviously, the parallelmethod is faster, since it can send eight bits at once. However, theserial method is more common.There are two reasons for this apparent anomaly. The first isthat few computers use a. standard parallel interface, whereas mostcomputers have an interface card that allows use of the RS232-Cserial standard. Also, because of the nature of the circuitry required,serial lines can be run significantly longer than their correspondingparallel cousins-which means that noisy serial peripherals can beplaced in a room away from the computer.Therefore many peripheral equipment manufacturers offer theserial interface as a means of communication. This allows the use oftheir equipment on a large number of different computers.IBM offers what they call an Asynchronous CommunicationsAdapter, which is actually an RS232-C serial interface card. Thepurpose of this card, obviously, is to interface the <strong>pc</strong> to any of thegeneric peripherals that are available on the market. IBM does notsoftolk
currently offer a serial letter-quality printer, so information on howto attach such a device is sketchy in the IBM literature.The actual physical hookup is usually trivial, since most devicesuse standard connectors. On the other hand, the software modificationsnecessary to make a serial printer work with DOS are not soobvious. DOS is naturally configured to talk to a parallel printer(probably since that's what IBM sells), although a simple commandcan redirect the printer output to a serial device. This commandis mode.In DOS 1.0 the syntax model for the mode command wasMODE [LPT#:] [,n] [,m] [,T)where the square brackets enclose optional parameters. This form ofmode was replaced by a somewhat more elaborate version in DOS1.1. The new mode command actually has four different and distinct" modes" itself and is one of the most complex of all DOScommands.The first use for the command is in setting up a printer for differentline spacings and characters per line. In this use the commandtakes the formatMODE LPT#:[n][,m]Again, the square brackets enclose optional parameters. Thevariables are# the printer number-either 1, 2, or 3n the number of characters per line-either 80 or 132m the number of lines per inch-either 6 or 8The printer number allows the system to have more than oneprinter. For example, many people have both a dot-matrix parallelprinter, which they use for rough drafts of documents or graphicsrepresentations, and a letter-quality printer that they use for finalcopies. DOS actually allows up to three such devices, which is reallyoverkill.Use of the mode command for this purpose is easy. For example,if you wished to change the number of characters per line from80 to 132 and the line density from six lines per inch to eight linesper inch, you'd issue the commandMODE LPTI:l32,8DOS would then respond with the following messages:Resident portion of MODE loadedLPTl: not redirectedLPTl: set for 132Printer lines per inch setall of which indicate that the necessary adjustments have beenmade. (We'll come back to the " not redirected" message shortly;right now it's inconsequential, because it is just telling us that nochanges were made.)When you first turn on the <strong>pc</strong>, the default condition forprinter parameters is eighty characters per line and six lines perinch. You should only use the mode command in this context if youwish to change these to some other settings. The MX-80 printer,which IBM calls their 80 CPS Dot-Matrix Printer, is actually capableof printing in two modes, 80-column and 132-column, and twoline densities-six lines per inch and eight lines per inch.When you issue the mode command to change the defaultsetting from 80 characters per line to 132 characters per line, the <strong>pc</strong>reinitializes the printer and enables it to print in the condensedformat. This is particularly handy for printing on 8V2 by 11 paperthe ·sort of wide reports that are normally printed on 132-columnprinter paper.Many word processors do not allow text to be output to a printerin a format wider than eighty columns. This capability of DOS andthe MX-80 printer provides a convenient way to circumvent such alimitation. 'Since your CRT displays only eighty characters on a line,a word processor would need to be able to scroll horizontally as wellas vertically if it were to format on screen lines of more than eightycharacters.DOS includes a mini line editor that enables you to key andfor the IBM Personal Computer December <strong>1982</strong>modify entries into the command line interpreter. This is the editoryou would normally use to issue commands to DOS. Very conveniently,this editor also permits up to <strong>12</strong>8 characters to be enteredon a logical line (that is, on what DOS internally recognizes to be asingle line). Of course, the logical line cannot be displayed as asingle line on the video screen. After eighty columns (actuallyseventy-eight, in most cases, since_ DOS requires two characters forits prompt), DOS automatically scrolls down to the next physicalline and continues there. Once you reach the <strong>12</strong>8th character, DOSbeeps the bell and refuses to allow any more cha.racters to beentered-with the exception of the enter key (and a few controlcharacters that either backspace, cancel the line, or have the sameeffect as hitting the enter key).Typing Letters on the Fly. The fact that DOS permits a logicalline of <strong>12</strong>8 characters gives you a very cheap and dirty method oftyping letters, since you ca!'l create a file on the fly by means of thecopy con: filename procedure and then print it by typing controlPrtSc and then issuing the command type filename. This method ofsending text to the printer will work in either the 80-column or the132-column format, although DOS's limit of <strong>12</strong>8 characters per linewill prevent you from taking full advantage of the printer's 132-columncapability.One pitfall to watch fc;ir is the fact that if you type characters intoa file using copy con: and you go past the eightieth column withoutentering a carriage return, Db$ '.will appear to provide a carriagereturn for you. It only does this for the sake of appearance on screen,however, and if you try to print such a file in eighty-column mode,the printer, after printing the first eighty characters, will do a carriagereturn without a line feed. The net result will be that it willoverprint the characters at the beginning of the line until it encountersthe carriage return that you actually entered on screen. If youcommit this oversight, don' t despair. Simply change the printer21
- Page 3 and 4: going now.Craig Stinson . . . . . .
- Page 6 and 7: STARTING FROM ZERO?lMeet(The INSTRU
- Page 8 and 9: lA person considering the purchase
- Page 10 and 11: the Spectrum card you can interface
- Page 12 and 13: 10 softolk
- Page 14 and 15: Gib Hoxie, left, explains the featu
- Page 16: The client threw Hoxie out of his c
- Page 19: warmed-up car, and drive away in co
- Page 24 and 25: mode to 132 columns.If you prefer u
- Page 26 and 27: mode to 132 columns.If you prefer u
- Page 28 and 29: (start) 1000001 (stop) (stop)(start
- Page 30 and 31: codes. This-is actually a miniature
- Page 33 and 34: stead of just reading " You see rai
- Page 35 and 36: The Laws of Life••• • •
- Page 37 and 38: known multiphase oscillator is the
- Page 39 and 40: and changes for 1,103 turns. It lea
- Page 41 and 42: SIMPLICITY:THE ULTIMATE SOFTWARE SO
- Page 43 and 44: FOR EACH$YOU PUTINTAX ANNUAL TAX YO
- Page 45 and 46: enter a flush right format and then
- Page 47: enter information on the coins in h
- Page 50 and 51: Intelligent Statements, Holmes, PAK
- Page 52 and 53: International Software Marketing,Sy
- Page 55 and 56: $595 ·with 64KInstalled
- Page 57 and 58: to Logo's turtle graphics. It inclu
- Page 59 and 60: Iformats footnote calls, footnotes,
- Page 62 and 63: Ashton-Tate, Culver City, CAdBase l
- Page 64 and 65: GMS Systems, New York, NYPower-Base
- Page 66 and 67: Options-SO, Concord, MAOptions-80,
- Page 68 and 69: signed specifically for public acco
- Page 70 and 71: ment, fast assembler, general purpo
- Page 72 and 73:
hidden files, and a program that te
- Page 74 and 75:
dable to 256K. $499.Giltronix, Palo
- Page 76 and 77:
Cdex Trainingfor VisiCalc®Makes Vi
- Page 78 and 79:
Disk Drive Cover. Designed to prote
- Page 80 and 81:
An Index of Stocking Stuf fersHigh
- Page 83 and 84:
II systemicsby Larry ReaganThe Spar
- Page 85 and 86:
EIA RS-232. This is the standard us
- Page 87 and 88:
used to interface the filters to a
- Page 89 and 90:
Why pay h_undreds more fora four (a
- Page 91 and 92:
When Is Cloud NinePUh, Sometime Bet
- Page 93:
TRANSFORM YOUR IBM® TOTALLYGRAPHIC
- Page 96 and 97:
can backtrack up to eight pages to
- Page 98 and 99:
The Spelling Bee Is Over.Listen. We
- Page 100 and 101:
... ---··', ., · · · ···_,,
- Page 102 and 103:
If r,ou're smart, you'll buy your.
- Page 104 and 105:
IntegerRealCharBoolean·numbers wit
- Page 106 and 107:
able may hold. As a variable of typ
- Page 108:
came from. They'd probably find it
- Page 112 and 113:
mation Unlimited Software and lnfoc