Back to home page

DOS ain't dead

Forum index page

Log in | Register

Back to the forum
Board view  Mix view

FreeDOS and Protected Mode (Users)

posted by paulrichards, 13.09.2011, 02:18

I'm having a bit of a problem with Protected Mode DOS. I have developed an application using Borland Pascal 7.01 + Turbo Vision. Initially I compiled for Real Mode (but running in an XP command prompt) and I started getting a stack overflow error. So I doubled the stack size with no change except I then got a heap overflow error.

So I thought that if I compiled for a Protected Mode target - given all that extra memory that would be available - the heap overflow error should disappear. So, after placing the required PM Borland managers in the app directory (DPMI16BO.OVL and RTM.EXE) I tried again in an XP command prompt. This time the app didn't load and I received an "Unhandled exception at 0020 1A9E Err 0002".

So I thought maybe I need 'real' DOS to make this work. So I powered up FreeDOS (with EMM.EXE and HIMEM.SYS) and ran the app again - but with exactly the same result - "Unhandled exception at 0020 1A9E Err 0002". I swapped EMM.EXE and HIMEM.SYS for JEMMEX.EXE. This time launching the app crashed FreeDOS completely.

So am I wrong to believe that Protected Mode would give me more Heap space? If I'm not then my app has other 'issues', obviously!
I did a search on Google for this error and came up with a discussion of the same Error 0002 from about 6 years ago on the FreeDOS discussion group and which also mentioned BP 7. So the supplementary question is: are there issues with FreeDOS and/or BP 7 with respect to Protected Mode?

TIA

---
Paul
Melbourne, Australia

 

Complete thread:

Back to the forum
Board view  Mix view
22758 Postings in 2121 Threads, 402 registered users (1 online)
DOS ain't dead | Admin contact
RSS Feed
powered by my little forum