Following is an outline of the Emerald object file format, 8th version.

EmeraldObjectFile
{
    4bytes          MagicNumber;
    1byte           Version;
    StringEntry     Info;

    2bytes          SymbolTableSize;
    StringEntry     SymbolTable[SymbolTableSize];

    2bytes          FunctionCount;
    FunctionEntry   Function[FunctionCount];
}

StringEntry
{
    2bytes          Length;
    1byte           String[Length];
}

FunctionEntry
{
    4bytes          FunctionFlags;

    1byte           NumberOfArguments;
    1byte           ArgumentTypes[NumberOfArguments];

    1byte           NumberOfReturnValues;
    1byte           ReturnTypes[NumberOfReturnValues];

    2bytes          SymbolTableReference; /* For name. */

    4bytes          FunctionCodeSize;
    1byte           FunctionCode[FunctionCodeSize];
}



--
