interpreter tests working again

This commit is contained in:
Torsten Ruger
2018-07-02 17:29:26 +03:00
parent 6af651a886
commit a1197fb70c
4 changed files with 27 additions and 28 deletions

View File

@ -33,7 +33,7 @@ module Risc
end
def start_program
initialize
initialize(@linker)
init = @linker.cpu_init
set_state(:running)
set_pc( Position.get(init).at )
@ -62,7 +62,7 @@ module Risc
end
def set_instruction( instruction )
raise "set to same instruction #{instruction}:#{instruction.class}" if @instruction == instruction
raise "set to same instruction #{instruction}:#{instruction.class} at #{clock}" if @instruction == instruction
log.debug "Setting Instruction #{instruction.class}"
old = @instruction
@instruction = instruction