TRS-80 DOS – MultiDOS: Part 6 – Q&A With Vernon Hester

Q & A With Vernon Hester

Given the evolution of the PC industry, in hindsight, what evolutionary steps could the TRS-80 (Z-80) have taken to maintained their dominance (this includes Z80 improvements, hardware, software, etc)

The 8-bit (16-bit addressing) microprocessors (8080, 6800, 6502, and Z80) can address only 64K of memory. An improvement to some of the 16-bit addressing families is a memory management unit (MMU) that enabled addressing up to 1M of memory (notably the HD64180/Z180). Although there usage could have extended the life of the TRS-80, software to effectively use this capability was non-existent. And, with the advent of microprocessors (Intel 8086) with 20-bit addressing (1M of memory) in 1978, computers with a limit of 64K were doomed; however, the Commodore 64 maintained a major market share through 1989 (Ref: Wikipedia)

The Model III, released in 1980, should have had twice the memory capacity and twice the CPU speed compared to the Model I that was released in 1978; and, the Model 4, released in 1983, should have had eight time the memory capacity and four times the CPU speed compared to the Model III. Perhaps, the Zilog development of the Z80 family hampered the TRS80 going to 14 MHz.

Here’s a simple chart of my “hindsight” on what the TRS-80 should have been:

 
Model I
Model III
Model 4
Year:
1978
1980
1983
Speed:
1.77 MHz
4.0 MHz minimum
5.1 MHz possible
8.0 MHz minimum
10.0 MHz possible
Keys:
53
59 full ASCII and CAPS plus num. pad and F1-F4
61 add ESC and CTRL plus num. pad and F1-F8
Memory:
48K
64K expandable to 128K
256K expandable to 1M
Clock:
Software
Hardware/battery backup
Hardware/battery backup
Spool:
N/A
Optional
Built in (256K min)
Hi-Res:
Optional
Optional
Built in

NOTE: Radio Shack peripherals never included a print SPOOLer. Hardware SPOOLers could have easily achieved four Megabytes by the end of 1984. I imagine a hardware SPOOLer requires a minimum of engineering; and, with no moving parts, would have an infinite life in the TRS-80 world.

The HD64180 microprocessor, released in 1985, should have been the chip used in the planned Model 5 instead of the Z800 that never came to be. By the way, the Z800 morphed into the Z280 in 1987 that bombed.


Dream System:

  • The Model 5, released 1986 (based on the ‘hindsight’ evolution)
  • HD64180/Z180 microprocessor with 1 megabyte of memory.
  • Add six keys: Delete, Home, End, Insert, Page up, and Page down.
  • New OS could extend file dating to 2107.

Radio Shack announces development of the Model 5 and urges all major software houses to start writing code for the new Z180 microprocessor. Radio Shack sells prototype machines to software developers on a first come first served basis for only the shipping and handling cost.

Summary:

  • Faster microprocessors
  • Full ASCII keyboard (minor – but an inconvenience)
  • More Memory – at least 256K
  • Give software developers a heads up on hardware modifications/upgrades

I have a perception that Radio Shack was simply arrogant when it came to the Model III and Model 4 and probably never heard of Moore’s law.

Radio Shack Model III apparent “errors”:

Model III TRSDOS developed by Radio Shack, albeit better than the initial release of the Model I DOS, was not media-storage compatible with Model I TRSDOS. All of the alternate DOSes had media-storage compatibility between the Model I and Model III. (The significant limitations and errors with Model I TRSDOS, created an opening for alternative DOSes to emerge.)

The Model III was designed to run at a microprocessor speed of ~2.03 MHz. Why only 2 MHz? The Model II released in 1979 was running at 4 MHz. Speed up kits enabled one to run the Model III at 5.07 MHz. Peter Ray (Anitek) designed a Model 4 speed up that ran the Microprocessor at (6.7/6.1/5.1) MHz and 2.03 MHz. Why couldn’t Radio Shack do ~4/2MHz. Oh, that’s the Model 4! The Model III boasted 14K ROM. For another 2K we got lowercase, faster cassette, and TIME$ – gee golly wow!

In addition, Radio Shack managed to screw up the new ROMs. Notably are the behavior in the 32 characters/line mode (0348H), the “safe” exit to basic via a JP 0072H (some people bypassed this and used 06CCH), the code to return the printer status at 05D1H, and the code at 02C3H – this was subsequently fixed because the Model III would go out to lunch if the key is pressed after keying SYSTEM. Is it because Radio Shack “explained” the behavior they did not have to fix the code?

My conclusion: The Model III should have been more than the Model 4.

Radio Shack Model 4 apparent “errors”:

The Model 4 still did not have a full ASCII keyboard. There is simply no excuse for this decision. LDOS is a decent DOS; however, many people dropped the TRS-80 line in 1983/1984 because of LDOS. Furthermore, Radio Shack and Logical Systems could not agree on a solution (cost) for the 1987 date limit in TRSDOS 6.x. Imagine if DOSPLUS, NEWDOS80, and MULTIDOS were still competing with LDOS. The date extension cost would have been zero!

My conclusion: The Model 4 is not much more than a souped-up Model I.

Overall:

With the boon years (1979-1982), Radio Shack could have created/managed a user group (ref: Heathkit) that would have provided a wealth of useful information. Of course, Radio Shack did not have to implement any of the user group’s ideas; however, Radio Shack would have had a much better idea where the industry was headed. Nevertheless, the 16-bit microprocessors trumped the 8-bit microprocessors about 1984. Zilog finally developed eZ80 in 2001. The eZ80 is an 8-bit microprocessor with 24-bit addressing: 16M linearly.

Too little too late: With VisiCalc available for the Apple II in 1979, the Apple II started outselling the TRS-80 by 1982. Radio Shack discouraged third party software developers and planned to develop all software internally or have external software developers design their software so it would only work with TRSDOS. Although VisiCalc was available for the TRS-80 in 1980 (that is too long after the Apple II), it was designed to work only with TRSDOS.

Finally, in 1985 Radio Shack sold the Model 4D with DeskMate (“D” for DeskMate). DeskMate had four useful and integrated functions – Database, word processor, spreadsheet, and a calendar. Kim Watt had that idea back in 1980!

What are some examples of your favorite Z-80 assembly “tricks” or techniques that you think fellow codes might appreciate.

Techniques

Know what and how instructions affect flags – especially the P/V flag. Flags don’t change randomly. i.e.,

  • LD A,(HL)
  • OR A
  • JR NZ,dog
  • OR A; you get here only if the zero flag is set

… is just as bad as …

  • XOR A

Use all four flags (Sign, Zero, P/V, and Carry) – I’ve seen code where there is a tendency to use the sign flag when the carry flag will do. A possible advantage of the carry flag is a conditional branch can use a jump relative (JR) instruction instead of a jump (JP) instruction. The JR instruction is only two bytes whereas the JP requires three. And, depending on the circumstances, the JR “may” be faster.

Involve the entire instruction set. i.e., don’t hold back so that the code may be used in an 8080 environment.

Don’t write ROMable code. Whoever ROMed their code?

Where possible use the DJNZ instruction vs DEC D, DEC E, or DEC C, etc.

Use conditional calls where possible.

Use a “MONITOR” to debug and/or enhance code. The use of a monitor can possibly enable you to detect redundant code and possible “masking”. i.e.,

 
27AB
LD H,B
 
 
LD L,C
 
 
JR NZ,cat
 
 
LD A,(boat)
 
 
LD H,B
;redundant (wastes 2 bytes and 8 “t” states)

This segment is 13 bytes.

 
1FC5
LD A,E
 
 
OR D
 
 
JP NZ,tiger
 
 
INC A
 
 
JR 1FCFH
 
1FCD
RST 10H
;there is a branch to 1FCD
 
 
RET NZ
 
&1FCF
LD HL,(LION)

“masking” enables you to reduce by one byte. And, saves two “t” states if DE is 0.

 
1FC5
LD A,E
 
 
OR D
 
 
JP NZ,tiger
 
 
DEFB 21H
;sequence hide the next two bytes
 
1FCD
RST 10H
;there is a branch to 1FCD
 
 
RET NZ
 
1FCF
LD HL,(LION)

The “masking” values HL with some arbitrary value. This is not a problem because the HL register pair is valued with the contents of LION with the next instruction.


What are your thoughts on the evolution of microprocessors and how current OS’s take advantage of their capabilities?

This is a question I am not qualified to answer. However, I do have an opinion. Microprocessor development in the 1980’s evolved to the point where they can completely replace code to perform algebraic addition, multiplication, division, trigonometric functions, square roots, logarithmic, and exponentiation in both single-precision and double-precision. Now they can perform string compare. This has enabled OS’s and applications to develop only the high-level algorithms and not bother with the primitive functions. Resulting in faster development of new applications.


Would you ever release your source code to the public domain so that others could learn from your code?

Yes.


Article Navigation:

Go back to …

Part 1: MultiDOS
Part 2: ULTRADOS Page
Part 3: MultiDOS v1.0 – v1.72 Part 4: MultiDOS v2.0 – v5.11
Part 5: Z’DOS and ESOTERIC

One thought to “TRS-80 DOS – MultiDOS: Part 6 – Q&A With Vernon Hester”

Leave a Reply

Your email address will not be published. Required fields are marked *