
After many interations; these files have ended up generating object
modules directly.   The principal reasons for this were:


     1) Watcom-ASeMber is unstable.
     2) MicrosoftASeMbler has bugs; memory and symbol length limitations.


In an effort to minimize the effects of this; these modules have been
segregated so that translation back to some form of assembler will be
possible in the future.

The coupling of these modules is well defined -- each only uses
structures defined in standard headers (libc.h), plus (codegen.h)
and (omf.h).   There are no shared variables; and mkshlib converts
to structures defined in (codegen.h) before calling them.

Similiarly; ldfile.c (load-file-format) provides a buffer between
mkshlib and the QNX load file format.   Information herein is primarily
used to "pad" the code segment to an appropriate length.

The sub-directory asm/ contains sets of modules which produce the
'equivalent' code in "Gnu-ASM" format.   The functions invoke the
assembler via gas(const char *srcfile, FILE *obj);
which may be implemented as:

int
gas(const char *srcfile, FILE *obj)
{
	FILE           *fp;
	int             c;
	char            aoutf[32];
	char            cmdbuf[100];
	sprintf(aoutf, "/tmp/gas%d.o\n", getpid());
	sprintf(cmdbuf, "gas -o %s %s && aout2omf %s", aoutf, srcfile);

	if ((fp=popen(cmdbuf, "r")) == 0) {
		fprintf(stderr,"Fatal error assembling '%s'\n", srcfile);
		exit(1);
	}
	while ((c=getc(fp)) != EOF) {
		putc(c, obj);
	}
	fclose(fp);
	unlink(aoutf);
	return 0;
}


