rubyx/lib/risc/assembler.rb
Torsten Ruger 285a88b59f generalize assemblers to use callables
not just methods,  they are almost the same anyway
2018-07-30 10:23:42 +03:00

13 lines
292 B
Ruby

module Risc
class Assembler
attr_reader :callable , :instructions
def initialize( callable , instructions)
@callable = callable
@instructions = instructions
total = instructions.total_byte_length / 4 + 1
callable.binary.extend_to( total )
end
end
end