LDOS and LS‑DOS: 2012 and Beyond – Technical information

written by Matthew Reed

The reason dates past 2011 aren’t allowed in LDOS and LS‑DOS relates to the way the year is stored in the TRS‑80 disk directory. All major TRS‑80 operating systems used roughly the same format for the directory. That format was derived from both the original Model I TRSDOS and VTOS 4.0 (both written by Randy Cook).

In the original date format (VTOS 4.0 and later), the date was stored in bytes 1 and 2 of a directory entry. Specifically, the file year was stored in three bits of byte 2. The maximum value that can be stored in three bits is 7, so the original allowed date range was between 1980 and 1987.

In 1987, LS‑DOS 6.3 and LDOS 5.3 were released by Logical Systems and MISOSYS to address the year limit. Extra space was needed in the directory to extend the dating, which both operating systems achieved by removing the access (also known as user) password. This new dating format became known as “extended dating” or “date converted.”

TRS‑80 operating systems provided a fairly sophisticated system of password protection. They offered five (later seven) levels of file access protection, with two passwords (access and update) per file. Most people used only one password, so removing one was viewed as an acceptable compromise.

Removing the access password allowed the date (and time) to be stored at bytes 18 and 19 of the directory entry in the space formerly used by the password. Five bits were used for the year, allowing a date between 1980 and 2011. For the sake of compatibility, they continued to store the lowest three bits of the year in byte 2. This ensured that older operating systems would see consecutive dates, even though they would still range from 1980 to 1987.

With 2012 is just around the corner, a new dating solution is needed, preferably one that maintains maximum compatibility and fits best into the spirit of LDOS and LS‑DOS. The problem is how do you fit more year bits into a directory format that is already full? One more year bit would allow dates from 1980 to 2043 and two more year bits would allow dates from 1980 to 2108 (although a two digit year effectively limits the range to 2079). But where can those two extra bits come from in a directory structure that is already full?

One way would be to to mark disks with post-2012 dating with a flag and reuse an existing data field, for example, the old year or the password protection levels. LS‑DOS 6.3 used this approach with a utility named DATECONV that converted the directories of old disks and marked them as being in the post-1987 disk format. But requiring a utility to convert post-2011 disks struck me as unnecessary and awkward. Besides, there are no more disk flag bits that are guaranteed to be unused.

Next post in this series: A solution.

Categories: General

Comments

Dusty Miller says:

Thanks for your dedication and all the hard work Matthew. I’ve put a link on the above site for the UK fans of your emulator. – A M1 running until 2079! unbelievable eh!
Regards
Dusty

Dan Gookin says:

I find it fascinating that folks are still using the TRS‑80. A Model III was my first computer, followed by a model 4P. The publishing house I worked at used Model IIIs extensively.

Trivia: The first program I had published (the only one, in fact) was a utility for Scripsit Pro back in the late 1980s. It was even included on the Scripsit Pro disk.

Our publishing house worked closely with Tandy. It was the Scripsit Pro programmer (and I forget his name) who told me that the future was with MS-DOS and the PC and not Tandy, which is why I sold my 4P and bought a used, original IBM 5150.

It’s cool to know that people are still into the TRS‑80. I loved that system. There were some great programs and tools. I have yet to see a debugger as nice as Commander 80. Anyway. Thanks for your post.

Dennis L says:

This is fantastic! Thank you! It amazes me the talent that’s still around, wielded by people who genuinely care about folks (like me) who still hang on to the things of our youth! THANK YOU!

Leave a Comment

All comments are moderated. The name and email fields are required, but your email address will not be published.

Thank you for commenting!