RetroCoders Community

FreeBasic Programming => FreeBasic Tips & Tricks => Topic started by: ron77 on Feb 08, 2024, 11:07 AM

Title: hx dos extender for freeBASIC for DOS
Post by: ron77 on Feb 08, 2024, 11:07 AM
hello it seems that using CWSDMPI.exe with freebasic for DOS causes a segmentation fault error (12) when using 'sleep' or 'input' commands

freebasic post on the forum of FB community suggested to use HDPMI32.EXE instead of CWSDMPI.EXE

The Post on fb Forum (https://freebasic.net/forum/viewtopic.php?p=103673&hilit=sleep+dosbox#p103673)

Here is the address of the HX DOS Extender Site where you can find HDPMI32.EXE

HX DOS Extender HDPMI32.EXE Site (https://www.japheth.de/HX.html)

You load it by typing manually or putting in a batch file or in DOSBox autoexec.bat:

"HDPMI32.EXE -r"

You unload it by:

"HDPMI32.EXE -u"

(all, of course, without the quotes)

HDPMI32.EXE enables the use of sleep and input commands without segmentation fault errors and without causing the program to crash. I've tested it on archive.org with my chatbot in freebasic...

Title: Re: hx dos extender for freeBASIC for DOS
Post by: Lucidapogee on Feb 08, 2024, 05:52 PM
I was having issues with cwsdpmi and switched to pmode stub.

pmodstub.exe

Try it. I use it with djgpp.
Can you bind the dpmi to your exe in FB like in djgpp?
If not, there's a TSR version of pmode called pmodtsr.
Title: Re: hx dos extender for freeBASIC for DOS
Post by: mysoft on Feb 17, 2024, 12:28 AM
yeah it uses the same linker, so it's possible to bind... (and even then freebasic can use -gen gcc to compile using djgpp)

i will test this one... because while hdpmi32 is nice... it makes many tools to thing it's inside windows (for obvious reasons)... and i can't jut rename hdpmi32.exe to cwsdpmi.exe... as that does not work, since the built-in loaded does internal stuff to loda cwsdpmi.exe