Computing.Net > Forums > Programming > How to Get Segment of PSP?

How to Get Segment of PSP?

Reply to Message Icon

Original Message
Name: DOS Coder
Date: November 10, 2003 at 07:51:12 Pacific
Subject: How to Get Segment of PSP?
OS: DOS
CPU/Ram: Intel
Comment:

When Program Run, DS=ES=Segment of PSP.
But if my program is running, CS,DS,ES is Changed.how can I get the Segment of PSP?
I know DOS Int21H, Func 62H,50H,51H Could Get and Set Segment of PSP for current process.
Now I wonder How Func 62H work???
I mean How to GET and Set Segment of PSP for current process without DOS INT???


Report Offensive Message For Removal


Response Number 1
Name: wtk
Date: November 11, 2003 at 00:50:28 Pacific
Reply: (edit)

hello,

if i don't make any mistake, register cs contains the segment of PSP. when we do a "org 100h" for a program compiled to .com in dos, it says goto offset 100h, which is counted starting from cs:0, and the offset 0 to 100h (256 bytes) is the psp for a .com program.

hope that help =)

wtk


Report Offensive Follow Up For Removal

Response Number 2
Name: DOS Coder
Date: November 12, 2003 at 23:14:48 Pacific
Reply: (edit)

Thanks a lot.But if my program is .EXE file,how to get Segment of PSP?You know when Program is running, CS,DS,ES is Changed.
Please help!


Report Offensive Follow Up For Removal







Use following form to reply to current message:

   Name: From My Computing.Net Settings
 E-Mail: From My Computing.Net Settings

Subject: How to Get Segment of PSP?

Comments:

 


  Homepage URL (*): 
Homepage Title (*): 
         Image URL: 
 
Data Recovery Software




Have you ever used OpenOffice?

Yes, as my main suite.
Yes, occationally.
Yes, but only once.
No, never.


View Results

Poll Finishes In 5 Days.
Discuss in The Lounge