jump was written off the end of binary code, fixed
This commit is contained in:
@ -33,8 +33,8 @@ module Risc
|
||||
end
|
||||
end
|
||||
def reset_to(pos , ignored)
|
||||
super(pos, ignored)
|
||||
init(pos , ignored)
|
||||
super(pos, ignored)
|
||||
Position.log.debug "ResetCode (#{pos.to_s(16)}) #{code}"
|
||||
end
|
||||
# insert a jump to the next instruction, at the last instruction
|
||||
|
@ -24,7 +24,7 @@ module Risc
|
||||
end
|
||||
def init(at, binary)
|
||||
return if at == 0 and binary.nil?
|
||||
raise "faux pas" if Position.get(instruction).at < Position.get(binary).at
|
||||
raise "faux pas" if at < Position.get(binary).at
|
||||
return unless @instruction.next
|
||||
@binary = binary
|
||||
nekst = at + @instruction.byte_length
|
||||
@ -43,8 +43,8 @@ module Risc
|
||||
end
|
||||
|
||||
def reset_to(pos , binary)
|
||||
super(pos , binary)
|
||||
init(pos , binary)
|
||||
super(pos , binary)
|
||||
Position.log.debug "ResetInstruction (#{pos.to_s(16)}) #{instruction}"
|
||||
end
|
||||
end
|
||||
|
Reference in New Issue
Block a user