[f40a309] | 1 | /*
|
---|
| 2 | ============================================================================
|
---|
| 3 | objdefs.h -- Object file format for as68 (Atari 1040ST TOS objects)
|
---|
| 4 | Version 7 -- 1987-12-30 -- D.N. Lynx Crowe
|
---|
| 5 | ============================================================================
|
---|
| 6 | */
|
---|
| 7 |
|
---|
[f7428b1] | 8 | #pragma once
|
---|
[5fa506d] | 9 |
|
---|
[f7428b1] | 10 | #include "stdint.h"
|
---|
| 11 |
|
---|
[f40a309] | 12 | struct EXFILE { /* executable file header */
|
---|
| 13 |
|
---|
[7258c6a] | 14 | uint16_t F_Magic; /* File type magic */
|
---|
| 15 | int32_t F_Text; /* SIze of text segment */
|
---|
| 16 | int32_t F_Data; /* Size of data segment */
|
---|
| 17 | int32_t F_BSS; /* Size of BSS segment */
|
---|
| 18 | int32_t F_Symtab; /* Size of symbol table */
|
---|
| 19 | int32_t F_Res1; /* Reserved area #1 */
|
---|
| 20 | int32_t F_Res2; /* Reserved area #2 -- text origin */
|
---|
| 21 | uint16_t F_Res3; /* Reserved area #3 -- flag word */
|
---|
[f40a309] | 22 |
|
---|
| 23 | /* data origin - long */
|
---|
| 24 | /* bss origin - long */
|
---|
| 25 | };
|
---|
| 26 |
|
---|
| 27 | #define F_R_C 0x601A /* Magic for contiguous file */
|
---|
| 28 | #define F_R_D 0x601B /* Magic for discontiguous file */
|
---|
| 29 |
|
---|
| 30 | struct SYMBOL { /* Symbol table entry -- 14 bytes */
|
---|
| 31 |
|
---|
[7258c6a] | 32 | int8_t symname[8]; /* Symbol name (LJZF) */
|
---|
| 33 | uint16_t symtype; /* Symbol type flags */
|
---|
| 34 | int32_t symvalue; /* Symbol value */
|
---|
[f40a309] | 35 | };
|
---|
| 36 |
|
---|
| 37 | #define S_Def 0x8000 /* Defined */
|
---|
| 38 | #define S_Equ 0x4000 /* Equated */
|
---|
| 39 | #define S_Glb 0x2000 /* Global */
|
---|
| 40 | #define S_Reg 0x1000 /* Equated register */
|
---|
| 41 | #define S_Ext 0x0800 /* External reference */
|
---|
| 42 | #define S_Data 0x0400 /* Data based relocatable */
|
---|
| 43 | #define S_Text 0x0200 /* Text based relocatable */
|
---|
| 44 | #define S_BSS 0x0100 /* BSS based relocatable */
|
---|