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:-

  1.  
  2. Create a directory on your h:\ drive called csh
  3.  
  4. Click on the all files on the Web page and save them in h:\csh when prompted
  5.  
  6. Change the name of install.ps to install.bat
  7.  
  8. 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.

  1.  
  2. 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?

  1.  
  2. What does this program do? Simulate the register transfers for the program (using the CPU simulator - java App test1), and list these out.
  1.  
  2. 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