BBS: Inland Empire Archive
Date: 04-15-92 (09:36) Number: 187
From: TOM HAMMOND Refer#: NONE
To: DONALD SUTER Recvd: NO
Subj: QB help with disk files? Conf: (2) Quik_Bas
DS> OPEN the sixteenth file. My autoexe.bat has FILES=50 BUFFERS=30.
DS>Shouldnt QB4.5 be able to open more than 15 files at one time?
RV>I've seen code on one of the echoes about using interrupt
RV>to go in and increase the maximum DOS file handles. I'm
RV>interested too. I'll look and see if I captured any code.
I sent a reply to you a week or so ago, but it apparently got dumped
into the bit bucket somewhere along the line. Hope you get this one.
DIM InRegs AS RegType, OutRegs AS RegType
NrFiles = 40
ON ERROR GOTO ReAllocateFarHeap
Allocate = 128
HeapBefore& = SETMEM(0)
IF HeapBefore& - SETMEM(-Allocate) >= Allocate THEN
FarHeap& = SETMEM(-Allocate)
PRINT "Insufficient Memory to de-allocate"
InRegs.ax = &H6700
InRegs.bx = NrFiles
CALL Interrupt(&H21, InRegs, OutRegs)
FOR I% = 1 TO NrFiles - 5
File$ = "Junk" + STR$(I%)
OPEN File$ FOR OUTPUT AS I%
FarHeap& = SETMEM(Allocate + 128)
HeapAfter& = SETMEM(0)
PRINT "Before:"; HeapBefore&
PRINT " After:"; HeapAfter&
IF HeapAfter& < HeapBefore& THEN PRINT "Far Heap Memory NOT returned"
--------------- CUT HERE ---------------
When I imported this file into SLMR, it wrapped pretty badly. I think
I was able to get it reformatted correctly. Hope so anyway.
Hope this helps. Good Luck.
Tom Hammond N0SS
þ SLMR 2.1 þ Press any key to continue or any other key to quit
--- WM v2.00/91-0231
* Origin: The Modem Zone BBS (314) 893-5106 (1:289/2)