Back to home page

DOS ain't dead

Forum index page

Log in | Register

Back to the forum
Board view  Mix view

clean dos extender executable format (Developers)

posted by kerravon, Ligao, Free World North, 08.01.2023, 18:37

> You can probably apply the same scheme, or a similar one, to whatever
> protected mode (?) executable format you wish to stubify. Tack a classical
> MS-DOS program in front of it, and add an offset pointer to point to the
> a.out payload, and call it a day.

Sounds good to me!

So at offset x'3c' is the e_lfanew, which is x'80'
in my case:

C:\devel\pdos\src>hexdump \winpath\hexdump.exe 0 200
000000 4D5A9000 03000000 04000000 FFFF0000 MZ..............
000010 B8000000 00000000 40000000 00000000 ........@.......
000020 00000000 00000000 00000000 00000000 ................
000030 00000000 00000000 00000000 80000000 ................
000040 0E1FB409 BA1000CD 21B001B4 4CCD2100 ........!...L.!.
000050 496E7374 616C6C20 4858206F 72207570 Install HX or up
000060 67726164 6520746F 2050444F 532F3338 grade to PDOS/38
000070 36206F72 2057696E 65206574 630D0A24 6 or Wine etc..$

And that has the PE + NUL + NUL:

000080 50450000 4C010400 47286D61 00000000 PE..L...G(ma....
000090 00000000 E0000E02 0B010238 00040000 ...........8....
0000A0 00060000 00000000 00100000 00100000 ................
0000B0 00000000 00004000 00100000 00020000 ......@.........

It would probably be good for doing hexdumps if
my a.out was aligned on a 16-byte boundary.

So what do you think of making that say:

AO + NUL + NUL + 12 * NUL?

followed by the normal 32-bit a.out which does
INT 21H calls?

And then I will need to write an actual DOS extender
which does DPMI calls, right?

And in hindsight, does this look neater than existing
DOS extender formats?

BFN. Paul.

 

Complete thread:

Back to the forum
Board view  Mix view
22049 Postings in 2034 Threads, 396 registered users, 75 users online (0 registered, 75 guests)
DOS ain't dead | Admin contact
RSS Feed
powered by my little forum