more test fixing

only one bug to go
This commit is contained in:
Torsten Ruger
2018-05-24 21:20:56 +03:00
parent bf23883270
commit 8d8cc4b016
27 changed files with 332 additions and 348 deletions

View File

@ -48,6 +48,7 @@ module Risc
def set_pc( pos )
raise "Not int #{pos}" unless pos.is_a? Numeric
position = Position.at(pos)
raise "No position #{pos}" unless position
if position.is_a?(Position::CodePosition)
log.debug "Setting Position #{clock}-#{position}, #{position.method}"
return set_pc(position.at + Parfait::BinaryCode.offset)
@ -114,7 +115,7 @@ module Risc
# Instruction interpretation starts here
def execute_DynamicJump
method = get_register(@instruction.register)
set_instruction( method.risc_instructions )
set_pc( Position.get(method.cpu_instructions).at )
false
end
def execute_Branch