FLEX Dates and Times

This page provides a detailed analysis of the past and present state of dates and times as used in the TSC 6809 FLEX (and similar SK*DOS) operating systems.

For dates, this is especially in regard to dates after 1999, since TSC designed the 8-bit Year field to only hold the lower 2 digits of a year. (You can read another brief analysis of Y2K and FLEX dates here.)

Time-of-day was/is usually not implemented in most FLEX systems, because TSC did not include a time field in FLEX directory entries, and because many/most FLEX systems did/do not have either a timer or a real-time-clock (RTC) to supply current time information.



FLEX Date

There are three main methods currently being used to encode values in the 8-bit Year field (at $CC10) in the FLEX System Date:

Various combinations of 2 of these 3 methods are also possible:

There might also be other date formats that I don't know about -- please contact me if you know of one.

However, the problem is that not everyone is using the same method. It is possible for programs that display or process dates to detect which method was used, but only for 1977..2047. This is because many encoded values outside of this date range can represent different years in different encoding methods. I created a preliminary version of a chart that shows this -- the boxes that are coloured yellow or red contain values that can be interpreted more than one way, so are ambiguous.

Another problem is that TSC's COPY program does not preserve the original date of file creation, but assigns the current date to the copy. This makes it almost impossible to determine if two copies of a file are the same, except by comparing them byte-for-byte, or calculating a checksum or CRC on both, then comparing these. Many years ago Bruno Puglia and Leo Taylor wrote an improved COPY program that does preserve file creation dates (and times), and also has many other useful features.



FLEX Time

Even though TSC didn't provide any field(s) in FLEX directory entries to store the time of file creation, several methods have been used, or are being proposed, to store this time. All of them use one or both of the bytes in a directory entry (at offsets $0C and $14) that are shown as "reserved for future system use" in the TSC FLEX Advanced Programmer's Manual:

There might also be other time formats that I don't know about -- please contact me if you know of one.

Almost all of the disk images I have seen have both of those "reserved" directory entry bytes set to $00 for all files. However, some SK*DOS disks do have a time entered for some files. I have heard that at least one system used one of those bytes for another purpose, but haven't seen an example yet.

Again, the problem is that not everyone is, or will be, using the same time encoding method. A few of the 65536 bit combinations are unique to one of these encoding methods, so the required decoding can be correctly determined. But most bit combinations are valid in two of the methods, and many even in all three (or five when including the sequence number variations), making it impossible to know for sure how to correctly decode them.

I have written a new DIR program that allows selecting which decoding methods to use for the file dates and times, or to show the actual raw binary values instead. It will also indicate if any value is incorrect for the currently selected decoding methods, or if the year value is ambiguous. Note that if both reserved bytes in a directory entry are $00, DIR will not display any time for that file, except in raw mode, as it assumes none was entered, even though that might not be the case, just that the encoding used values of $00/$00 to represent time at, or shortly after, midnight. (What, some programmers actually work on their computers after midnight?!)

I haven't yet verified whether the COPY program by Bruno Puglia and Leo Taylor preserves both of the "spare" bytes, or only the second one.

Fortunately, file time is most important for your own disks used on your own computer(s), where you have control over which date and time format to use, and where you might create several versions of a file on the same day. When disk images are given out to other people, or received from them, the file time is less important than the file date.

If you see anything on this page that needs to be corrected, or have additional information that I should include, or have any other comments, please let me know. I hope some of you found this page useful.


"FLEX" was a trademark of Technical System Consultants (TSC).
"SK*DOS" is a registered trademark of Star-K Software Systems Corp.
"MS-DOS" is a trademark of Microsoft Corp.

Use the Reload/Refresh button in your web browser (or Ctrl+F5 or Shift+Reload) to ensure you get the latest version of this page.
Last revised 2023-Jul-09 15:36 PDT.
Copyright 2022-2023 David C. Wiens.


Home   FLEX Plus 10   Contact   Site mapNo JavaScript!