[comp.sys.apple2] FSTs

johnmac@fawlty.towers.oz (John MacLean) (06/15/90)

Has anyone out there dissassembled an FST?
Apple will not release docs, and so far have not provided us
with what we need, so I though it is about time someone went
and got it.

I had a quick look at PRO.FST the other night.
It starts something like this:

      PHK
      PLB
      CPX     #MAX_COMMAND_FOR_THIS_FST*2
      JSR     (COMMAND_TABLE,X)

This might be a JMP, I cannot remember.

Anyway, MAX_COMMAND_FOR_THIS_FST is about $33 for PRO.FST, much smaller
for CHAR.FST.
It seems they just add new commands if needed and then change GS/OS.
This is why they do not want to release docs - so DTS usually responds.

Anyway, most of these routines are probably relatively simple (given that
there are so many).
They would be things like:

INIT
SHUTDOWN
TRANSLATE FILENAME
OPEN FILENAME
CLOSE FILENAME
GET NEXT DIR ENTRY

etc.

Basically all the calls needed to support the GS/OS calls, plus a few
housekeeping ones.
When I wrote my readers/writers for DOS 3.3/Newsroom Disks/HFS/MFS, I
tried to arrange things this way as well, so a translation to an FST
would not be difficult given that the call parameters were available
(ie: I/someone worked them out).
 
Anyone got a start on this yet?
The Y register also appears to be set on entry, as it is used by several
routines early on (before being otherwise set), but I do not know what it
means.

There is probably also a header on the FST file so it can be recognised,
apart from its filetype/auxtype. Any ideas?

As a first objective, it would be nice to get a FST file added to the
system which would not crash the system.
Secondly we would want to be able to recognise volumes.
Thirdly we would want to be able to scan directories and translate
filenames.
Finaly you would worry about supporting the file level calls.

BTW: Please do not start another "Apple should give us the info" /
"Apple should develop some more FSTs" series of postings; we have been
through all the issues before. Only follow up if you could or have
dissassembled FSTs, or have something useful to add.

John MacLean.
-- 
This net: johnmac@fawlty.towers.oz.au                   Phone: +61 2 427 2999
That net: uunet!fawlty.towers.oz.au!johnmac             Fax:   +61 2 427 7072
Snail:    Tower Technology, Unit D 31-33 Sirius Rd,     Home:  +61 2 960 1453
          Lane Cove, NSW 2066, Australia.

cwilson@NISC.SRI.COM (Chan Wilson) (06/17/90)

In article <216@fawlty.towers.oz> johnmac@fawlty.towers.oz (John MacLean) writes:
>Has anyone out there dissassembled an FST?

I haven't taken more than a cursory glance at the PRO.FST; at the time I had
just gotten into '816 coding and got lost rather quick.

>Apple will not release docs, and so far have not provided us
>with what we need, so I though it is about time someone went
>and got it.

Yea!

>I had a quick look at PRO.FST the other night.
[...]
>It seems they just add new commands if needed and then change GS/OS.
>This is why they do not want to release docs - so DTS usually responds.

Most likely. Although, I believe the entire concept of going to a system
such as GS/OS is to get away from having to do an entire re-write/update
of everything to incorporate new changes.  

>Anyway, most of these routines are probably relatively simple (given that
>there are so many).
[..]
>Basically all the calls needed to support the GS/OS calls, plus a few
>housekeeping ones.

Right.. sounds appropriate, but what would you classify as housekeeping
routines... INIT, SHUTDOWN, etc?

>Anyone got a start on this yet?
Not me, although I think it's time to take another look at the issue now.

>There is probably also a header on the FST file so it can be recognised,
>apart from its filetype/auxtype. Any ideas?

Nope.  My first thought was that you'd have to get into GS/OS enough to 
decipher the header; what you really need to do is to create an isolated
system (GS w/1 3.5") and go change bytes, and see what happens...

>As a first objective, it would be nice to get a FST file added to the
>system which would not crash the system.

1.5: handle fst calls and determine what they are intended to do,
     also, what they are intended to return.

>Secondly we would want to be able to recognise volumes.
>Thirdly we would want to be able to scan directories and translate
>filenames.
>Finaly you would worry about supporting the file level calls.

I think the first 2 (1 & 1.5) steps are going to be the most difficult.
The other steps have been accomplished already, all that is needed is
integration into the FST.  

>John MacLean.
>-- 
>This net: johnmac@fawlty.towers.oz.au                   Phone: +61 2 427 2999

--Chan
			   ................
    Chan Wilson -- cwilson@nisc.sri.com <!> I don't speak for SRI.
Janitor/Architect of comp.binaries.apple2 archive on wuarchive.wustl.edu
			      "a2fx it!"
			   ................