The Execution Cycle Simulation - part II

Home About the
Simulator

User's
Guide

Installation
Instructions
Examples Contact
Us
The Fundamental
Simulations
Beginner's Guide
to the 8051 - Online
Site Map
 

When you start the simulation you will see the CPU with the program counter, instruction register, memory address register and the Accumulator on the left of the screen, ROM on the right and the address bus (blue), data bus (green) and the control bus (red) in between.

Refreshing the page, which simulates power-down followed by power-up, does not change the contents of ROM because ROM is nonvolatile.

However, the data on the busses at this point is random.

This simulation is for a fictitious microcontroller with a very limited instruction set which is given in the table below.

Assembly HEX Equivalent Operation Size of Instruction
INC A E4 A <- A + 1 1 byte
DEC A E5 A <- A - 1 1 byte
LD A, data 3E data A <- data 2 bytes
JP address D6 address PC <- address 3 bytes

The following short program is assembled into machine code and placed in ROM.

LD A, 05H
INC A
INC A
DEC A
JP 0000H

As can be seen in the simulation, ROM contains:

  0 1 2 3 4 5 6 7
0000 3E 05 E4 E4 E5 D6 00 00

Step through the simulation by clicking on Next -> and watch as each instruction is decoded and executed.

 

 
Copyright (c) 2005-2013 James Rogers