Debug Station

The debug station works like a debug tool for microprocessors. It allows low level access to the machine. The functions provided by this station are:


 * Read and write any location in main memory - both data and program spaces.
 * Read and write any register, including the status bits.
 * Insert HALT or BREAK commands in a specified location in program space.
 * Start execution at a specified location (in program space).



=Connections= The central function of the debug station is to enter, test and modify machine code. To this end it needs to be connected to and take control of all the necessary sub-systems or components of the CPU.

It parallels into the program memory addressing, using the implicit OR in SCE. Since the station can take control of the PC it sends a command to force the IP to '0000'. During normal operation and when the station is executing code, the station keeps its outputs at '0000'.

=Software Support= The machine code includes an instruction HALT, which stops the advancement of the PC. The station can also insert a JMP-immediate opcode, which can jump to a debug routine.

The debug station includes a small set of machine code routines to help with its operation. These routines are position independent and may be loaded into program space at any specified location, so they won't interfere with the program being debugged. The base location must be known and entered into the station to use them.

One routine copies the instruction from a specified location and saves it in a register file then replaces it with the HALT instruction.