Content deleted Content added
m <source lang="nasm"> |
Rescuing 1 sources and tagging 0 as dead. #IABot (v1.6.5) |
||
Line 105:
The PSP is most often used to get the [[argc|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 Int 21h function 51h or Int 21h function 62h. Either function will return the PSP address in register BX.<ref>{{cite web|url=http://www.htl-steyr.ac.at/~morg/pcinfo/hardware/interrupts/inte8fjk.htm|title=INT 21h,62h - Get PSP address (DOS 3.x)|deadurl=yes|archiveurl=https://www.webcitation.org/67Dq3UOH8?url=http://www.htl-steyr.ac.at/~morg/pcinfo/hardware/interrupts/inte8fjk.htm|archivedate=2012-04-26|df=}}</ref>
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.
|