Solved

DOS SYSTEM FILE TABLE

Posted on 1998-09-16
13
200 Views
Last Modified: 2010-04-15
I want to write a utility to trace the current files in use during a process.
The way I plan to do this is :
1 make a call to INT 21,52 to get at the DOS INVARS
2 get to byte offset 04 which is a pointer to SFT
3 construct a linked list with SFT byte offset 00 which points to the next SFT
4 get the file count from SFT byte offset 04
at this point I get stuck. the documentation I have on "undocumented DOS" says that there are 59 bytes from SFT byte offset 06 for the file descriptor table which you have to repeate <file count> times, once for each file.
The offset 20 from the file descriptor table start (SFT offset 06) is where the file name is in FCB format (11 bytes). This documentation is for DOS 4.0+.

What I want to know is am i heading the correct way?
Is the SFT structure for DOS 6.22 and above the same as DOS 4.0?
0
Comment
Question by:ravipal
  • 5
  • 4
  • 3
  • +1
13 Comments
 
LVL 11

Expert Comment

by:alexo
ID: 1252765
Get Ralf Brown's interrupt list.  It contains internals documentation for all DOS versions.

I'll dig up the URL in a moment...
0
 
LVL 11

Expert Comment

by:alexo
ID: 1252766
0
 
LVL 3

Accepted Solution

by:
rmichels earned 60 total points
ID: 1252767
Not sure why you rejected alexo's answer? So I'll answer here.  If alexo really deserves the answer than you can reject mine and let alexo answer again.

According to the book Undocumented DOS, the SFT entries are the same size for DOS Versions 4.0-6.0.  This was written before 6.22, so you should double check for > 6.0

0
 

Author Comment

by:ravipal
ID: 1252768
Thanks rmichels, I am new to experts-exhange. I thought you have to reject the awnser to get answers from other experts, that is why I rejected alexo's answer. Sorry alexo!

Anyway I have maneged to solve this under DOS 6.22. But I would like to have some information on Windows 95 DOS ver 4.0. I this the SFT structure is different. I dont have any documentation. could you help me on this?

Thanks again.

0
 
LVL 3

Expert Comment

by:rmichels
ID: 1252769
well, if alexo's answer was correct for you, alexo should get the points.

I am not sure about Win 95 DOS..it's been years since I worked with DOS internals..not since working on parts of "Undocumented DOS"

If you really need the information Andrew Shulman had a series of books and I think Undocumented Win95 is one of them.  But I used DEBUG to learn most of the dos internals.  If you know ASM you could call the INT 21 function to get the pointer to the SFT and take alook at the data.

0
 
LVL 11

Expert Comment

by:alexo
ID: 1252770
ravipal, you REALLY should get the "interrupt list" I mentioned.  This is the best available DOS reference bar none, and it is free!.  It documents all the functions, interrupts and data structures of MS-DOS versions from 1.0 to 7.x (Win95), Other DOS versions (IBM, DR), BIOS, etc.
0
What Is Threat Intelligence?

Threat intelligence is often discussed, but rarely understood. Starting with a precise definition, along with clear business goals, is essential.

 
LVL 11

Expert Comment

by:alexo
ID: 1252771
>> well, if alexo's answer was correct for you, alexo should get the points.
Too late for that...
0
 

Author Comment

by:ravipal
ID: 1252772
Thanks alexo, Sorry about the earlier misunderstanding on my part. I ll make it upto you very soon. I will get that interrup list you mentioned.

Thanks again
0
 
LVL 3

Expert Comment

by:rmichels
ID: 1252773
not really too late to readjust the points.  Customer service should be able to do that.  And yes. Ralf's list is a must have.  It was included in the Undocumented DOS editions as well.


0
 
LVL 3

Expert Comment

by:rmichels
ID: 1252774
not really too late to readjust the points.  Customer service should be able to do that.  And yes. Ralf's list is a must have.  It was included in the Undocumented DOS editions as well.


0
 

Author Comment

by:ravipal
ID: 1252775
rmichels, I have reqquested this change from Customer Service.
0
 
LVL 7

Expert Comment

by:linda101698
ID: 1252776
ravipal,
For your future reference, make sure the correct expert has the proposed answer before you grade a question.  If the expert you want to receive points does not have the proposed answer choose the reject option below you question and ask the expert you want to receive the points to post an answer.

alexo,
I'll post a question in this topic area to award you points.

Linda Gardner
Customer Service @ Experts Exchange

0
 
LVL 11

Expert Comment

by:alexo
ID: 1252777
>> I have reqquested this change from Customer Service.
Thank you ravipal.  Although the "points" are not important, it is always nice to feel appreciated!  (and, of course, thanx to Linda for doing a great job).
0

Featured Post

IT, Stop Being Called Into Every Meeting

Highfive is so simple that setting up every meeting room takes just minutes and every employee will be able to start or join a call from any room with ease. Never be called into a meeting just to get it started again. This is how video conferencing should work!

Join & Write a Comment

Suggested Solutions

Preface I don't like visual development tools that are supposed to write a program for me. Even if it is Xcode and I can use Interface Builder. Yes, it is a perfect tool and has helped me a lot, mainly, in the beginning, when my programs were small…
This tutorial is posted by Aaron Wojnowski, administrator at SDKExpert.net.  To view more iPhone tutorials, visit www.sdkexpert.net. This is a very simple tutorial on finding the user's current location easily. In this tutorial, you will learn ho…
Video by: Grant
The goal of this video is to provide viewers with basic examples to understand and use for-loops in the C programming language.
Video by: Grant
The goal of this video is to provide viewers with basic examples to understand and use while-loops in the C programming language.

708 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

16 Experts available now in Live!

Get 1:1 Help Now