Using the HIWAVE.EXE simulator for ENSC 215/CMPT 150.
--------------------------------------------
Craig Scratchley
Copyright (C) 2005-2011 School of Engineering Science, SFU, Burnaby, BC, Canada

To run the simulator, invoke the hc12e215 shortcut
(for example by double clicking on the file).

The file assumes that the HIWAVE.EXE executable
is in the directory 
"c:\Program Files\Metrowerks\CodeWarrior CW12_V3.0\prog\"
This should be true for most University computers on 
which the software is installed.  If this is 
not the case for your computer, you may have to modify the
directory name in the shortcut.

This will launch the simulator and have it configured
to simulate the CPU12 instruction set.  It will also
load $0d00 into the program counter (PC), also referred
to as the instruction pointer (IP).  Finally, it will
load values into memory, starting at location $0d00, 
from a file called "project.s19".

In order to change the value in a memory location, double 
click on the current value and enter the new value.  You should 
always hit the tab key to move to the next memory location.

In order to execute a single instruction, hit F11 or click
on the "Single Step" button on the tool bar.  In order to
run your whole program, hit F5 or click on the 
"Start/Continue" button.

The "Reset Target" button will reset the PC and SP.

You will probably want to save the changes you made to memory
before you exit the HIWAVE.EXE program.  To do so, you can either
invoke the save command from the "Command" window, or you can 
call the "saves19.cmd" command file I've created.  To call the 
command file, type the following in the command window:

call saves19.cmd

The command file merely runs the command:

save $d00..$fff project.s19

You can set a breakpoint by using the bs command in the command
window.  For example, to set a breakpoint at location $0d01,
enter the following:

bs $0d01

To list (dislay) your breakpoints, enter:

bd

To clear a breakpoint, use the bc command.  For example, to clear
the breakpoint at location $0d01, enter:

bc $0d01

Happy machine coding.



