Vesp 1.0 Return to lecture notes
Welcome to Vesp 1.0
                  
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 instruction  0 using a 4-digit hex number
Or type -1 to end your program: 2000
Enter instruction  1 using a 4-digit hex number
Or type -1 to end your program: 0002
Enter instruction  2 using a 4-digit hex number
Or type -1 to end your program: 2000
Enter instruction  3 using a 4-digit hex number
Or type -1 to end your program: 0007
Enter instruction  4 using a 4-digit hex number
Or type -1 to end your program: 0000
Enter instruction  5 using a 4-digit hex number
Or type -1 to end your program: 7000
Enter instruction  6 using a 4-digit hex number
Or type -1 to end your program: -1
                  
Here is your program: 
                  
Location 002: 2000
Location 003: 0002
Location 004: 2000
Location 005: 0007
Location 006: 0000
Location 007: 7000
Enter 1 if you wish to step the program, and 0 to execute it : 0
Machine Cycle 1:  PC = 002, 
FETCH SUBCYCLE
MAR = 0002, IR = 2000, 
Clock cycle = 2
                  
DECODE SUBCYCLE
The decoded instruction is: LDA
Clock cycle = 2
                  
EXECUTE SUBCYCLE
Clock cycle = 3
                  
A = 0002, B = 0000, Z = 0, S = 0, C = 0, F = 0
MAR = 002, reset = 0
add = 0
complement = 0
                  
Memory[0] = 0002,
                  
Machine Cycle 2:  PC = 004, 
FETCH SUBCYCLE
MAR = 0004, IR = 2000, 
Clock cycle = 5
                  
DECODE SUBCYCLE
The decoded instruction is: LDA
Clock cycle = 5
                  
EXECUTE SUBCYCLE
Clock cycle = 6
                  
A = 0007, B = 0000, Z = 0, S = 0, C = 0, F = 0
MAR = 004, reset = 0
add = 0
complement = 0
                  
Memory[0] = 0007,
                  
Machine Cycle 3:  PC = 006, 
FETCH SUBCYCLE
MAR = 0006, IR = 0000, 
Clock cycle = 8
                  
DECODE SUBCYCLE
The decoded instruction is: ADD
Clock cycle = 8
                  
EXECUTE SUBCYCLE
Clock cycle = 9
                  
A = 0007, B = 0000, Z = 0, S = 0, C = 0, F = 0
MAR = 006, reset = 0
add = 1
complement = 0
                  
Machine Cycle 4:  PC = 007, 
FETCH SUBCYCLE
MAR = 0007, IR = 7000, 
Clock cycle = 11
                  
DECODE SUBCYCLE
The decoded instruction is: HLT
Clock cycle = 11
                  
EXECUTE SUBCYCLE
Clock cycle = 12
                  
A = 0007, B = 0000, Z = 0, S = 0, C = 0, F = 0
MAR = 007, 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: 1
                  
A = 0007, B = 0000, Z = 0, S = 0, C = 0, F = 0
MAR = 007, PC = 008, IR = 7000, reset = 0
                  
Type 
 0 to enter a program
 1 to display registers
 2 to display memory: 2
                  
Enter the first address: 002
Enter the last address: 010
                  
Location 2 : 2000
Location 3 : 2
Location 4 : 2000
Location 5 : 7
Location 6 : 0
Location 7 : 7000
Location 8 : ffff
Location 9 : 0
Location a : 0
Location b : 0
Location c : 0
Location d : 0
Location e : 0
Location f : 0
Location 10 :0
                  
Type 
 0 to enter a program
 1 to display registers
 2 to display memory: 

Return to lecture notes