Baron-von-Riedesel / HX

Home of the HX DOS Extender and its included DPMI-host HDPMI.
192 stars 14 forks source link

executing code in 16-bit memory needs DosCreateCSAlias in doscalls #37

Open kerravon86 opened 9 months ago

kerravon86 commented 9 months ago

Under Windows 2000 I am able to run my 16-bit PDOS-generic with:

bios pcomm.exe

But with HX16 under Freedos like this:

dpmild16 bios.exe pcomm.exe

I am told that 0x2b (DosCreateCSAlias) does not exist in doscalls.dll.

Would it be possible to add support for this function?

Thanks. Paul.

Ringdingcoder commented 8 months ago

Isn’t bios.exe a 32-bit PE? Why would you want to load it with dpmild16? It works once you use dpmild32.

kerravon86 commented 8 months ago

Isn’t bios.exe a 32-bit PE? Why would you want to load it with dpmild16? It works once you use dpmild32.

Not sure why you think bios.exe (there's one famous one is there?) is 32-bit. I do have a 32-bit version too (multiple), but this was a question about the 16-bit one. You can see the NE signature below (and also see it running under Windows 2000 which supports OS/2 1.x executables).

D:\devel\pdos\generic>hexdump bios.exe 1000 100 0003E8 00000000 00000000 00000000 00000000 ................ 0003F8 00000000 00000000 4E45050A 6C000200 ........NE..l... 000408 D1090774 02000300 00000040 10000100 ...t.......@.... 000418 00000300 03000100 0C004000 58005800 ..........@.X.X. 000428 60006200 6E040000 00000900 00000100 `.b.n........... 000438 00000000 00000000 030032C1 000D32C1 ..........2...2. 000448 00000000 ....

D:\devel\pdos\generic>bios

bios starting enter commands, press enter to exit

bios exiting

D:\devel\pdos\generic>pdmake -f makebios.m16

Baron-von-Riedesel commented 2 weeks ago

DosCreateCSAlias() has been added to DOSCALLS.

kerravon86 commented 2 weeks ago

Thanks a lot for that! Will give it a go in due course.