Skip to content
Surf Wiki
Save to docs
general/dos-technology

From Surf Wiki (app.surf) — the open knowledge base

Job File Table


The Job File Table (JFT) is a DOS data structure in the Program Segment Prefix (PSP). It starts at PSP offset 0x18 and is 20 bytes long. For each open file handle, DOS stores the index into the System File Table (SFT). A file handle that is returned by open, _open, and other similar functions is simply an index into the JFT where DOS stored the SFT entry index for the file or device that the program opened.

When a program starts, the first 5 entries in the JFT are preconnected to the standard devices. All other handles are marked as closed by setting the value of the entry to 0xFF. The standard devices are initialised as follows:

HandleDescription
0Standard input
1Standard output
2Standard error
3COM1
4LPT1

Handles 0-2 are connected to the console device. During program execution they can get modified (closed, redirected) like any other handle.

Because the size of the JFT in the PSP is limited to 20 bytes, originally only 15 files (20 minus the 5 standard devices) could be open at a time. In MS-DOS 2.0, the Extended Job File Table was introduced, which allowed up to 254 files to be opened.

As of MS-DOS 3.30, the size of the JFT can be modified with a call to INT 21h, 67h.

References

References

  1. "First steps towards system programming under MS-DOS 7/Appendix - Wikibooks, open books for an open world".
Info: Wikipedia Source

This article was imported from Wikipedia and is available under the Creative Commons Attribution-ShareAlike 4.0 License. Content has been adapted to SurfDoc format. Original contributors can be found on the article history page.

Want to explore this topic further?

Ask Mako anything about Job File Table — get instant answers, deeper analysis, and related topics.

Research with Mako

Free with your Surf account

Content sourced from Wikipedia, available under CC BY-SA 4.0.

This content may have been generated or modified by AI. CloudSurf Software LLC is not responsible for the accuracy, completeness, or reliability of AI-generated content. Always verify important information from primary sources.

Report