Data tables for a software tool

Ludis Langens ludis at cruzers.com
Tue Sep 26 09:52:01 GMT 2000


I'm slowly writing an ECM related software tool.  When it is ready, I
plan to release the source under a GNU style license.  I would like to
make this tool portable across multiple operating systems and processors.

The code will soon be at the stage where I need to add lots of data
tables to this tool.  I want the data tables built into the tool, not as
a seperate data file.  I need to find a portable way to do this.

The data could be written as initialized C data structures.  However, I
haven't encountered an environment where this is space and speed
efficient.  Also, I expect the tables to enventually be bigger than some
environments can handle in their global data space.

In the past, I've solved this by defining the data in an asm file and
telling the assembler to place it in the "code" space.  The C compiler
thinks it is referencing global data, the linker thinks the compiler is
generating a function pointer, and it all works happily ever after.  I
don't know how portable this trick is.  At a minimum, the data would
need to be written using assembler macros so that different assemblers
could handle the same source file.  The assembler specific macros would
translate to each asm dialect.

I would prefer to create the data tables using a sort of "data compiler"
I have.  This would allow for the most editable table source code. 
Unfortunately, this compiler is specific to my development environment. 
This would mean that the data table source could only be edited by
someone with access to the same development environment I have.  This
compiler's output could be converted to a raw data block which could be
moved to other development platforms though.  Another negative is that
the raw data would have a specific integer "endianess" baked into it,
although it is possible to write a special purpose tool to flip all
multibyte values in the data.

Any suggestions as to how I should proceed?

-- 
Ludis Langens                               ludis (at) cruzers (dot) com
Mac, Fiero, & engine controller goodies:  http://www.cruzers.com/~ludis/

----------------------------------------------------------------------------
To unsubscribe from gmecm, send "unsubscribe gmecm" (without the quotes)
in the body of a message (not the subject) to majordomo at lists.diy-efi.org




More information about the Gmecm mailing list