[comp.sys.amiga.tech] AmigaDOS Hunks

jesup@cbmvax.UUCP (Randell Jesup) (03/09/89)

In article <927@myrias.UUCP> cg@myrias.UUCP (Chris Gray) writes:
>I think it may be even more obscure than that. I've been working, off and on
>over the last few years, on a game system which starts out by using LoadSeg
>to load some scenario-specific code (written in Draco of course!). Because of
>the special situation, that code doesn't need to be linked with any normal
>startup code. LoadSeg kept refusing to load it. I ended up having to have a
>dummy startup which did a JMP to the actual entry point. The funny thing is
>that the hack wasn't needed when the scenario code was compiled with my old
>Draco compiler. If you ever find out the real rules for makeing LoadSeg
>accept a file, please let me know.

	LoadSeg() will not load an object module, even if there are no external
references in it.  Object modules do not have HUNK_HEADER hunks at their start,
telling LoadSeg() what's coming.  In order to make an object module loadable,
just alink or blink it (FROM foo.o TO foo), which will add the HUNK_HEADER
(and check for unresolved references).

	Followups are directed to .tech

-- 
Randell Jesup, Commodore Engineering {uunet|rutgers|allegra}!cbmvax!jesup