A disk is for storing your information. The precise term for it is a “mini-diskette,” but in this book we’ll just call it a disk. It is far superior to tape, the other alternative.
A disk is especially designed to “file” your information so the Computer can immediately get the information you want. For you, this means storing and retrieving information—which takes a long time on tape—now can be done quickly and efficiently.
This book shows how to read and write on a disk. When we wrote it, we had three different groups of people in mind.
The first group includes all of you accomplished Radio Shack programmers. We are referring, of course, to those of you who learned to program by reading Getting Started with Color BASIC and Going Ahead with Extended Color BASIC. You’ll find Sections I and II of this book another delightful experience. If you’re especially ambitious, you’ll also enjoy Section III.
How about those of you who have never programmed and intend to use application programs written by Radio Shack or someone else? You’re the second group. Read Chapter 1, “To Get Started.” Then, if you’re interested in and want to take full advantage of your disk system, go on to Section I, “The Disk.” You don’t need to know anything about programming to understand it.
If you don’t belong to either of these two groups, you probably already know how to program disk systems. Read Chapter 1 first to find out how to connect your system. Then, go straight to the “BASIC Summary” at the end of the book. Everything is summarized there with page number references, for the things you want to read more about.
Among the various books I’ve read about the early days of home computing and what I call weekend scripting, this may be the most fascinating. If there is a field of scripting/programming that has abstracted itself far more than others, it is likely to be reading and writing data.
In my own programming, almost any complex data gets transformed into a problem solvable through SQL. The inclusion of SQLite in Perl and Python has vastly simplified handling data if I can transform the data to look even vaguely like records.
If it isn’t complex, it’s a text file. There’s pretty much nothing in between. And even in the reading of text files I have no need or desire to know what the disk’s format is. For all I know, the filesystem could be giving each line a kilobyte of disk space. I don’t care. I’ve got two billion kilobytes on my system disk alone.
The disk system described in this manual has about 160 kilobytes. It becomes much more important to know what’s going on underneath.
I know that I must have done a lot of data access programming for the TRS-80 Model 1 and then the Tandy Color Computer 3, but I remember very little of it. Possibly this is because the methods for writing and reading data were almost literally the same as the methods for writing and reading to the screen. PRINT and INPUT took buffer numbers; if left out, they dealt with the screen, if provided, they dealt with a disk device (or, as I recall, a print device). Even the new WRITE statement introduced in Disk Extended Color BASIC would write to the screen if the buffer number was left out. It was mainly provided for a more precise accounting of the data written.
Something else I’d forgotten, and it still doesn’t make sense to me: the manual says that the computer should be turned on before the disk drive is turned on. I’m not sure how this worked with things like Microware’s OS-9 that required booting from the drive. Perhaps it was necessary to reset the computer after everything was turned on. I have a suspicion that what I ended up doing was plug everything into a power strip, and leave everything turned on; then turned on the power strip to turn everything on at the same time.
Something I’ve not forgotten is the fragility of floppy disks.
Note: Your disk drives should be on the right side of your television set.
Even better, though, after emphasizing several times that you must not touch the bare portion of the disk, not dust it, not put it near anything magnetic, and so on, the manual says “All of this might sound a little gloomy to you, even if you are a careful person.”
There’s a great drawing of a floppy being tortured by a felt-tip pen.
This is where one might expect them, especially in a manual this breezy, to reassure the reader that it really isn’t that bad. But it really is that bad, so the manual goes on to say “This is why we’ve included a command called BACKUP.”
The manual is for the most part as well-written and easily-followed as the earlier manuals in the line, such as Getting Started With Extended Color BASIC. Anyone who programmed in BASIC would have been able, after reading this, to write programs that store and access data.
The book begins with simple tasks such as initializing disks, saving and loading programs, copying files and entire disks (the aforementioned BACKUP command) and in general everything you need to know to run programs, even if you aren’t writing them.
It then slowly ups the ante, showing how to write simple files, how to write more complex ones so as to save space, and even how to read and write to the directory sector by pulling entire chunks of sectors from the disk. For machine language programmers, the machine language routines are described, and where to look for results.
Sample BASIC programs include maintaining a checkbook, with separate programs for balancing them and sorting them—that’s one of the advantages of data files on a disk, you can have different programs do different things to the data—and even a grading program “ideal for teachers”.