set label integer to position

This commit is contained in:
Torsten Ruger
2018-05-29 20:30:02 +03:00
parent 8322fca7b3
commit 296617cbaf
2 changed files with 10 additions and 0 deletions

View File

@ -24,6 +24,7 @@ module Risc
end
def init(at, binary)
@binary = binary
instruction.integer.set_value(at) if instruction.is_a?(Label)
return if at == 0 and binary.nil?
raise "faux pas" if at < Position.get(binary).at
return unless @instruction.next