You are not logged in. You can browse in the PowerBASIC Community, but you must click Login (top right) before you can post. If this is your first visit, check out the FAQ or Sign Up.
It's been my experience: In a pure DOS environment, use
DeviceHigh in your CONFIG.SYS file to load all (or most)
drivers into the upper memory area (between 640k and 1m).
Then use LH or LoadHigh to load file from your AUTOEXEC.BAT
file into the same area.
This frees up the maximum amount of conventional memory for
PB to use. I've had data as much as 450k big in memory ready
for manuplition as I saw fit. PB/DOS (current version) can only
"see" the base 640k memory area but, some time ago, I put on
the wish list that the next version be able to use XMS or EMS.
I've never used MEMSET so....
------------------
There are no atheists in a fox hole or the morning of a math test.
If my flag offends you, I'll help you pack.
Adding the i=B000-B7FF option to EMM386 in the config.sys file will
free up memmory that would be used by a monocrome display adapter.
This is safe, if you're using an old-fashioned DOS-only computer with CGA
graphics. On anything approaching modern hardware, you're asking for trouble.
Can this same option be done, from within a PB program to free up conventional ram?
No. It needs to be set up during the boot process.
Also, what exactly is MEMSET used for?
Normally, a DOS program allocates all available (DOS-arena) memory.
MEMSET allows you to reduce the amount of memory claimed by your PB
application. This is rarely useful but, can be used to help test
your code against low-memory conditions, say, or add on a third-party
library that provides new forms of dynamic memory management.
"Upper memory" is scavenged from memory areas outside the basic DOS
arena. These upper memory areas were originally intended for use by
devices, not program space. Since DOS is no longer a big selling
point for current computers, manufacturers have been reclaiming the
upper memory blocks for their own purposes-- sometimes, to the point
where Windows can't even create a 64Kb page frame for EMS emulation.
So, you need to be very careful about causing EMM386 to believe that
it can allocate memory that something else may already be using.
Stay away from AGP video cards if you want to use that space.
I still use monochrome cards and monitors, and I have yet to
find an AGP card that does NOT grab the B000-B7FF memory area
for itself. All the PCI video cards I have tested, on the other
hand, play nice and leave that area untouched.
A monochrome card in a DOS only system will use the space B000-B7FF while a color card will use B800-BFFF. So if your monochrome card uses the B000-B7FF area it should leave the B800-BFFF area unused.
Up to now I thought there would be only color cards in use so it would be save to assume that the area B000-B7FF is unused.
An old test whether a monochrome or color card is installed is reading the BIOS equipment-flag at &H410:
def seg = 0
If (Peek(&H410) And &H30) <> &H30 Then 'color card using B800-BFFF - bits 4 and 5 are not set
Maybe your AGP card does not use the B800-BFFF area and you can use this test to determine which area is unused by the graphics card.
We process personal data about users of our site, through the use of cookies and other technologies, to deliver our services, and to analyze site activity. For additional details, refer to our Privacy Policy.
By clicking "I AGREE" below, you agree to our Privacy Policy and our personal data processing and cookie practices as described therein. You also acknowledge that this forum may be hosted outside your country and you consent to the collection, storage, and processing of your data in the country where this forum is hosted.
Comment