some improvements i think
This commit is contained in:
42
asmrigs/spec/o.txt
Normal file
42
asmrigs/spec/o.txt
Normal file
@@ -0,0 +1,42 @@
|
||||
Brick Rigs math vehicle object file specification v 1.0.
|
||||
|
||||
1. Terminology
|
||||
"byte" must be 1 byte long (uint8_t in C)
|
||||
"word" must be 2 bytes long (uint16_t in C)
|
||||
"int" must be 4 bytes long (uint16_t in C)
|
||||
|
||||
2. Global header
|
||||
|
||||
First comes global header which has following structure:
|
||||
|
||||
struct
|
||||
{
|
||||
byte magic[4];
|
||||
byte architecture[2];
|
||||
word symbols_number;
|
||||
}
|
||||
|
||||
Where:
|
||||
magic must equal to 0x1 'B' 'M' 'O'
|
||||
architecture is defined per implementation
|
||||
symbols_number is the amount of symbols
|
||||
|
||||
3. Symbols
|
||||
|
||||
First comes the header:
|
||||
|
||||
struct
|
||||
{
|
||||
byte type;
|
||||
int name_offset;
|
||||
byte name_lenght;
|
||||
int data_offset;
|
||||
byte data_lenght;
|
||||
}
|
||||
|
||||
Where:
|
||||
type is equal to 0x1 which defines function or 0x2 which defines variable
|
||||
name_lenght is equal to the lenght of the name of the symbol + 1
|
||||
data_lenght is equal to the data lenght of the symbol
|
||||
|
||||
After that comes the ASCII terminated by 0x0 set of lenght of name_lenght, which defined name of the symbol
|
||||
Reference in New Issue
Block a user