[comp.sys.amiga] Further file format problems & minor BUG for C-A

bryce@COGSCI.BERKELEY.EDU (Bryce Nesbitt) (05/25/87)

In article <8705250320.AA18887@ingres.Berkeley.EDU> Doug Hatcher typed:
> BTW, although there is
> supposed to be a "moveq #0,d0  +  rts" in non-program executables,
> this is far from dependable.

That was stated for libraries, not guaranteed elsewhere.  It was also wrong.
The diskfont.library does not do this, neither does translator.library.


< Perhaps there is something about hunks that might straighten this out.
< Where are they documented???

The AmigaDOS technical reference manual. (pamphlet, really)
It *may* also be part of the Bantam books AmigaDOS reference manual.


< I can't find any method for distinguishing handlers from
< regular executables at all. Anyone know how?

They are *very* close.  When I wrote a handler I blindly followed the
instructions in Appendix G (Page G-7) and placed a long word with the 
length in LONGS of my single CODE hunk, and some magic at the end. 

	dc.l (end-start)/4
	...code...
	cnop 0,4
	dc.l 0
	dc.l 1
	dc.l 4
	dc.l 1

A BCPL program will have actual information in these slots, not just default
data.  See page G-7.  Can't help byond that.


> [descibes a method of searching for RTC_MATCHWORD]

This is a good method.  If you find that $4AFC you are looking a structure:

	WORD RTC_MATCHWORD
	LONG RT_MATCHTAG
	LONG RT_ENDSKIP
	BYTE RT_FLAGS
	BYTE RT_VERSION
	BYTE RT_TYPE		;!!NT_DEVICE or NT_LIBRARY
	BYTE RT_PRI
	LONG RT_IDSTRING
	LONG RT_INIT

This info came from Appendix K of the RKM.
--> SOME libraries, translator.library included, seem not to use the automatic
structure above.  Instead they call MakeLibrary from the code at the start
of the program.
--> Minor BUG <-- diskfont.library does not load A6, it assumes EXEC.  Thus
it crashes if called from the CLI.  It should exit gracefully.


> P.S. I still use uucp paths rather than domains because when I mail *out*
> using domains, they almost always fail, whereas paths [work]
> Don't blindly recommend that people use domain names[...]

I don't.  List both so people who have a machine that can deal with domains
will be able to enjoy the advantages of domain addressing, and those without
can still get mail to you. 
Domains are the future of mail, but it will never get better unless all the
"chickens" lay domain-based "eggs".  (obscure puns intended)

-------------
         Ack!  (NAK,EOT,SOH)
 |\ /|  .
 {o O} .  bryce@cogsci.berkeley.EDU -or- ucbvax!cogsci!bryce
 ( " ) 	  soon to be bryce@hoser.berkley.EDU -or- ucbvax!hoser!bryce
   U      BCPL?  Just say *NO!*
                    _____fireworks
   still           /
  standing     .:;:
    at
    50        /|\  /|\
     __      / | \/ | \    /\/\/\
==========================/====== 
[{ -|>  ==\___ | _  |    /
@(*&?(&@#@(*#&*&%&^%@&%@&%&%#&ver s