INT 21 - DOS 2+ internal - GET CURRENT PROCESS ID (GET PSP ADDRESS)
AH = 51h
Return: BX = segment of PSP for current process
Notes:  DOS uses the current PSP address to determine which processes own files
and memory; it corresponds to process identifiers used by other OSs
under DOS 2.x, this function cannot be invoked inside an INT 28h
handler without setting the Critical Error flag
under DOS 3+, this function does not use any of the DOS-internal stacks
and may thus be called at any time, even during another INT 21h call
supported by OS/2 compatibility box
identical to the documented AH=62h
undocumented for DOS 2.x-4.x, but newly documented for 5.0.
SeeAlso: AH=50h,AH=62h

See also: 2126

2151 - DOS 2+ internal - GET CURRENT PROCESS ID (GET PSP ADDRESS)