Machine Language Emulator

The machine language emulator below is a version of that which is used in the textbook "An Invitation to Computer Science" by G. Michael Schneider and Judith L. Gersting, PWS Publishing, Pacific Grove CA, 1998. Chapter 5.

You must enter code into this machine by clicking on the PC column to the left of the instruction you need to modify, and then cycling the values using the square buttons above or below the op-code or operand. Once entered you can run the program by clicking on the PROGRAM EXECUTION MODE button and then either stepping through the code (STEP) or running freely (RUN). You may modify the program at any time by returning to the PROGRAM INPUT MODE. As the program runs you will notice the arrow in the PC column moving to indicate the instruction that is about to be executed. At the same time the contents of the machine registers are shown (in decimal) in the left hand column.

NOTE: Different than the machine in the book, this emulator uses only four bit operands (addresses).

       
Registers
PC
Address
Op-Code
Operand *
Program Counter

R-register (ALU register)

Instruction Register

Memory Address Register

GT Register

EQ Register

LT Register

       

* Since this emulator only allows addressing the first sixteen memory locations, only the last four bits of the operand field is shown. For this reason the instructions and data can be placed at successive byte addresses. Data is considered to be 8 bits long.


Last updated 2000/10/17
© J.A.N. Lee, 2000.