Dpmi Memory in Turbo Pascal 7.0

Is there any unit, or any code that allows me to use DPMI memory or Protected Mode Memory in Turbo Pascal 7.0.
I know it's a 16bit Compiler, but I'm sure there are ways of using DPMI memory or Protected Mode Memory in a 16bit mode.  I am very familiar of using assembly language, so if you give me code, can you also include info on being able to use assembly language in the same way in the DPMI mode.
RaidAsked:
Who is Participating?
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

nricoCommented:
Sure you can switch to DPMI mode using assembler, but you'll have to do _ALL_ the work yourself, including address spacing, switching back for DOS calls, so you'd be coding almost *everyting* in assembler (I don't think you'd want that). My advice: Get a DPMI compiler.
I believe the Free Pascal Compiler (http://pascal.about.com/ should give you a link) is 32-bit, though I'm not sure.

If you now C, DJGPP is another good alternative (http://www.delorie.com/).
0
nricoCommented:
(I mean "know" - sorry)
0
HypoCommented:
Ofcourse you can always change target to protected before you compile the program... That would take you in and out of protected mode... But pascal the pascal code you'll use in this mode will not be fast... (most because of it's a 16bit compile) But you can always use assembler... and since you're familiar with that I guess you could get both memory and speed.

I'll put together an example for you...  (if you don't mind)

But if you want to write more advanced 32 bit programs for DOS mode programs you should defenetly go with a better Pascal compiler... (such as the Free Pascal Compiler) wich nrico suggests...
0
Cloud Class® Course: Microsoft Azure 2017

Azure has a changed a lot since it was originally introduce by adding new services and features. Do you know everything you need to about Azure? This course will teach you about the Azure App Service, monitoring and application insights, DevOps, and Team Services.

HypoCommented:
.. the reson for that is that in Borland Pascal 7.0 the protected mode is a 286 compatibel 16bit protected mode. But because of that: Most of your assembler procedures/Functions will still work as long as you don't assign new values to DS/CS/ES... Ofcourse, you can still use them in this protected mode, but they have to be valid... For instance: common asm instructions in a real mode code that uses graphic would be
"
MOV AX,$A000
MOV ES,AX
" (will most probably cause a runtime error)
Insted you should use the pascal's builtin value SegA000 for protected mode adressing like the one above.

"
MOV AX,SegA000
MOV ES,AX
" (will not cause a runtime error)

When you program in protectedmode you have to think on things like this! Cause if you don't... program will not work.
0
RaidAuthor Commented:
Message to Hypo, Sorry, I do not have Borland Pascal 7.0, I have Turbo Pascal 7.0 which can not turn to DPMI mode.
If you have Borland Pascal 7.0, Can I PLEASE have it, It would help ALOT!!!
0
VIBESPROCommented:
yes there is a way.  Both Borland and Turbo can usde DPMI modes I have a unit somewhere aorund that can do it in Turbo Pascal.  As soon as I find it I'll send it over...
0
kamareyCommented:
In Q_10258422 ( Pascal to C converter ) Curri placed internet address www.freepascal.org/ . There is free pascal compiler which works in protected mode and have the syntax compatible with Pascal 7.0.
0
RaidAuthor Commented:
Kamarey, I've downloaded those before and I don't know how to use them.  I've downloaded TMT pascal, and FPK Pascal but no luck.  If you can give me knowledge on how to use them, that would be very useful.  And VibesPro, that would help alot as well.
0
sumant032199Commented:
You can download dpmi*.zip from www.delorie.com
0

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
Pascal

From novice to tech pro — start learning today.