[Coco] edition byte

William Astle lost at l-w.ca
Sat Feb 8 12:13:17 EST 2014


On 14-02-08 09:51 AM, Gene Heskett wrote:
> If it is defined in the module header info in the source file, along with
> the MODNAME, then it should be legal to, say the last thing before the emod
> statement, have the
> macro as
> 	FCS MODNAME
> 	FCB EDITION
> end	emod

lwasm will not ignore it if you put the above in.

In fact, any assembler generating direct binary output will require that 
the edition by manually inserted exactly as above. That is because it is 
*not* part of the actual module header.

It is only when you are doing separate linking (for instance, rma/rlink 
or lwasm/lwlink) that the edition can be automatically added, and then 
it is done by the linker. lwlink does, in fact, support this. However, 
lwlink does support this. It requires putting some things into a special 
section called "__os9". This can be used to specify the module name and 
several other module features. The symbols supported in that section are 
"type", "lang", "attr", "rev", "stack" and "edition". The "edition" 
symbol might not be mentioned in the documentation, on reflection. These 
symbols are only recognized by lwlink if they are in the "__os9" section.

The edition can also be specified in a linker script but that starts 
getting unwieldy very quickly.



More information about the Coco mailing list