LDOS and LS‑DOS: 2012 and Beyond – A Solution
To extend LDOS and LS‑DOS file dating past 2011, I decided to use an approach that I devised back in 1993 when I was first writing PERUSE, my TRS‑80 file utility. My method stores the new date in the same fields in the directory without taking up any more space or taking away any more file passwords. This approach is automatically compatible with all LDOS/LS‑DOS disks and I have yet to encounter a file for which this dating scheme fails. (If you do, please let me know so that I can fix the problem.) With my patches, disks don’t even need to be converted but will just transparently store dates after 2011.
My patches also fix a problem occasionally encountered with LDOS 5.3 and LS‑DOS 6.3. If an older operating system was used to copy files onto a date converted disk, then the copied files will still have the older user password field. LDOS 5.3 and LS‑DOS 6.3 (which replaced the user password with date and time) will interpret that password as a garbled date and time. The patches check specifically for such files and use the older year instead (providing more accurate results than unpatched versions).
I needed to develop three versions of the patches for all the versions of LDOS:
- LS‑DOS 6.3.1 for the Model 4
- LDOS 5.3.1 for the Model III
- LDOS 5.3.1 for the Model I
The patches involve the directory update routine, the boot up date prompt, the DATE, DIR, and PURGE library commands, and the BACKUP utility.
I had expected that patching the directory update routine to store the post-2011 date would be the most difficult, but I devised an algorithm that ended up using less space than the original. The real problem, oddly enough, was the LDOS BACKUP command. This was the most difficult patch for two reasons:
- BACKUP is divided into overlays, which made consolidating code much more difficult.
- I needed extra code to fix a bug in BACKUP, also present in LDOS 5.3.0. (BACKUP wasn’t recognizing non-date converted disks.)
Installing patches, especially ones this extensive, is always a bit tricky. Rather than provide patched disk images of LDOS and LS‑DOS (which opens up copyright issues), I decided to add a new feature to TRSTools, my freeware TRS‑80 disk utility for Windows. Now whenever TRSTools detects an unpatched Model 4 LS‑DOS 6.3.1 or Model I or III LDOS 5.3.1 boot disk, it will prompt the user to install the patches. (This feature can be turned off in the Preferences menu.) It will automatically select the correct patches based on the disk type.
You can download the current version of TRSTools here:
Next post in this series: The Patch Files