AMCX file format: Difference between revisions
Jump to navigation
Jump to search
m (→Header) |
m (Added links to wiki) |
||
(One intermediate revision by the same user not shown) | |||
Line 1: | Line 1: | ||
==Introduction== | ==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. | The AMCX file format is used for all executable files used in AMC-OS, including kernel itself. They are equivalent to [http://en.wikipedia.org/wiki/Portable_Executable PE for DOS/Windows], [http://en.wikipedia.org/wiki/Executable_and_Linkable_Format ELF for Unix] and so on. | ||
Linking of object files to build an AMCX file is done by the [[AMC-OS Linker]]. | Linking of object files to build an AMCX file is done by the [[AMC-OS Linker]]. | ||
Line 7: | Line 7: | ||
To manipulate AMCX files, structures are defined in : | To manipulate AMCX files, structures are defined in : | ||
* <code>INC\AMCOSEXE.ASH</code> for ASM files | * <code>CORE\INC\AMCOSEXE.ASH</code> for ASM files | ||
* <code>linker\amcos_linker\amcos_linker.h</code> for C files | * <code>linker\amcos_linker\amcos_linker.h</code> for C files | ||
Latest revision as of 23:25, 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 :
CORE\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 |