Content deleted Content added
PSP is also passed in the DS register |
RobinHood70 (talk | contribs) m Fix title from website and use cite template |
||
Line 90:
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 [[interrupt]] 21 subfunction 62. This interrupt will return the PSP address in register BX.<ref>
Alternatively, in [[.COM]] programs, one can address the PSP directly just by using the offsets listed above. 00h points to the beginning of the PSP, FFh points to the end, etc. For example, the following code displays the command line arguments:
|