Ci-dessous, les différences entre deux révisions de la page.
Les deux révisions précédentesRévision précédenteProchaine révision | Révision précédente | ||
back2root:ibm-pc-ms-dos:hardware:informations:program_segment_prefix [2023/01/16 17:54] – supprimée - modification externe (Unknown date) 127.0.0.1 | back2root:ibm-pc-ms-dos:hardware:informations:program_segment_prefix [2024/08/13 11:26] (Version actuelle) – [PSP - DOS Program Segment Prefix Layout] frater | ||
---|---|---|---|
Ligne 1: | Ligne 1: | ||
+ | ====== PSP - DOS Program Segment Prefix Layout ====== | ||
+ | The Program Segment Prefix (PSP) is a data structure used in DOS systems to store the state of a program. It resembles the Zero Page in the CP/M operating system. The PSP has the following structure: | ||
+ | |||
+ | {{tablelayout? | ||
+ | ^ Offset | ||
+ | | 00 | word | CP/M like exit code, always contains machine code [[back2root: | ||
+ | | 02 | word | top of memory in segment (paragraph) form | | ||
+ | | 04 | byte | reserved for DOS, usually 0 | | ||
+ | | 05 | 5 bytes | machine code instruction long call to the DOS function dispatcher (obsolete CP/M) | | ||
+ | | 06 | word | .COM programs bytes available in segment (CP/ | ||
+ | | 0A | dword | [[back2root: | ||
+ | | 0E | dword | [[back2root: | ||
+ | | 12 | dword | [[back2root: | ||
+ | | 16 | word | parent process segment addr (Undoc. DOS 2.x+) COMMAND.COM has a parent id of zero, or its own PSP | | ||
+ | | 18 | 20 bytes | file handle array (Undocumented DOS 2.x+); if handle array element is FF then handle is available. Network redirectors often indicate remotes files by setting these to values between 80-FE. | ||
+ | | 2C | word | segment address of the environment, | ||
+ | | 2E | dword | SS:SP on entry to last INT 21 function (Undoc. 2.x+) ((see Bibliography for reference to " | ||
+ | | 32 | word | handle array size (Undocumented DOS 3.x+) | | ||
+ | | 34 | dword | handle array pointer (Undocumented DOS 3.x+) | | ||
+ | | 38 | dword | pointer to previous PSP (deflt FFFF:FFFF, Undoc 3.x+) ((see Bibliography for reference to " | ||
+ | | 3C | 20 bytes | unused in DOS before 4.01 ((see Bibliography for reference to " | ||
+ | | 50 | 3 bytes | DOS function dispatcher CDh 21h CBh (Undoc. 3.x+) ((see Bibliography for reference to " | ||
+ | | 53 | 9 bytes | unused | ||
+ | | 5C | 36 bytes | default unopened [[back2root: | ||
+ | | 6C | 20 bytes | default unopened [[back2root: | ||
+ | | 80 | byte | count of characters in command tail; all bytes following command name; also default DTA (128 bytes) | ||
+ | | 81 | 127 bytes | all characters entered after the program name followed by a CR byte | | ||
+ | |||
+ | ===== Notes ===== | ||
+ | |||
+ | <WRAP round box> | ||
+ | * offset 5 contains a jump address which is 2 bytes too low for PSP's created by the DOS EXEC function in DOS 2.x+ Ø | ||
+ | * program name and complete path can be found after the environment in DOS versions after 3.0. See offset 2Ch. | ||
+ | </ |