1
0
kolibrios/data/common/fasmdep/fas.inc

91 lines
4.1 KiB
PHP
Raw Normal View History

; Structures describing fasm symbol files.
define FAS_SIGNATURE 1A736166h
virtual at 0
fas_header:
.signature dd ? ; Signature 1A736166h.
.major db ? ; Major version of flat assembler.
.minor db ? ; Minor version of flat assembler.
.headersize dw ? ; Length of header.
.input dd ? ; Offset of input file name in the strings table.
.output dd ? ; Offset of output file name in the strings table.
.strings_offs dd ? ; Offset of strings table.
.strings_size dd ? ; Length of strings table.
.symbols_offs dd ? ; Offset of symbols table.
.symbols_size dd ? ; Length of symbols table.
.preproc_offs dd ? ; Offset of preprocessed source.
.preproc_size dd ? ; Length of preprocessed source.
.asm_offs dd ? ; Offset of assembly dump.
.asm_size dd ? ; Length of assembly dump.
.section_offs dd ? ; Offset of section names table.
.section_size dd ? ; Length of section names table.
.symref_offs dd ? ; Offset of symbol references dump.
.symref_size dd ? ; Length of symbol references dump.
.size:
end virtual
virtual at 0
preproc_line_header:
; When the line was loaded from source, this field contains
; either zero (if it is the line from the main input file), or
; an offset inside the preprocessed source to the name of file,
; from which this line was loaded (the name of file is zero-ended
; string).
; When the line was generated by macroinstruction, this field
; contains offset inside the preprocessed source to the
; pascal-style string specifying the name of macroinstruction,
; which generated this line.
.source_name dd ?
; Bits 0-30 contain the number of this line.
; If the highest bit is zeroed, this line was loaded from source.
; If the highest bit is set, this line was generated by
; macroinstruction.
.line_number dd ?
; If the line was loaded from source, this field contains
; the position of the line inside the source file, from which it
; was loaded.
; If line was generated by macroinstruction, this field contains
; the offset of preprocessed line, which invoked the
; macroinstruction. If line was generated by instantaneous macro,
; this field is equal to the next one.
.line_offset dd ?
; If the line was generated by macroinstruction, this field
; contains offset of the preprocessed line inside the definition
; of macro, from which this one was generated.
.line_macro_offs dd ?
; The tokenized contents of line.
.contents:
end virtual
virtual at 0
asm_row:
.out_offs dd ? ; Offset in output file.
.preproc_offs dd ? ; Offset of line in preprocessed source.
.this dq ? ; Value of $ address.
.extended_sib dd ? ; Extended SIB for the $ address, the first two bytes
; are register codes and the second two bytes are
; corresponding scales.
; If the $ address is relocatable, this field contains
; information about section or external symbol, to which
; it is relative - otherwise this field is zero.
; When the highest bit is cleared, the address is
; relative to a section, and the bits 0-30 contain
; the index (starting from 1) in the table of sections.
; When the highest bit is set, the address is relative
; to an external symbol, and the bits 0-30 contain the
; the offset of the name of this symbol in the strings
; table.
.this_base dd ?
.this_type db ? ; Type of $ address value (as in table 2.2).
.code_type db ? ; Type of code - possible values are 16, 32, and 64.
; If the bit 0 is set, then at this point the assembly
; was taking place inside the virtual block, and the
; offset in output file has no meaning here.
; If the bit 1 is set, the line was assembled at the
; point, which was not included in the output file for
; some other reasons (like inside the reserved data at
; the end of section).
.flags db ?
.this_high db ? ; The higher bits of value of $ address.
.sizeof:
end virtual