Part 2: Some Techniques

Procedures to get control at a point other than a trap:

One approach is to use clever breakpoints within OS/2. Stopping at the first executable instruction of a program

This command tells the debug kernel that we want control on the debug terminal at some specific point. The problem is that the place where we would like to get control is not loaded into memory until we run the program, and it is difficult at best to type Control-C at just the right time. Enter the command BP DosLibIDisp,'.p*'

The content of the quoted string is the command to execute when we arrive at the breakpoint. This will assure us that we are in the correct context, because the output of '.p' includes the module name.

Let the MUT run, and execute OSPREY once again.

You will probably get control in the context of OSPREY. If not, issue 'g' again a time or two until you are.

If you simply try the command BP 0F:1BBE, you will discover that the page is not yet loaded. There are two ways around this problem.