Page 1 of 1

Kernel project - How to use DPMI with FreeBasic?

Posted: Sun Feb 03, 2013 5:27 am
by Cpcdos
Hello , i'm FAVIER Sébastien 01
Developer of Kernel Cpcdos OSx , if you've ever heard.

(See http://microsf01.e-monsite.com/pages/cpcdos-os2-1.html)
(And screenshots here: http://cpcdos.e-monsite.com/album/)


I started with Kernel Quick Basic 4.5, and then passed PDS7.1.
I have reached the limits of 16bit in memory, so I went on to FreeBasic DOS
I put more than 3 hours to convert my code manually
and i'm using the parameter
-LANG FBLITE

the kernel is running, but some bugs to fix
brief

My only problem is that I do not really know how to use tools
DOS/32.exe, cwsdpmi.exe, HDPMI32.exe etc ...

for using the memory Dos extended, 4GB, protected mode , etc. ..
With my program compiled by FreeBasic in .Exe

So how did I do to access the extended memory, 4GB, use DPMI?
And drivers & Parameter to load in Config.sys (Himem.sys,Emm386..)

Thank, c'est important ! :)

Overview of Kernel with an office coded in CpcdosC +
(Not watch date/time , %time% function unprogrammed LOL )
Image

Re: Kernel project - How to use DPMI with FreeBasic?

Posted: Sun Feb 03, 2013 11:09 am
by Combuster
How to use DPMI with FreeBasic?
Short answer: You don't.

Long answer: Either you're running a kernel and you have absolutely nothing to with the mess that is either DOS or Windows, or you're running a proper DOS program and the DPMI is taken care of for you by FreeBasic itself.

Re: Kernel project - How to use DPMI with FreeBasic?

Posted: Mon Feb 04, 2013 1:57 am
by Cpcdos
Finally, my question was not clearly..

I mean, use the DPMI on a program compiled BY freebasic

Re: Kernel project - How to use DPMI with FreeBasic?

Posted: Mon Feb 04, 2013 4:03 am
by rdos
Cpcdos wrote:Finally, my question was not clearly..

I mean, use the DPMI on a program compiled BY freebasic
DPMI is short for DOS Protected Mode Interface which can execute your code in protected mode. Typically, for DOS, it is provided by an DOS extender, while when running under Windows DPMI is provided by Windows.

So if freebasic can support some DOS extender, and this DOS extender handles DPMI (most do), you should be able to target your application for the DOS extender, and that environment will handle the DPMI interface for you either by using Windows DPMI host, or installing it's own DPMI host.

Re: Kernel project - How to use DPMI with FreeBasic?

Posted: Mon Feb 04, 2013 4:36 am
by Combuster
Point was that FreeBasic code always runs in 32-bit mode, and thus requires DMPI as a fundamental part of its DOS runtime library. Consequently it has native support for extended memory and you have absolutely no need to care about the details as all allocations made are already freed of the 16-bit limits.

In other words, the original answer still answers the original question, besides maybe needing a change in emphasis:
How to use DPMI with FreeBasic?
Short answer: You don't.

Re: Kernel project - How to use DPMI with FreeBasic?

Posted: Fri Feb 08, 2013 7:04 am
by Cpcdos
Hi ,
effectively, FreeBasic compiles fine of 32 bit with DPMI
I'm stupid ,I did not notice this lol

Brief
Thank you all :)

- - - - - - - - - -
Microsf01
Favier Sébastien 01
http://microsf01.fr.nf/
Copyright©Microsf01