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

View File

@ -24,12 +24,13 @@ module RubyX
mom.translate(platform)
end
def ruby_to_binary(platform = :arm)
def ruby_to_binary(platform)
Parfait.boot!
Risc.boot!
linker = ruby_to_risc(platform)
linker.position_all
linker.create_binary
linker
end
end
end