As you may or may not know, Microsoft Windows is available for both ARM and x86 - and indeed, both platforms allow both 32-bit and 64-bit programming with small executables using msvcrt.dll for the C runtime library.
And PDOS-generic (at pdos.org) provides a mini Windows clone of all 4 of those environments.
Even though Microsoft may not be interested in porting their version to the 68000 or mainframe (S/370 or z/Arch), I am, and I would like to have official machine definition numbers for this field:
https://learn.microsoft.com/en-us/windo ... /pe-format
e.g.
IMAGE_FILE_MACHINE_AMD64
0x8664
x64
I need 32-bit 68000 and 32-bit S/370 and 64-bit z/Arch
I note that the UEFI spec uses PE too, so I was wondering if they were (now?) the official body that assigns numbers rather than Microsoft.
Either way I am reluctant to click on the UEFI spec which says "by clicking on this you agree ..." and prefer to keep a distance from them for (at least attempted) clean-room purposes.
I am happy to email them though, if the numbers don't already exist.
Any idea what the situation is? ie who controls number assignment?
Thanks. Paul.
PE machine definitions
- bellezzasolo
- Member
- Posts: 120
- Joined: Sun Feb 20, 2011 2:01 pm
Re: PE machine definitions
Pretty academic, as the UEFI spec defines calling convention etc, but in fact is only defined for a subset of the architectures listed under the PE format.kerravon wrote: ↑Thu Jul 03, 2025 11:04 pm As you may or may not know, Microsoft Windows is available for both ARM and x86 - and indeed, both platforms allow both 32-bit and 64-bit programming with small executables using msvcrt.dll for the C runtime library.
And PDOS-generic (at pdos.org) provides a mini Windows clone of all 4 of those environments.
Even though Microsoft may not be interested in porting their version to the 68000 or mainframe (S/370 or z/Arch), I am, and I would like to have official machine definition numbers for this field:
https://learn.microsoft.com/en-us/windo ... /pe-format
e.g.
IMAGE_FILE_MACHINE_AMD64
0x8664
x64
I need 32-bit 68000 and 32-bit S/370 and 64-bit z/Arch
I note that the UEFI spec uses PE too, so I was wondering if they were (now?) the official body that assigns numbers rather than Microsoft.
Either way I am reluctant to click on the UEFI spec which says "by clicking on this you agree ..." and prefer to keep a distance from them for (at least attempted) clean-room purposes.
I am happy to email them though, if the numbers don't already exist.
Any idea what the situation is? ie who controls number assignment?
Thanks. Paul.
Code: Select all
// PE32+ Machine type for EFI images
#define EFI_IMAGE_MACHINE_IA32 0x014c
#define EFI_IMAGE_MACHINE_IA64 0x0200
#define EFI_IMAGE_MACHINE_EBC 0x0EBC
#define EFI_IMAGE_MACHINE_x64 0x8664
#define EFI_IMAGE_MACHINE_ARMTHUMB_MIXED 0x01C2
#define EFI_IMAGE_MACHINE_AARCH64 0xAA64
#define EFI_IMAGE_MACHINE_RISCV32 0x5032
#define EFI_IMAGE_MACHINE_RISCV64 0x5064
#define EFI_IMAGE_MACHINE_RISCV128 0x5128
#define EFI_IMAGE_MACHINE_LOONGARCH32 0x6232
#define EFI_IMAGE_MACHINE_LOONGARCH64 0x6264
Whoever said you can't do OS development on Windows?
https://github.com/ChaiSoft/ChaiOS
https://github.com/ChaiSoft/ChaiOS
Re: PE machine definitions
There is a type for the Motorola 68000 (0x0268) but not, apparently, for the IBM mainframes. Your best bet is to use "Unknown architecture" (0x0000).
https://github.com/torvalds/linux/blob/ ... linux/pe.h
I'm honestly surprised, with your passion for public domain, that you use Microsoft's executable file format.
https://github.com/torvalds/linux/blob/ ... linux/pe.h
I'm honestly surprised, with your passion for public domain, that you use Microsoft's executable file format.