home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Boston 2
/
boston-2.iso
/
DOS
/
PROGRAM
/
BASIC
/
POWBASIC
/
LIBRARY1
/
EXAMP2.ZIP
/
PB072590
< prev
next >
Wrap
Text File
|
1990-07-25
|
2KB
|
64 lines
Date: 22-Jul-90 23:31 PDT
From: Ray Yates [70144,3213]
Subj: File handles
Tim,
I spoke with you about getting the update to Power Basic last week.
I got it saturday. The bug fixes were just what I needed. I also
love the PBPLUS96 program that I downloaded. My hats off to Bob Zale
and Spectra. I'm now able to compile my network database in memory
again with the network loaded. This makes debugging this 7000+ line
program much easier. I've modified a BTree routine by Bob Vest to
work with Power Basic and as soon as I get one more problem solved
I will upload it to Spectra in appreciation for all your fine work
and for all the help I've received from public domain software.
If you could please help me one more time I would greatly appreciate
it. I need to know where Power Basic's linked list of file handles is
stored.
The following is from the program FILEHAND.BAS by Tod Golding,
Borland Technical Support, downloaded from Compuserve.
Turbo Basic's linked list of file handles is stored in
the string data segment area. Two bytes at offsets 6 & 7
are a pointer to the first node of the linked list. Each
node in the linked list has the following format:
| Pointer to next node | 2 Bytes
| Pointer to previous node | " "
| File Number | " "
| DOS File Handle | " "
DEF FNFileHandleAddress%(FileNumber%)
LOCAL Segment%,Ofs%,Done%
DEF SEG
Segment% = PEEK(0) + (256 * PEEK(1)) ' Get the string segment.
DEF SEG = Segment%
Ofs% = PEEK(6) + (256 * PEEK(7)) ' Peek at the first file number.
Done% = 1
WHILE Done% = 1
IF (PEEK(Ofs%+4) + (256 * PEEK(Ofs%+5))) = FileNumber% THEN
FNFileHandleAddress% = Peek(Ofs%+6) + (256 * PEEK(Ofs%+7))
Done% = 0
ELSEIF (PEEK(Ofs%) + + (256 * PEEK(Ofs%+1))) = 0 THEN
FNFileHandleAddress% = 0 ' File number not found.
Done% = 0
ELSE
Ofs% = PEEK(Ofs%) + (256 * PEEK(Ofs%+1)) ' Traverse the linked list.
END IF
WEND
END DEF
I am having trouble with this and appreciate any guidance you could offer.
Thanks
Ray Yates CIS: #70144,3213
Micro Transition Associates
113 Quietwood Ct.
Louisville, Ky 40229
Home Phone: 502 969-1326
Daytime Phone: 502 456-5527