Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

MCBs

Status
Not open for further replies.

nyarmi

Programmer
Aug 30, 2001
5
IL
I want to make a program that finds every memory address' owner, by finding it's MCB, then the program's PSP, and then the program's name.
Is it possible?
If it is, how can I find in which MCB the address is?
Thanks
 
What do you need it for? Don't you have mem.exe?

By the way, the program's name is in the MCB, you won't reliably find it in the PSP because the area where the program's name is stored is cannibalized by DOS when doing some file I/O. It's in the last 8 bytes of the MCB if my memory serves me right. This enhancement was introduced in DOS 3.3 I think.

Supposing you know the address of a certain memory block, its MCB is in the previous paragraph. To determine the next MCB, just add the size word in the MCB to the address of the current MCB, +1 paragraph.

I don't know how to locate the first MCB in the chain, however. Try disassembling mem.exe. "Information has a tendency to be free. Which means someone will always tell you something you don't want to know."
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top