Classic Computer Magazine Archive CREATIVE COMPUTING VOL. 9, NO. 10 / OCTOBER 1983 / PAGE 24

TRS-80 model 4: more business oriented than the III. (evaluation) Stephen B. Gray.

Radio Shack's new 8-bit computer, the TRS-80 Model 4 replaces the Model III and is compatible with not just one, but with two operating systems, TRSDOS 6.0 and CP/M Plus. (It is also compatible with TRSDOS 1.3 and LDOS, but more about that later.)

Thus the user can run all the programs written for the Model III, and also the more than 3000 programs written under CP/M. Ont The Outside

From the outside, the Model 4 looks very much like the Model III, except that more of the control keys are white; there are some additional keys; the case is a different color; and the display holds more characters.

The Model III case was made of an opaque plastic sprayed with an aluminum-color paint that rubbed off all too easily. The cream color of the Model 4 case is molded in and is therefore permanent.

The additional keys are CTRL, CAPS, and the three function keys in the numeric keypad, F1, F2, and F3. CAPS locks the display into either upper- or lowercase and affects only the alphabetic keys. CTRL, used with other keys, provides a set of control commands in the same way the SHIRT and CLEAR keys do. For example, reverse video, which puts white characters on a black background, is enabled by CTRL-P. Display

The display is schizophrenic: run a Model III program and the screen shows 16 lines of 64 characters each. But boot up Model 4 TRSDOS 6.0, and the video shows i4 lines of 80 characters each.

There will be Model 4 software, such as word processing and spreadsheet programs, that uses the 80-column format.

The Model 4 characters are smaller, of course, to fit in the same screen area: they are 10 to the inch horizontally and 4 to the inch vertically, as compared with 8 horizontal and 2.5m vertical characters to the inch on the Model III.

Double-width characters can be displayed, as in the Model III, except that there are 40 to the line. Graphics Characters

Like the Model III, the Model 4 can display 64 graphics characters, which represent all the combinations of six pixels in a rectangle two across and three down. Twenty-six of the 64 graphics characters can be displayed using combinations of CTRL/CLEAR with alphabet keys. This means graphics can be put directly into strings or PRINT lines when writing programs.

However, only 51 of the 64 graphics characters can be entered from the keyboard using various control keys. So unless you can create your graphics with only those 51, you must use a program that stuffs graphics characters into strings or into PRINT lines.

You can't use SET and RESET to turn graphics pixels on and off, or POINT to test for their presence, because Model 4 Disk Basic doesn't have those commands. It has no graphics functions at all, other than CLS, which clears the screen. So if you want to create SET/RESET graphics on the Model 4, you must do it in Model III mode.

To make the Model 4 graphics situation really weird, the bottom two pixels in the six-panel graphics character rectangle are only half as high as the upper four (Figure 1). This makes for some odd-looking, highly unsymmetrical graphics. The short-legged graphics characters are, of course, the result of the increase in numbering rows from 16 to 24; there just isn't room for graphics characters of Model II height.

Display characters, whether letters, numbers, or graphics characters, are created by increasing the brightness of small sections of the horizontal rasterlines.

The graphics area is 6.25" high. In the Model III, those 6.25 inches encompass 200 raster lines. Divide the 200 by the 16 lines of characters, and you theoretically have 12.5 raster lines available for each graphics character. If the graphics characters are made 12 raster lines high and the characters are three pixels high, then each pixel is four raster lines high.

To squeeze 24 lines onto the Model 4 screen, more raster lines per inch are rquired, so a higher resolution raster display is used, with 250 raster lines in those 6.25 inches. Dividing 250 by 6.25 gives 10.4 raster lines per graphics character. It might have been possible to cut the pixels down to three raster lines in height, and thus produce graphics characters nine raster lines high, which would have been symmetrical, but then they would have looked quite different from Model III graphics.

The designers elected to leave the top two pairs of pixels in the graphics characters at four raster lines in height, and reduce the bottom pair to two raster lines high. Thus the top two-thirds are the same, but the bottom third of all graphics characters is short-legged. Function Keys

The three function keys arenht described in the Model 4 manuals, but an addendum sheet tells what they do in Model III mode. F1: "pause program execution" (same as SHIFT/@). F2: "leave insert mode and return to normal Edit Mode" (same as SHIFT/up-arrow).

F3: "erase last character typed" (same as left-arrow).

The addendum sheet doesn't say that in Model 4 mode, the three function keys can be used with INKEYS$, just like any other key. The decimal code for F1 is 129; for F2, 130; and for F3, 131. So you should write:

100 A$=NKEY$: IF A$=CHR$(129) THEN 180 ELSE 100 180 PRINT "KEY F1": GOTO 100 or something to that effect.

The question is: what do these three function keys do for you that other keys won't? Well, they let you perform those Model III mode operations with one key instead of two. and they can be "reserved for special applications," according to a member of Radio Shack's Model 4 Support Group in Fort Worth, hinting that future programs from Fort Worth will specify the use of the function keys, jsut as they do on the Model II/12/16. Model 4 Operating Systems

The TRS-80 Model 4 is compatible with several operating systems: TRSDOS 6.0, TRSDOS 1.3, LDOS, and CP/M Plus. This may sound complicated, but it really isn't: the first three have a close family relationship.

Radio Shack's first disk operating system, TRSDOS for the Model I, was written by Bill Schroeder. He later left Radio Shack and started his own software comapny, Logical Systems Inc., in Mequon, WI. His company's disk operating system for the TRS-80 is called LDOS, which stands for Logical Disk Operating Systems.

In a recent Logical Systems advertisement, version 5.1 of LDOS for the Model I and III is offered at $129, "reduced from $169."

Now the plot thickens. Look in a recent Radio Shack catalog for the Model I/III hard disk drive, and you will note that it says the "operating system enhances familiar TRSDOS commands with convenient hard disk features." Because TRSDOS didn't have any hard disk commands, Radio Shack found it easier to offer LDOS 5.1.3 for use with the hard disk drive than to create a new TRSDOS in Fort Worth.

Starting with catalog RSC-9, dated 1983, Radio Shack offers (p. 28) the LDOS "advanced operating system that offers the TRS-80 user many features and enhancements that are not included in TRSDOS .... Includes a Job Control Language to control an unattended computer, a terminal utility, keyboard typeahead, printer spooling to memory and/or disk, a printer output formatting program, and device independence--linking, routing, and filtering." Radio Shack's price for LDOS is, of course, $129. There are two versions, one for the Model I, the other for the Model III.

When you turn on the Model 4, the first display says "TRSDOS 6.0.0--Copyright 1983 Logical Systems Inc.... Licensed to Tandy Corporation." TRSDOS 6.0 includes a Job Control Language, and is substantially the same as LDOS; they are code compatible. Forty-three commands are common to both LDOS 5.1.3 and TRSDOS 6.0; nine more are found only in TRSDOS 6.0, and 13 others are found only in LDOS 5.1.3.

TRSDOS 1.3 is the operating system used by the Model 4 when in Model III mode. CP/M Operating System

CP/M stands fro Control Program/Microcomputers; it is distributed by Digital Research, Inc., of Pacific Grove, CA. CP/M Plus is a version created for 8088/Z80-base systems.

For a long time, CP/M was the only disk operating system around. It had unique features, such as being, for some time, the only relocatable operating system that could run on computers with memories ranging from 16K to 64K. This and other such features led to its becoming the standard DOS for 8-bit machines. And thus a large amount of software was generated to be run under CP/M.

Back in July 1979, the first item in my TRS-80 column (p. 112) said:

"Radio Shack has officially killed the idea of using CP/M on the TRS-80. There is no suitable way of relocating CP/M from the low end of memory, and CP/M expects I/O vectors at 0 to 100 hex."

That was over four years ago. Since then, many TRS-80 users let it be known that they wanted to be able to use the large library of CP/M programs available. So Radio Shack came up with the Model 4, which is compatible with the two different operating systems, TRSDOS 6.0 and CP/M Plus. CP/M needs 64K to operate in, which is why the Model 4 has a minimum 64K memory.

Curiously, although the Radio Shack catalogs and brochures say that the Model 4 will run under CP/M Plus, there is not a single mention of CP/M in the three manuals supplied with the Model 4. Job Control Language

JCL does a lot more than just "control an unattended compuer." It consists of TRSDOS commands, macros, and special symbols, which you use to create a JCL file, using the BUILD and DO commands, Scripsit, or a Basic program.

Some of the JCL macros are PAUSE (suspend execution, display a message), FLASH (flash a message on the screen a specified number of times), and INPUT (input a line of information from the keyboard).

JCL lets you write programs that do much more than just perform a calculation. As the name implies, they control an entire job, performing a variety of functions. You construct a sequence of commands and statements that control the action of the operating system and/or applications programs. For example, you could create a JCL file that shows you a directory, then loads Basic, runs a program--all automatically, initiated by a single command line.

(BUILD is also in Model III TRSDOS 1.3, for creating an automatic command input file that can be expected via the DO command. TRSDOS 1.3 also contains PAUSE.) TRSDOS 6.0

TRSDOS 6.0 has some interesting commands not found in Model III TRSDOS 1.3. These include:

* CLICK: A keyboard filter gives the keys a "click" sound when they are pressed.

* COMM: Lets two computers communicate via a defined device. This terminal program includes disk file send and receive, and modem support including 1200 baud.

* FILTER: Modifies data as they are read from or written to a device, for a particular application, such as altering printer output.

* MEMDISK: Lets you set aside part of the available RAM memory to function as a pseudo floppy disk drive that responds "keystroke-quick" rather than at the slower disk access speed. You can COPY, BACKUP, PURGE, and display the directory of MEMDISK files.

* REPAIR: Updates and modifies information on Model I TRSDOS disks to make them readable under TRSDOS 6.0. (Use CONV for Model III disks.)

* RESET: Returns a device to its original startup condition. Closes open files if given a file specification.

* ROUTE: Routes one device to another device, disk file, or to nothing (NIL).

* SETKI: Sets the keyboard repeat rate and delay parameters.

* SPOOL: Permits printing data while performing other operations, such as writing a Basic program.

* SYSGEN: Creates a configuration file to store information about the way your system is set up.

* TAPE 100: Lets TRSDOS 6.0 read a Model 100 cassette tape file and write it to Model 4 disk as an ASCII file, or read a disk file and write it as a Model 100 tape file.

* VERIFY: Turns the verify function on and off. When verify is on, TRSDOS reads the data it writes to disk to verify that the data are readable.

TRSDOS 6.0 allows you to assign strings to the alphabetic keys, so you can enter often-used TRSDOS or Basic commands with a single keystroke, to speed up your programming.

TRSDOS 6.0 sorts directory listings alphabetically by filename. It also includes the FORMS command, which sets up printer parameters to let you tailor printouts and handle preprinted forms. You can change the number of lines per page, set margins, set page lenght, indent, and perform other similar word processing-type functions.

Someone must have felt that the KILL command, for deleting specified files from the disk directory (to free the disk space for other uses) sounded too blood-thirsty. In TRSDOS 6.0, this function is now called REMOVE. But KILL still exists in Model 4 Disk Basic. Model 4 Basic

The Basic for the Model 4 is a new Microsoft version. It permits 40-character variable names. That is, the first 40 characters of a variable name are considered significant. In Model III Basic, only the first two characters of a variable name are significant.

Some of the new and interesting statements and commands found in Model 4 Basic are:

* COMMON: Passes one or more variables to a chained program.

* CHAIN: Loads a Basic program, chains it the main program, and begins running it.

* WHILE/WEND: Executes a series of program statements in a loop for as long as a given condition is true.

* WAIT: Suspends program execution until a machine input port contains a specified value.

* WIDTH: Sets the line width for printing on the display or on a printer.

* DATES$: Returns the current system date.

* ERRS$: Returns the number and description of the most recent Basic disk-related error.

* HEX$: Calculates the integer hexadecimal value of the number specified, and returns the value as a string.

* ROW: Returns the current vertical (row) position of the cursor on the display.

Some of these are taken from Model II Basic. Some of the Model III Basic statements and commands not found in Model 4 Basic include all 15 CMD functions (such as CMD "Z" to duplicate the output to display and the printer), and the cassette statements CLOAD, CLOAD?, CSAVE, INPUT#-1, and PRINT#-1. Sound

Although the Model 4 brochure says the computer has sound ("obtainable from Basic with sound command including tone and duration"), somehow it got left out of the Model 4 manual.

Model 4 sound is programmed just like the TRS-80 Color Computer sound: using SOUND F,D where F specifies the frequency, and D the duration. However, Color Computer sound is meant to be used for creating music as well as sound effects, so both its F and D range from 1 to 255.

Model 4 sound is meant only to be used to "signal a business alert," as one Computer Center salesman put it. The frequency ranges from 0 to 7, the duration from 0 to 31.

Musically, the eight tones range from C to G-sharp, omitting the E.

There may be some tunes you could play with this two-thirds of an octave, but I didn't spend much time trying to find them.

With a duration of 0, a tone is sounded for about 1.5 seconds; with a duration of 31, about 12 seconds.

The range of frequencies and durations permits you to write a variety of "business signals" similar in function to Army bugle calls that sound reveille, chowtime, and charge. You could have each error condition play its own little tune, a few notes to let the operator know there is a "device in use," "disk space full," or "out of data" problem. Manuals

Three manuals and a quick reference guide are packed with every TRS-80 Model 4. One has been around for a couple of years, Getting Started With TRS-80 Basic: For use with Models I & III. The other two are new, for the Model 4. Introductory Manual

so that the new computer users won't panic at the sight of a huge manual, Radio Shack has included a nice little 45-page manual--actually more of a booklet--"Introduction to Your Disk System: TRS-80 Model 4."

This manual is full of drawings and examples, and is designed for beginners. It shows, simply and carefully, "how to set up the Model 4, how to use important commands, how to run application commands, how to run application programs, how to store information, and what to do in case of trouble."

The seven chapters cover How Computers Work, Getting to Know Your Model 4, Running Application Programs, Learning to Program in Basic, In Case of Trouble, and That's Just the Beginning. That last chapter gives a peek at some application programs, other languages, some other TRSDOS commands, and operating systems.

The application program described in Chapter 4 is MailList, which is provided on the TRSDOS disk. The user learns how to enter names and addresses, change or delete them, list them, and copy the disk file to another disk. MailList is handy for teaching the basics of interacting with a simple application program, and can also be used "for real." Model 4 Disk System Owner's Manual

The 486-page looseleaf model 4 Disk System Owner's Manual consists of three sections: TRSDOS, Basic, and 11 appendixes.

The TRSDOS section is different from the Model III TRSDOS manual, mainly in that much more information is given. The 142 pages are devoted to 44 commands, as compared with 60 pages covering 35 commands in the TRSDOS 1.3 manual. The description of commands that are the same on the two computers have been rewritten and expanded, adding helpful information.

The Basic section combines what the Model III manual provided in two pieces: a bound volume called Operation and Basic Language Reference Manual and 65 looseleaf pages on Disk Basic. The tutorial section on Basic Concepts is taken unchanged from the Model III manual. It is unfortunate that this section wasn't also expanded, because more information is needed in several areas, such as logical operators, which get only one page.

The appendixes cover Job Control Language, Model 4 Hardware (technical specifications), Character Codes, Error Messages, Converting TRSDOS Version 1 Programs to TRSDOS 6.0 Programs, Basic Keywords, Basic Worksheets, Glossary, five brief TRSDOS programs, Basic Memory Map, and Using the Device-Related Commands.

Although it provides more information, the Model 4 Disk System Owner's Manual is printed from typed pages, and thus isn't as elegant or quite as easy to read as the typeset Model III manual. Quick Reference Guide

The Model 4 Quick Reference Guide is much more extensive than most other such TRS-80 guides. Its 38 pages provide information on Startup, TRSDOS Commands, Utilities and Error Functions, Control Keys, Operators, Edit Commands, Special Characters, Error Messages, and Internal Codes. Three Models

The 4 comes in two 24-line disk models: with 64K of RAM and one disk, at $1,699; with 64K, two disks and RS-232C, $1,999. A 16K cassette-based starter system, displaying 16 lines on the screen, running Model III Basic, and without disk drives, is $999. The internal RAM memory of the disk models can be expanded to 128K with a $149 64K RAM kit.

The Model 4 prices do not include Model III TRSDOS 1.3 or CP/M Plus system disks. You get one system disk, the Model 4 TRSDOS and Basic Interpreter. Although the RSC-9 catalog doesn't mention it, there is a Model III TRSDOS 1.3 system disk available for $14.95, catalog number 26-0312. The CP/M Plys system disk for the Model 4 wasn't available at this writing, nor had an availability date been set.

I have heard that there is a special 48K version of the Model 4 for schools, with an RS-232C interface, no disk, and a special ROM, configured for the Network 3 Controller that connects up to 16 Model 4 student stations to a teacher's "host" system.

A Model 4 Upgrade Kit ($799 plus installation) converts a Model III to a Model 4, except for the cabinet, disk drives, and CRT. It includes a new keyboard, CPU board, 64K RAM, sound, TRSDOS 6.0, and Disk Basic.

Bit-mapped high-resolution graphics cost less for the Model 4 ($249.95 plus installation) than for the Model III ($369.95 plus installation). This is because some of the required hardware is already in the Model 4. The hi-res package includes a Graphics Basic with commands like PAINT, LINE, and CIRCLE, to simplify creating graphics.

The Model 4 operating speed is also schizophrenic. It uses a 4-MHz clock rate in Model 4 mode, but the 2-MHz rate of the Model III when operating in Model III mode.

To operate Model III software, the Model 4 contains a Model III ROM. Thus TRSDOS 1.3 runs on the Model 4 without changes. The Bottom Line

The TRS-80 Model 4 is more of a business computer than the Model III, and many are being bought as executive computers. The Job Control Language permits it to work unattended after business hours. And the Model 4 runs programs written for it twice as fast as the same programs written for the Model III.

Many students of engineering, science, and mathematics are buying the Model 4. (Some students, who can afford a more expensive computer, and who don't feel challenged enough by the Model 4, are buying the Model II.)

The Model 4 appeals to a broader market than the Model III because it can run CP/M programs, displays 24 lines of 80 characters, and has more memory. It fits into the TRS-80 product line between the superseded II and III; the Model 4 does all the III could and some of what the II could do, because it has more memory and a better and faster disk operating system, TRSDOS 6.0, which has more functions than TRSDOS 1.3.

For anybody, whether businessman or student, one of the biggest attractions of the Model 4 is its ability to run programs written under three different operating systems--TRSDOS 1.3, TRSDOS 6.0, and CP/M Plus--which makes more programs available for the Model 4 than for any other Radio Shack computer.

Products: TRS-80 4 (computer)