2018-07-01 10:53:18 +02:00
|
|
|
module Risc
|
|
|
|
class Assembler
|
2018-07-03 09:12:22 +02:00
|
|
|
attr_reader :method , :instructions
|
|
|
|
|
|
|
|
def initialize( method , instructions)
|
2018-07-01 10:53:18 +02:00
|
|
|
@method = method
|
|
|
|
@instructions = instructions
|
|
|
|
total = instructions.total_byte_length / 4 + 1
|
|
|
|
method.binary.extend_to( total )
|
|
|
|
end
|
|
|
|
end
|
|
|
|
end
|