[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Questions on EDASM reloc ($FE) files



John B. Matthews wrote:
In article <s4ednRYy3tldxqTZRVn-tA@comcast.com>,
 "Michael J. Mahon" <mjmahon@aol.com> wrote:


David Wilson wrote:

Oliver Schmidt wrote:


My
current thinking is that $FE is more of an intermediate file format
used solely by programmers using the EDASM toolkit - and thus they are
not existent on non-programmes machines.


I have just had a quick read of Chapter 5 "The Relocating Loader" in
the ProDOS Assembler Tools manual.
Relocatable files are able to be run from BASIC programs using the
RBOOT and RLOAD routines so are not an intermediate file and will be
found on non-programmer's machines.

I seldom have any disagreement with David'd posts, but in this case
I don't think there is a strong enough argument not to re-purpose
the REL filetype under Contiki.

RBOOT and RLOAD are very seldom-used under DOS 3.3 and virtually
unused under ProDOS (along with EDASM).


I seldom have any disagreement with Michael's posts, but I use EDASM all the time to maintain ProFORTH under ProDOS! OK, I don't use RLOAD at all:-)

Cool!  It's good to know that EDASM lives!

Further, since ProDOS
supports a hierachical file system, and Contiki programs are very
likely to be concentrated in a directory apart from any EDASM REL
files, the potential for confusion is so small as to be negligible.


This is very likely to be the case. A REL type file on a distribution disk (e.g. the Hires ToolKit) would be loaded by name using the USR(0) function set up by RBOOT. The RLOAD binary checks the type ($FE) of the named file; it uses the auxiliary type for the ORG of the first relocatable segment.

It looks like $FE (REL) is an EDASM relocatable code file, while $EE (R16) is an EDASM 816 relocatable code file. This suggests that it wouldn't be a GS/OS conflict.

Would it be reasonable for Contiki to use a suitable auxiliary type to disambiguate the usage? For example, type $E0 (LBR) is an library archive file: auxiliary type $0000 is an ALU file, while $8002 is a ShrinkIt file.


In any case, it would be prudent to include a validity check into
any routines accessing REL files, to provide some assurance that
they are what is expected prior to processing.  (I realize that this
is an unlikely addition for any EDASM REL file-processing programs,
but should be quite easy for Contiki-related programs.)


Contiki could check the auxiliary type for validity, while existing EDASM RLOAD wouldn't need to do anything different. I would advocate choosing an auxiliary type that would be an unlikely ORG of a relocatable segment: e.g. $FFFF.

That would be a good choice if the assembler can be convinced, but I
think it's REL file format is already settled.  At this point, it would
just be up to the "consuming" programs to check for what they expect.
It seems likely that any "loader" program would do some validity checks,
since they have the potential to overwrite almost anything if they work
"blindly".

-michael

Music synthesis for 8-bit Apple II's!
Home page:  http://members.aol.com/MJMahon/

"The wastebasket is our most important design
tool--and it is seriously underused."