assemble risc to it's position (not itself)
So in the next step the interpreter can use positions as program counter and would be much more like the real thing
This commit is contained in:
@ -19,10 +19,11 @@ module Risc
|
||||
4
|
||||
end
|
||||
def assemble(io)
|
||||
io.write_unsigned_int_32(self)
|
||||
pos = Position.get(self).at
|
||||
io.write_unsigned_int_32(pos)
|
||||
end
|
||||
class Branch < Instruction
|
||||
def first
|
||||
def first #some logging assumes arm
|
||||
self
|
||||
end
|
||||
end
|
||||
|
@ -62,7 +62,7 @@ module Risc
|
||||
case object
|
||||
when Parfait::BinaryCode
|
||||
CodePosition.new(object,at , extra)
|
||||
when Arm::Instruction , Risc::Label
|
||||
when Arm::Instruction , Risc::Instruction
|
||||
InstructionPosition.new(object,at , extra)
|
||||
else
|
||||
ObjectPosition.new(at,object)
|
||||
|
Reference in New Issue
Block a user