Machine Language Disk I/O and Other Mysteries

written by Matthew Reed

Title:Machine Language Disk I/O and Other Mysteries
Author:Michael J. Wagner
Publisher:IJG, Inc.
Publication date:1982
Buy it from Amazon
Low-level floppy disk access was one of the most advanced programming topics on the TRS-80 Model I and III. The floppy disk controller was documented in technical reference manuals, as was the TRS-80 disk interface itself. But translating that information into reliable disk access routines wasn’t easy. All disk operating systems and low-level disk utilities did it, but the difference between working and excellent implementations was great. Kim Watt (with Super Utility) and Vernon Hester (with MULTIDOS) proved that it was possible to write fast and bullet-proof disk routines, but the methods they used weren’t documented anywhere.

Machine Language Disk I/O and Other Mysteries by Michael J. Wagner, volume 5 in IJG’s TRS-80 Information Series, was one of the few sources of reliable information about low-level TRS-80 floppy disk access. It cost $29.95 when it was released in 1982. A 1983 review by John B. Harrell, III in 80 Micro described it as an “expertly assembled, compact, and fact-filled book” and “a perfect reference source for any programmer who would like to try his hand at disk I/O programming.”

The book contains nine chapters and two appendices.

  • Chapter 1 serves as an introduction to terms and principles.
  • Chapter 2 shows how to select a floppy drive for access.
  • Chapter 3 shows how to move the drive head.
  • Chapter 4 shows how to read and write from the floppy.
  • Chapter 5 ties together the concepts for a complete disk I/O routine.
  • Chapter 6 shows how to use higher level TRSDOS disk routines.
  • Chapter 7 shows how to use disk interrupts.
  • Chapter 8 contains some “handy routines.”
  • Chapter 9 contains some miscellaneous information and the source code for S/OS, a “Small Disk Operating System”
  • Appendix I contains “The Best Term Program in This Book”, which is a complete terminal program for the Model I.
  • Appendix II contains the data sheets for the Western Digital disk controllers used by the TRS-80 Model I and III

The first seven chapters contain information specific to the Model I, but include chapter supplements showing the differences with the Model III. Unlike some books that split Model III support into separate sections, the Model III supplements in Machine Language Disk I/O and Other Mysteries aren’t afterthoughts and stand on their own. In particular, Chapter 7, which describes floppy interrupts (which were nearly unused on the Model I but heavily used on the Model III), has a supplement much longer than the main chapter.

The only major omission in Machine Language Disk I/O and Other Mysteries is any mention of double-density on the Model I. Methods for programming the Percom Doubler or Radio Shack Doubler aren’t discussed.

The preface to the book mentions that the author wrote his own disk operating system “to be released as EZ/DOS in the coming months”. The TRS-80 disk operating system market was pretty saturated at that time, and I’ve never heard any other mention of EZ/DOS.

Categories: Books