mov ah, 51h ;Get PSP Address
int 21h
mov SegmentPSP, bx ;segment address of current PSP
Get PSP Address (Function 51h) returns the segment address of the program segment prefix (PSP) for the current program.
This function has no parameters.
The BX register contains the segment address of the PSP for the current program.
Functions 62h and 51h are identical. Programs can use either function number to get the segment address of the current PSP.
Function 50h Set PSP Address