Vesp 1.0 Return to lecture notes
                  Welcome to Vesp 1.1
                  
                  
Type 
 0 to enter a program
 1 to display registers
 2 to display memory: 0
                  
Enter your program's starting address ( >= 2) as a 3-digit hex number: 002
Enter 0 to type in your program or 1 to read it from a file: 1
Enter the file name: add.vesp
                  
Here is your program: 
                  
Location 0002: 2000
Location 0003: 0009
Location 0004: 2001
Location 0005: 0007
Location 0006: 0000
Location 0007: 7000
                  
Enter 0 if you wish to execute the program, 1 to step it, 2 to exit to the main menu: 0
Enter 0 for a brief trace 1 for long trace: 1
                  
Machine Cycle 1:  PC = 0002, 
FETCH SUBCYCLE
MAR = 0002, IR = 2000, 
Clock cycle = 2
DECODE SUBCYCLE
Decoded instruction is: LDA
Clock cycle = 2
EXECUTE SUBCYCLE
Clock cycle = 3
                  
A = 0009, B = 0000, Z = 0, S = 0, C = 0, F = 0
MAR = 0002, PC = 0004, IR = 2000, reset = 0
add = 0 complement = 0
                  
Memory[0000] = 0009
                  
Machine Cycle 2:  PC = 0004, 
FETCH SUBCYCLE
MAR = 0004, IR = 2001, 
Clock cycle = 5
DECODE SUBCYCLE
Decoded instruction is: LDA
Clock cycle = 5
EXECUTE SUBCYCLE
Clock cycle = 6
                  
A = 0009, B = 0007, Z = 0, S = 0, C = 0, F = 0
MAR = 0004, PC = 0006, IR = 2001, reset = 0
add = 0 complement = 0
                  
Memory[0001] = 0007
                  
Machine Cycle 3:  PC = 0006, 
FETCH SUBCYCLE
MAR = 0006, IR = 0000, 
Clock cycle = 8
DECODE SUBCYCLE
Decoded instruction is: ADD
Clock cycle = 8
EXECUTE SUBCYCLE
Clock cycle = 9
                  
A = 0010, B = 0007, Z = 0, S = 0, C = 0, F = 0
MAR = 0006, PC = 0007, IR = 0000, reset = 0
add = 1 complement = 0
                  
Machine Cycle 4:  PC = 0007, 
FETCH SUBCYCLE
MAR = 0007, IR = 7000, 
Clock cycle = B
DECODE SUBCYCLE
Decoded instruction is: HLT
Clock cycle = B
EXECUTE SUBCYCLE
Clock cycle = C
                  
A = 0010, B = 0007, Z = 0, S = 0, C = 0, F = 0
MAR = 0007, PC = 0008, IR = 7000, reset = 1
add = 0 complement = 0
                  
The number of instructions executed  = 4
The number of clock cycles used = 12
                  
Type 
 0 to enter a program
 1 to display registers
 2 to display memory: 

Return to lecture notes