use fake memory

fix integer offset bug
(which only didn’t cause errors as fixnums are still an order too big
and the famous +1 error hit the empty space)
This commit is contained in:
Torsten Ruger
2018-05-28 15:09:59 +03:00
parent 6c06f61ab8
commit f9a89db10c
14 changed files with 42 additions and 20 deletions

View File

@ -28,7 +28,7 @@ module Risc
next_meth = next_method
return unless next_meth
Position.set( next_meth.binary , next_pos , next_meth)
next_cpu_pos = next_pos + Parfait::BinaryCode.offset
next_cpu_pos = next_pos + Parfait::BinaryCode.byte_offset
Position.set( next_meth.cpu_instructions, next_cpu_pos , next_meth.binary)
end
end

View File

@ -36,7 +36,7 @@ module Risc
next_binary.extend_one unless next_binary.next
next_binary = next_binary.next
raise "end of line " unless next_binary
nekst = Position.get(next_binary).at + Parfait::BinaryCode.offset
nekst = Position.get(next_binary).at + Parfait::BinaryCode.byte_offset
Position.log.debug "Jump to: #{nekst.to_s(16)}"
end
Position.set(@instruction.next, nekst , next_binary)