Content deleted Content added
Matthiaspaul (talk | contribs) Commented out faulty example until the code gets fixed. Not a good idea to give faulty examples. Some formatting. |
add fields; mention Int 21h function 51h which is the same as Int 21h function 62h |
||
Line 58:
| Pointer to JFT (internal)
|-
| 38h-
| dword
| 24 bytes▼
| Pointer to previous PSP (only used by SHARE in DOS 3.3 and later)
|-
| 3Ch-3Fh
| Reserved
|-
| 40h-41h
| word
| DOS version to return (DOS 4 and later, alterable via SETVER in DOS 5 and later)
|-
| 42h-4Fh
| 14 bytes
| Reserved
|-
Line 89 ⟶ 101:
The PSP is most often used to get the command line arguments of a DOS program, for example the command "FOO.EXE /A /F" executes FOO.EXE with the arguments '/A' and '/F'.
The segment address of the PSP is passed in the DS register when the program is executed. It can also be determined later by using
Alternatively, in [[.COM]] programs loaded at offset <tt>100h</tt>, one can address the PSP directly just by using the offsets listed above. Offset <tt>000h</tt> points to the beginning of the PSP, <tt>0FFh</tt> points to the end, etc.
|