Update on FastDraw-80. (computer program) Richard J. Wagner; Frederick J. Wagner.
Update On FastDraw-80
A reader has brought to our attention a typographical error in one line of our program FastDraw-80 in cLine Drawing Routines for the TRS-80,' p. 142 Creative Computing, July 1983. The corrected line appears in Listing 1.
In addition, we find that the version of the program we submitted will not work with 32K RAM. However, we have revised FastDraw-80 so that it can be used on TRS-80s with as little as 16K RAM. Listing 2 shows the lines to add or change. The major addition is a subroutine that will "patch' the machine language drawing routine after it has been loaded into memory.
The revised program allows the user to adjust the location where the drawing routine is built. The value of L in line 27 is simply set to the number of 1K (1024 or 0400 hex) increments to change the load point from the default 0C00 hex.
For example, if L is set to -4, the drawing routine will be built 4K lower at 45056 (0B000 hex), well within 32K RAM. (The highest address with 32K RAM is 0BFFF hex.) To move the routine as high as possible in 48K RAM, set L to +15. The user with cassette Basic and only 16K RAM can set L to -17 and use the alternate form of USR call shown in the listing.
The patch subroutine is called only if L has a non-zero value. It changes the most significant byte of the internal memory references of the drawing routine, based on the value of L. Users with disk Basic can save the routine on disk or cassette; they need patch it but once.
We apologize for any inconvenience caused to readers with 32K TRS-80s, and hope that users with under-32K of RAM will find the revised program useful.
Table: Listing 1.
Table: Listing 2.