diff --git a/lib/risc/assembler.rb b/lib/risc/assembler.rb index 81371db5..e5f7599c 100644 --- a/lib/risc/assembler.rb +++ b/lib/risc/assembler.rb @@ -38,7 +38,7 @@ module Risc objekt.create_binary if objekt.is_a? Parfait::TypedMethod binary = objekt.binary Positioned.set_position(binary,at) - objekt.risc_instructions.set_position( at + 12) # BinaryCode header + objekt.cpu_instructions.set_position( at + 12) # BinaryCode header len = 4 * 14 at += binary.padded_length nekst = binary.next diff --git a/test/risc/test_assembler.rb b/test/risc/test_assembler.rb index f449676e..7b0261e5 100644 --- a/test/risc/test_assembler.rb +++ b/test/risc/test_assembler.rb @@ -14,10 +14,9 @@ module Risc @assembler = Assembler.new(@machine , Collector.collect_space) assert @machine.translate_arm end - def test_write_fails @assembler = Assembler.new(@machine , {}) - assert_raises{ @assembler.assemble} #must translate first + assert_raises{ @assembler.write_as_string} #must translate first end def test_assemble_no_objects @assembler = Assembler.new(@machine , {})