[Coco] pacos9 ported to lwtools

Gene Heskett gheskett at wdtv.com
Sat Feb 8 11:51:45 EST 2014


On Saturday 08 February 2014 11:33:30 Tormod Volden did opine:

> On Sat, Feb 8, 2014 at 3:59 PM, Bill Pierce wrote:
> > Tormod,
> > The edition is not used by anything, though it is included in the
> > initial parity check when a program is loaded. It's just there for ID
> > puposes. In OS9 (any vers/level & any executable program) run "ident"
> > on a program module. You will see the "edition" number listed. You
> > will also see the revision number displayed in combination with the
> > attribute byte (usually "8x", x being the rev)
> > 
> > This info has NOTHING to do with the actual program or it's running
> > and as far as I know, OS9 does not use it. It's there as an internal
> > "edition" and "revision" number to ID different versions from each
> > other so you do not have to rename the different "editions" to
> > reflect build changes.
> > 
> > A sort of "version control" or "diff" if you will.
> > 
> > It may have been originally used on the original assembler/compiler
> > systems used by Microware to make the os9 system (for version
> > control). I seem to remember a 3rd party OS9 assembler that used to
> > advertise the ability to "update" the "edition/revision"
> > automatically as you made changes in the source and run it through
> > the assembler. I do know that it's a "required" part of a module
> > header and will be "zeroed" if you omit it in the source. Otherwise
> > the program will crash due to "incorrect header parity" (I think).
> 
> The "edition" is not part of the module header. Whatever it is, it is
> in the module body, after the module name. So it is not part of the
> header parity check. Just wondering if it was a standard (even if not
> mentioned in the NitrOS-9 Technical reference) and if lwtools should
> be extended to include it.
> 
> Tormod

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

and if lwasm ignores it, I would call it a bug.  You should be able to put 
them anyplace in the code after the headers parity byte.  Immediately after 
the rts, or a puls pc,list of regs so that they are never executed.

That said, I haven't been super religious about it, often the modules name 
is the first char after the header parity, followed by the edition, then 
the exec address table, a list of 3 byte entries. The exec address in the 
header must point to the first entry (the init) in this table else the 
getstt, setstt etc entries will not be valid.  If the module is larger, I 
may put that table down in the middle of the code so I don't have to use as 
many long branches, saving a byte per, and a memory fetch cycle for every 
short branch I can use.

> --
> Coco mailing list
> Coco at maltedmedia.com
> http://five.pairlist.net/mailman/listinfo/coco


Cheers, Gene
-- 
"There are four boxes to be used in defense of liberty:
 soap, ballot, jury, and ammo. Please use in that order."
-Ed Howdershelt (Author)
Genes Web page <http://geneslinuxbox.net:6309/gene>

NOTICE: Will pay 100 USD for an HP-4815A defective but
complete probe assembly.




More information about the Coco mailing list