PowerPC -- Stopping the program

With the 68K, to stop the program from "running free" we inserted a TRAP #15 instruction. Unless the SDS 68K simulator is configured in a special way (see Laboratory 2) the TRAP instruction acts as an illegal instruction. The SDS simulator stops at all illegal instructions.

I took the same approach to stop the SDS PowerPC simulator. However, I was unable to find a PowerPC instruction that was equivalent to the 68K TRAP instruction. Instead I "built" an illegal instruction by placing a nonsense data value at the end of the code.

CAUSECRASH:	.equ 0x000000		# An illegal instruction
	.long CAUSECRASH

Except for the fact that it is difficult to make happen automatically, a better approach to stopping tyour PowerPC program is to simply place a BREAKPOINT in the SDS Source window after the last program instruction.

I hope to find a better approach soon and modify this page.



Last modified: July 04, 1996 06:21 PM by M. Smith.
Copyright -- M. R. Smith