Steve,
I would like to suggest a different approach for os dependent items.
Instead of outputing asm to be compiled use a precompiled library and link to it.
Case in point cls.
I created an object file with this code
#include <stdio.h>
#include <curses.h>
// clear console screen linux
char ESC [2]={27,0}; // Escape
void cls(void);
void cls(void)
{
printf("%s%s%s%s",ESC,"[2J",ESC,"[H");
}
compiled with gcc -c cls.c
I then added it to a library with ar:
ar cr libbxbasm.a cls.o
I then linked this library when compiling test1.asm with this script:
~/jwasm/jwasm -elf -zcw -Fo=$1.o $1.asm
gcc -s -nostartfiles -o $1 $1.o /home/james/bxbasmx/bxblib/BxbLib.o -L/home/james/bxbasmx/bxblib -lbxbasm
Your console routines seem to be in spread out in more than one file. Your Do_color is in AVars.c while Do_locate is in AFunc.
Can these be moved to individual files, compiled, then added to a static library?
James