Load DOS exe
Posted: Tue Mar 09, 2010 3:00 pm
I must admit, my Google-fu skills are poor today. I can't find how to do this.
I managed to find a couple of sites explaining what the various fields in the MZ header meant (though not to any great detail) but nothing on actually loading and running a MS-DOS MZ exe file. The reason I want this is because I want to have my bootloader run the MZ part of a PE exe, which will then parse and run the PE part. The PE part will be written in such a way that hopefully it will be loader-agnostic so I can use it with my loader, GRUB, and IIRC EFI (or UEFI or whatever it's called).
TL;DR: What's the bare minimum I need to run a MZ exe assuming it's being run from a boot sector?
I managed to find a couple of sites explaining what the various fields in the MZ header meant (though not to any great detail) but nothing on actually loading and running a MS-DOS MZ exe file. The reason I want this is because I want to have my bootloader run the MZ part of a PE exe, which will then parse and run the PE part. The PE part will be written in such a way that hopefully it will be loader-agnostic so I can use it with my loader, GRUB, and IIRC EFI (or UEFI or whatever it's called).
TL;DR: What's the bare minimum I need to run a MZ exe assuming it's being run from a boot sector?