Computer Systems - Tutorial 3
This tutorial is to help you get used to using the CPU
Simulation software (which can be downloaded from the Web page
containing course material).
To download, follow these simple steps:-
-
- Create a directory on your h:\ drive called csh
-
- Click on the all files on the Web page and save them in
h:\csh when prompted
-
- Change the name of install.ps to install.bat
-
- Open MS-DOS and enter h:\csh\install
The simulator will be loaded and compiled for you, complete
with a test program. Now you are ready to complete the following
exercises.
-
- Open Notepad, and enter the following program:-
*
* A simple test program
*
LDA #$FF
STA $60
LDX #$60
CLR
LDA X
END
Once you have done this, save on your h: drive as
"test1.asm". Then run MS-DOS and assemble the program
using:-
java Assemble test1
What is the result of doing this?
-
- What does this program do? Simulate the register
transfers for the program (using the CPU simulator - java
App test1), and list these out.
-
- Modify the above program to increment XR after the LDA X
instruction and to repeat the task 10 times using a loop
with label. (To test, write a pre-program that fills the
memory from $60 to $69 with different values.)
Back
to Index Page