PowerPC Simulation

Simulating the task with the SDS PowerPC simulator

The steps in simulating the task using the file on the PowerPC simulator are essentially the same as using the 68K simulator.

  1. Change the properties of the PowerPC tool to your working directory before activating the tool.
  2. Use the FILE | Debug menu option to download the code to simulate.
  3. Set a breakpoint at the CRASHPOINT instruction.
  4. Examine the Register and Memory windows as you Step-In (F8) through the code. You will need to use the Step-in operation as the start up procedure involves calling your code as a subroutine (mycode) as was done with the 68K code.
  5. Apparently the DIAB DATA assembler does not place enough information in the object file to enable you to bring up the source file into the Source window.

    You should also check the following WEB pages to better understand what you see on the PowerPC simulator screen. There are whole series of limitations to overcome with the demo kit release as will be apparent as you look at the Simulator screen.

  6. After the running the program, you can examine the contents of memory address SUM (0x7200) as you did using the 68K simulator.

Completing Laboratory 1 on the PowerPC simulator

You will have to solve the following problems to complete Laboratory 1.

  1. There is an instruction missing. Modify the code in ppcfinal.s so that your mycode subroutine correctly returns to the start-up code.
  2. The final three lines of "ppcfinal.s" place the value of SUM (0x7200) into register R4 using "C" language masking and downshifts. Replace this code with the @l and @h assembler directives. Set a break point at the

    STH R3, 0(R4)

    instruction and check that the correct value (0x7200) is loaded into register R4. (Examine the simulator's Register window.)

  3. Now set SUM to have the value 0x8200 and simulate again. Important:- Read this link before simulating.

Before you proceed to Laboratory 2, but ONLY IF you have completed the 3 tasks set out above, print out your "Official PowerPC assembly language programmer's certificate".


Equating the label SUM to 0x8200 and then simulating

If you try to simulate the code with SUM = 0x8200 you will find that the code will not simulate if you have already set up your computer environment for Laboratory 2. In the file sstep.ini you installed in the init directory there is a line that sets the memory model specification to only use the 8K bytes of memory from location 0x0000 to 0x7FFF. Remove that line if you want to simulate Task 1 with SUM = 0x8000. Replace the line later so that Laboratory 2 will run.



Last modified: July 22, 1996 10:01 PM by M. Smith.
Copyright -- M. R. Smith