• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 910
  • Last Modified:

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.
0
Raid
Asked:
Raid
  • 2
  • 2
  • 2
  • +3
1 Solution
 
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
Free Tool: SSL Checker

Scans your site and returns information about your SSL implementation and certificate. Helpful for debugging and validating your SSL configuration.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

 
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

Featured Post

Free Tool: Path Explorer

An intuitive utility to help find the CSS path to UI elements on a webpage. These paths are used frequently in a variety of front-end development and QA automation tasks.

One of a set of tools we're offering as a way of saying thank you for being a part of the community.

  • 2
  • 2
  • 2
  • +3
Tackle projects and never again get stuck behind a technical roadblock.
Join Now