OSDev.org

The Place to Start for Operating System Developers
It is currently Thu Mar 28, 2024 12:17 pm

All times are UTC - 6 hours




Post new topic Reply to topic  [ 6 posts ] 
Author Message
 Post subject: Kernel project - How to use DPMI with FreeBasic?
PostPosted: Sun Feb 03, 2013 5:27 am 
Offline
Member
Member
User avatar

Joined: Sat Feb 02, 2013 4:16 pm
Posts: 35
Location: France [Lyon]
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 3291 times ]

_________________
FAVIER Sébastien
Sorry for my bad bad English level, I'm young French studient .. :)


Last edited by Cpcdos on Sun Feb 10, 2013 7:53 am, edited 1 time in total.
Top
 Profile  
 
 Post subject: Re: Kernel project - How to use DPMI with FreeBasic?
PostPosted: Sun Feb 03, 2013 11:09 am 
Offline
Member
Member
User avatar

Joined: Wed Oct 18, 2006 3:45 am
Posts: 9301
Location: On the balcony, where I can actually keep 1½m distance
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.

_________________
"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 ]


Top
 Profile  
 
 Post subject: Re: Kernel project - How to use DPMI with FreeBasic?
PostPosted: Mon Feb 04, 2013 1:57 am 
Offline
Member
Member
User avatar

Joined: Sat Feb 02, 2013 4:16 pm
Posts: 35
Location: France [Lyon]
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 .. :)


Top
 Profile  
 
 Post subject: Re: Kernel project - How to use DPMI with FreeBasic?
PostPosted: Mon Feb 04, 2013 4:03 am 
Online
Member
Member

Joined: Wed Oct 01, 2008 1:55 pm
Posts: 3191
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.


Top
 Profile  
 
 Post subject: Re: Kernel project - How to use DPMI with FreeBasic?
PostPosted: Mon Feb 04, 2013 4:36 am 
Offline
Member
Member
User avatar

Joined: Wed Oct 18, 2006 3:45 am
Posts: 9301
Location: On the balcony, where I can actually keep 1½m distance
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.

_________________
"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 ]


Top
 Profile  
 
 Post subject: Re: Kernel project - How to use DPMI with FreeBasic?
PostPosted: Fri Feb 08, 2013 7:04 am 
Offline
Member
Member
User avatar

Joined: Sat Feb 02, 2013 4:16 pm
Posts: 35
Location: France [Lyon]
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 .. :)


Top
 Profile  
 
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 6 posts ] 

All times are UTC - 6 hours


Who is online

Users browsing this forum: Bing [Bot], rdos and 87 guests


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Jump to:  
Powered by phpBB © 2000, 2002, 2005, 2007 phpBB Group