auto extend binary code

final solution will need repositioning
This commit is contained in:
Torsten Ruger
2018-04-03 15:07:36 +03:00
parent 30ca70e042
commit 52d389cdbf
3 changed files with 21 additions and 5 deletions

View File

@ -15,12 +15,15 @@ module Risc
# LinkException may be thrown, possibly several times
# So repeat until it works
def assemble( instruction )
ok = false
until(ok)
not_ok = 1
while(not_ok)
begin
#puts "Not ok #{not_ok}"
#FIXME really need to reposition here, so jumps go right
assemble_all(instruction)
ok = true
not_ok = false
rescue LinkException
not_ok += 1
end
end
end