next up previous contents

[ENGN3213 Home]

Running a Program on the BSVC

Assuming the BSVC simulator has been started and the setup file loaded, load the program clab51s.h68 as follows:

File $\to$ Load Program
and select clab51s.h68. Open the program listing window:
Window $\to$ Program Listing
The program listing should appear in this window.

If you examine the memory locations starting at $2000 you will find the machine code. Examine it to check that it loaded correctly.

The memory locations starting at $0000 contain some reset data:

$0000-0003 - contains the 32-bit value $00008000, the reset value of the stack pointer

$0004-0007 - contains the 32-bit value $00002000, the reset value of the program counter

Press the RESET button and these values will be loaded. Which registers contain these values? (With reset set up like this, it is not necessary to manually set PC or SP.)

To run the program, simply press the RUN button. Verify that the program ran correctly, as before.

Observe the program listing window as you single-step through the program.


next up previous contents

[ENGN3213 Home]

ANU Engineering - ENGN3213