[comp.sys.atari.st] TOS <-> PC-DOS Disk interchange: Observations

XCG112@DBNUAMA1.BITNET (07/29/87)

Someone (Moshe Braner, I think) recently complained about having trouble
with 3.5" disk interchange between ST <-> IBM/PC. This specifically related
to subdirectories. Apparently, everything was fine until he tried to read
files which were inside a subdirectory.

Here is a related observation I've made:

   Situation: 1040ST: German TOS in ROM
              IBM AT-02: PC-DOS 3.2, DRIVER.SYS installed, disk formatted with
              standard MS-DOS 80 track 720 KB format

This has to do with the file attribute bits. Both TOS and MS-DOS use 8 bits
to specifiy attibutes, specifically:

        $08   -- file is Disk Volume label (VOL)
        $10   -- file is a subdirectory (DIR)
        $20   -- file has been written to and closed (ARC)

Now I discovered that sometimes PS-DOS likes to set the ARC bit when it
creates volume labels or subdirectories. So volume labels end up with $28,
directories with $30 as attribute byte.

TOS doesn't like this. Volume labels are treaded as empty files. One can erase
or rename them, but the disk is assumed not to have any label.

Worse, directories SOMETIMES are recognized, sometimes not. Maybe someone can
experiment a little further and shed some light on this. I think this could
explain the behaviour Moshe and others have encountered.

-------------------------------

And now: TOS bug report, episode 127, in which our hero finds ...

Did you ever wonder why the two dummy entries in a subdirectory ('.' for
"this dir", '..' for "parent dir") have such strange date/time stamps, usually
somewhere late in the 21st century ?? Well, I did.

Here's what I found out. The TOS programmers kept VERY close to the MS-DOS
disk format specifications. In order to do so, TOS has to swap the file date/
time stamp from 68000 integer format (HSB leftbound) to 8088/86/286 format
(low byte/high byte). And TOS faithfully swaps the integers every time it
writes date/time info into a directory entry.

Did I say "EVERY TIME" ??  Well ... you guessed it.


Bitnet:  XCG112@DBNUAMA1                              Volker A. Brandt
ARPAnet: XCG112%DBNUAMA1@WISCVM.WISC.EDU              (Bonn, West Germany)