Fresh IDE . tables.txt at [465566527f]
Not logged in

This repository is a mirror!

The original is located on: https://fresh.flatassembler.net/fossil/repo/fresh
If you want to follow the project, please update your remote-url

File source/Doc/tables.txt artifact c282c6ec91 part of check-in 465566527f



A few tables for the chapters that don't exist yet:


   Table 3.2  Header of preprocessed line generated by macroinstruction
  /-------------------------------------------------------------------------\
  | Offset | Value                                                          |
  |========|================================================================|
  |   +0   | pointer to the name symbol of macro which generated this line  |
  |--------|----------------------------------------------------------------|
  |   +4   | line number in bits 0-30, the highest bit set                  |
  |--------|----------------------------------------------------------------|
  |   +8   | pointer to the line which invoked the macro                    |
  |--------|----------------------------------------------------------------|
  |  +12   | pointer to the line in macro from which this one was generated |
  \-------------------------------------------------------------------------/


   Table 5.1  Symbol structure
  /-------------------------------------------------------------------------\
  | Offset | Size  | Description                                            |
  |========|=======|========================================================|
  |   +0   | qword | value of symbol                                        |
  |--------|-------|--------------------------------------------------------|
  |   +8   | word  | flags (table 5.2)                                      |
  |--------|-------|--------------------------------------------------------|
  |  +10   | byte  | size of data labelled by this symbol                   |
  |--------|-------|--------------------------------------------------------|
  |  +11   | byte  | type of symbol (table 5.3)                             |
  |--------|-------|--------------------------------------------------------|
  |  +12   | dword | extended SIB, the first two bytes are register codes   |
  |        |       | and the second two bytes are corresponding scales      |
  |--------|-------|--------------------------------------------------------|
  |  +16   | word  | number of pass in which symbol was defined last time   |
  |--------|-------|--------------------------------------------------------|
  |  +18   | word  | number of pass in which symbol was used last time      |
  |--------|-------|--------------------------------------------------------|
  |  +20   | dword | address of object section or external symbol to which  |
  |        |       | this symbol is relative (only for relocatable symbols) |
  \-------------------------------------------------------------------------/


   Table 5.2  Symbol flags
  /----------------------------------------------------------------\
  | Bit | Value | Description                                      |
  |=====|=======|==================================================|
  |  0  |     1 | symbol was defined                               |
  |-----|-------|--------------------------------------------------|
  |  1  |     2 | symbol can be redefined                          |
  |-----|-------|--------------------------------------------------|
  |  2  |     4 | symbol was redefined                             |
  |-----|-------|--------------------------------------------------|
  |  3  |     8 | symbol was used                                  |
  |-----|-------|--------------------------------------------------|
  |  4  |   10h | the prediction was needed when checking          |
  |     |       | whether the symbol was used                      |
  |-----|-------|--------------------------------------------------|
  |  5  |   20h | result of last predicted check for being used    |
  |-----|-------|--------------------------------------------------|
  |  6  |   40h | the prediction was needed when checking          |
  |     |       | whether the symbol was defined                   |
  |-----|-------|--------------------------------------------------|
  |  7  |   80h | result of last predicted check for being defined |
  |-----|-------|--------------------------------------------------|
  |  8  |  100h | the optimization adjustment is applied to        |
  |     |       | the value of this symbol                         |
  \----------------------------------------------------------------/


   Table 5.3  Symbol types
  /-------------------------------------------------------------------\
  | Value | Description                                               |
  |=======|===========================================================|
  |   0   | absolute value                                            |
  |-------|-----------------------------------------------------------|
  |   1   | relocatable segment address (only with MZ output)         |
  |-------|-----------------------------------------------------------|
  |   2   | relocatable 32-bit address                                |
  |-------|-----------------------------------------------------------|
  |   3   | relocatable relative 32-bit address (value valid only for |
  |       | symbol used in the same section where it was calculated,  |
  |       | it should not occur in the symbol structure)              |
  |-------|-----------------------------------------------------------|
  |   4   | relocatable 64-bit address                                |
  \-------------------------------------------------------------------/