D-BUG12 Emulation

In order to allow the same program to run in the D-BUG12 environment and in the simulator, a D-BUG12 emulator, DBUG12.ASM, was written. This emulator has the following functionality:

The emulator also disables the COP timer, enables serial port 0 to 9600 BPS, and configures the clock stretch.

Naturally, a full D-BUG12 emulation is not necessary, because the 68HC12 simulator has most of the capabilities of the D-BUG12 user interface. The adventuresome can install the full DBUG12 program into the simulator and run it -- yes it does work!

Instructions For Use

  1. Assemble DBUG12.ASM into DBUG12.S19, if not already done.
  2. Start the simulator.
  3. Load your program you want to simulate and DBUG12.S19.
  4. Do a Reset, then press the "Go" button. Execution will stop at a BGND instruction.
  5. Set the PC register to the address of the start of your program. If your program starts at $4000, this step is not necessary.
  6. Use the simulator normally to step or run your program.
  7. If execution stops with a D-BUG12 BGND instruction, with the next instruction displayed being a "BRA", register X contains the vector number of the interrupt that occurred. For instance $1B = 27, which would be an SWI instruction interrupt - the normal way of terminating a program under D-BUG12.
  8. If execution stops with a D-BUG12 BGND instruction where the next instruction displayed being a "RTS", this is an un-implemented D-BUG12 routine. Feel free to write it for extra credit.