Path: utzoo!attcan!uunet!samsung!dali.cs.montana.edu!rpi!crdgw1!sagittarius!dixon From: dixon@sagittarius.crd.ge.com (walt dixon) Newsgroups: comp.sys.ibm.pc Subject: Re: Retrieving the value of FILES=??? Keywords: Global File Handle Table Message-ID: <8550@crdgw1.crd.ge.com> Date: 14 Jun 90 14:31:44 GMT References: <605@digigw.digital.co.jp> Sender: news@crdgw1.crd.ge.com Reply-To: dixon@sagittarius.crd.ge.com (walt dixon) Organization: General Electric Corp. R&D, Schenectady, NY Lines: 47 In <605@digigw.digital.co.jp> Gordon Day writes: >I am confronted with the problem of finding out length of the global file >handle table in DOS (>=3.3). I am aware of the following issues: [text deleted] The MS-DOS Technical Reference Encylopedia (at least the first edition) referred to this structure as the System File Table or SFT for short. DOS maintains the base address of the SFT in a list returned in es:bx by int 21h ah=52h. Specifically es:[bx+4] is a dword ptr to the system file table. The system file table is organized as a linked list with the following format: +------------------+ | link to next | | block of entries | | (DWORD) | +------------------+ | entries in this | | block | | (WORD) | +------------------+ | 1st SFT entry | | in block | | last SFT entry | | in block | +------------------+ You can determine the SFT size by walking the list and adding up the entries per block. You can also determine available/used space by looking at the reference count in the individual SFT entries within each block. There's a more complete explaination of the SFT as well as other interesting DOS data structures in Chapter 10 of "The MS-DOS Papers" (Howard Sams, 1988). BTW I am the author of this chapter and the following one on device drivers. I derrive no revenue from book sales; I'm just citing a good reference. Walt Dixon {internet: dixon@crd.ge.com } {us mail: ge crd } { po box 8 } { schenectady, ny 12301 } {phone 518-387-5798 (W) } { 518-875-6203 (H) } Walt Dixon dixon@crd.ge.com