Browse Prior Art Database

Method of Monitoring Open Files for Any Application on a Personal Computer

IP.com Disclosure Number: IPCOM000062568D
Original Publication Date: 1986-Dec-01
Included in the Prior Art Database: 2005-Mar-09
Document File: 4 page(s) / 30K

Publishing Venue

IBM

Related People

Grafe, RJ: AUTHOR [+2]

Abstract

The Application Selector program monitors DOS function calls to determine when files are opened and closed on each diskette, and maintains this information in an 'Open File Table' which is shown above. This table is used to determine when to verify that the diskette containing the open file is still in the same drive. The diskette must be in the correct drive to prevent diskette or data loss. A DOS Function Call is a software interrupt (21H), which gives control to the DOS function call processor. Information passed in registers tells DOS what function it is to perform, and other information pertinent to the requested operation. The processor architecture directs processing on an interrupt to the address contained in a specific memory location (interrupt vector), for each interrupt.

This text was extracted from a PDF file.
At least one non-text object (such as an image or picture) has been suppressed.
This is the abbreviated version, containing approximately 46% of the total text.

Page 1 of 4

Method of Monitoring Open Files for Any Application on a Personal Computer

The Application Selector program monitors DOS function calls to determine when files are opened and closed on each diskette, and maintains this information in an 'Open File Table' which is shown above. This table is used to determine when to verify that the diskette containing the open file is still in the same drive. The diskette must be in the correct drive to prevent diskette or data loss. A DOS Function Call is a software interrupt (21H), which gives control to the DOS function call processor. Information passed in registers tells DOS what function it is to perform, and other information pertinent to the requested operation. The processor architecture directs processing on an interrupt to the address contained in a specific memory location (interrupt vector), for each interrupt. DOS function calls are initiated by an application by generating a software interrupt 21H. The Application Selector monitors the DOS function calls by 'chaining into' interrupt 21H. It places its address at the location for interrupt 21H, performs any preliminary checks as needed, then calls DOS at the address originally stored in the interrupt 21H vector to allow DOS to execute the desired function. When DOS returns, the return passes control back to the Application Selector monitoring code. The return codes from DOS are then checked to determine whether or not the operation was successful, and the necessary tracking information is saved. Control is then returned to the application making the DOS call.

While chained into the DOS function calls as described above, the Application Selector monitors all calls related to accessing of the diskettes. The open file table has 20 entries, each containing the following information: Execution level - PSP address of the process opening the file
(xxx)

FCB address or File Handle - identifier for type of Open (yyyy)

Drive letter - Drive letter indicating which drive the open file is on (d:)

Path - complete directory path to file (zzz...)

File name - DOS filename and extension of open file (zzz...) The following algorithm describes how the open file table is maintained.
1. Whenever a successful 'handle' open function call

is detected, the current execution level, handle,

drive, path and filename are added to the table. There

are two types of DOS file 'open' calls, FCB and Handle.

For an FCB type, the application passes DOS the address

of a File Control Block (FCB) which describes the file

to be opened. This FCB is used for the open, all

read/write accesses and the close. For a Handle type,

the application passes DOS the address of a string

containing the Drive, path and filename of the file to

be opened. When opened, DOS returns a 16 bit 'handle.'

This handle is used for all read/write accesses and the

close. For a successful 'FCB' open, the table is

1

Page 2 of 4

searched, and if the file name just opened is not

already in the table, the curr...