OSDev.org
https://forum.osdev.org/

Kernel project - How to use DPMI with FreeBasic?
https://forum.osdev.org/viewtopic.php?f=1&t=26272
Page 1 of 1

Author:  Cpcdos [ Sun Feb 03, 2013 5:27 am ]
Post subject:  Kernel project - How to use DPMI with FreeBasic?

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:
File comment: Screeshot of files
FBC.jpg
FBC.jpg [ 108.21 KiB | Viewed 3332 times ]

Author:  Combuster [ Sun Feb 03, 2013 11:09 am ]
Post subject:  Re: Kernel project - How to use DPMI with FreeBasic?

Quote:
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.

Author:  Cpcdos [ Mon Feb 04, 2013 1:57 am ]
Post subject:  Re: Kernel project - How to use DPMI with FreeBasic?

Finally, my question was not clearly..

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

Author:  rdos [ Mon Feb 04, 2013 4:03 am ]
Post subject:  Re: Kernel project - How to use DPMI with FreeBasic?

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.

Author:  Combuster [ Mon Feb 04, 2013 4:36 am ]
Post subject:  Re: Kernel project - How to use DPMI with FreeBasic?

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:
Quote:
How to use DPMI with FreeBasic?
Short answer: You don't.

Author:  Cpcdos [ Fri Feb 08, 2013 7:04 am ]
Post subject:  Re: Kernel project - How to use DPMI with FreeBasic?

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

Page 1 of 1 All times are UTC - 6 hours
Powered by phpBB © 2000, 2002, 2005, 2007 phpBB Group
http://www.phpbb.com/