Kernel project - How to use DPMI with FreeBasic?

Question about which tools to use, bugs, the best way to implement a function, etc should go here. Don't forget to see if your question is answered in the wiki first! When in doubt post here.
Post Reply
User avatar
Cpcdos
Member
Member
Posts: 35
Joined: Sat Feb 02, 2013 4:16 pm
Location: France [Lyon]

Kernel project - How to use DPMI with FreeBasic?

Post 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
Attachments
Screeshot of files
Screeshot of files
Last edited by Cpcdos on Sun Feb 10, 2013 7:53 am, edited 1 time in total.
FAVIER Sébastien
Sorry for my bad bad English level, I'm young French studient .. :)
User avatar
Combuster
Member
Member
Posts: 9301
Joined: Wed Oct 18, 2006 3:45 am
Libera.chat IRC: [com]buster
Location: On the balcony, where I can actually keep 1½m distance
Contact:

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

Post 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.
"Certainly avoid yourself. He is a newbie and might not realize it. You'll hate his code deeply a few years down the road." - Sortie
[ My OS ] [ VDisk/SFS ]
User avatar
Cpcdos
Member
Member
Posts: 35
Joined: Sat Feb 02, 2013 4:16 pm
Location: France [Lyon]

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

Post by Cpcdos »

Finally, my question was not clearly..

I mean, use the DPMI on a program compiled BY freebasic
FAVIER Sébastien
Sorry for my bad bad English level, I'm young French studient .. :)
rdos
Member
Member
Posts: 3306
Joined: Wed Oct 01, 2008 1:55 pm

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

Post 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.
User avatar
Combuster
Member
Member
Posts: 9301
Joined: Wed Oct 18, 2006 3:45 am
Libera.chat IRC: [com]buster
Location: On the balcony, where I can actually keep 1½m distance
Contact:

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

Post 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.
"Certainly avoid yourself. He is a newbie and might not realize it. You'll hate his code deeply a few years down the road." - Sortie
[ My OS ] [ VDisk/SFS ]
User avatar
Cpcdos
Member
Member
Posts: 35
Joined: Sat Feb 02, 2013 4:16 pm
Location: France [Lyon]

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

Post 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
FAVIER Sébastien
Sorry for my bad bad English level, I'm young French studient .. :)
Post Reply