Abcol Logo

You have now reached Chrissie's web pages for

Computer Architecture D75 P34

Tracing a Line Of Code Through The Processor (The Fetch - Decode - Execute Cycle).

Use the applet to help you trace how the lines of code affect the register values as the program is executed. You may find it helpful to print out a copy of the program to have beside you as you do this.

You should then try to complete a Fetch-Decode-Execute grid showing the different values in the registers as you work through the applet, as this will be good practice for one of the questions in Outcome 3. You can download blank grids from here.

The program consists of the following lines of code :-

0100

LDA-105

#Loads the accumulator with contents of 105

0101

ADD-106

#Get contents of 106 and add it to the accumulator

0102

STA-107

#store the accumulator contents in 0107

0103

OUT-3F8

#Output the accumulator results to device at 3F8

0104

HLT

#stop the program

Please note that this program is a java applet and can behave erratically if you have a lot of other programs open at the same time! If you don't see a clock and set of scales when the page first loads, hit refresh.

Start by using the "step" button to follow the code one step at a time. Once you are more confident, use the "auto run" button to make the program execute automatically, and try to anticipate what will happen next. (Note that when using "auto run" the cycle may take a moment or two to start.)

Architecture Home Pascal Home Web Design Home Java Stuff Home Extra Stuff Home Other Stuff Home

Comments? c.nyssen@abcol.ac.uk
Last updated - 11/07/03

Best viewed at 800x600 in 16-bit high color with Trebuchet MS installed. If you do not have this font, click here