AMCX file format: Difference between revisions
Jump to navigation
Jump to search
(Initial creation) |
m (→Header) |
||
Line 29: | Line 29: | ||
| <code>+0EH</code> || Header version || __uint16 || | | <code>+0EH</code> || Header version || __uint16 || | ||
|- | |- | ||
| <code>+10H</code> || reserved for future use || __uint32 || | | <code>+10H</code> || ''reserved for future use'' || __uint32 || | ||
|- | |- | ||
| <code>+14H</code> || Application short name || char[32] || | | <code>+14H</code> || Application short name || char[32] || | ||
Line 41: | Line 41: | ||
| <code>+40H</code> || Required OS version || __uint32 || | | <code>+40H</code> || Required OS version || __uint32 || | ||
|- | |- | ||
| <code>+44H</code> || reserved for future use || __uint32 || | | <code>+44H</code> || ''reserved for future use'' || __uint32 || | ||
|- | |- | ||
| <code>+48H</code> || Offset of segments list || __uint32 || | | <code>+48H</code> || Offset of segments list || __uint32 || | ||
Line 51: | Line 51: | ||
| <code>+54H</code> || Number of imported symbols || __uint32 || | | <code>+54H</code> || Number of imported symbols || __uint32 || | ||
|- | |- | ||
| <code>+58H</code> || Offset of exported symbols list || __uint32 || | | <code>+58H</code> || Offset of exported symbols list || __uint32 || Symbols exported in DLL | ||
|- | |- | ||
| <code>+5CH</code> || Number of exported symbols || __uint32 || | | <code>+5CH</code> || Number of exported symbols || __uint32 || | ||
Line 59: | Line 59: | ||
| <code>+64H</code> || Number of relocations || __uint32 || | | <code>+64H</code> || Number of relocations || __uint32 || | ||
|- | |- | ||
| <code>+68H</code> || Offset of entry point || __uint32 || | | <code>+68H</code> || Offset of entry point || __uint32 || Offset in first code segment found | ||
|- | |- | ||
| <code>+6CH</code> || Default thread stack size || __uint32 || | | <code>+6CH</code> || Default thread stack size || __uint32 || | ||
|} | |} |
Revision as of 22:51, 14 August 2012
Introduction
The AMCX file format is used for all executable files used in AMC-OS, including kernel itself. They are equivalent to PE for DOS/Windows, ELF for Unix and so on.
Linking of object files to build an AMCX file is done by the AMC-OS Linker.
API
To manipulate AMCX files, structures are defined in :
INC\AMCOSEXE.ASH
for ASM fileslinker\amcos_linker\amcos_linker.h
for C files
Header
Offset | Description | Type | Notes |
---|---|---|---|
+00H |
Magic Number | char[4] | 'AMCX' |
+04H |
Header size | __uint32 | |
+08H |
Subheader size | __uint32 | |
+0CH |
Checksum | __uint16 | |
+0EH |
Header version | __uint16 | |
+10H |
reserved for future use | __uint32 | |
+14H |
Application short name | char[32] | |
+34H |
Application version | __uint32 | |
+38H |
Offset of application info structure | __uint32 | |
+3CH |
Required CPU | __uint32 | |
+40H |
Required OS version | __uint32 | |
+44H |
reserved for future use | __uint32 | |
+48H |
Offset of segments list | __uint32 | |
+4CH |
Number of segments in segments list | __uint32 | |
+50H |
Offset of imported symbols list | __uint32 | |
+54H |
Number of imported symbols | __uint32 | |
+58H |
Offset of exported symbols list | __uint32 | Symbols exported in DLL |
+5CH |
Number of exported symbols | __uint32 | |
+60H |
Offset of relocations list | __uint32 | |
+64H |
Number of relocations | __uint32 | |
+68H |
Offset of entry point | __uint32 | Offset in first code segment found |
+6CH |
Default thread stack size | __uint32 |