This commit is contained in:
Torsten Ruger
2018-03-26 19:17:30 +03:00
parent 46a5eefbd4
commit e61ef93943
4 changed files with 23 additions and 31 deletions

View File

@@ -36,24 +36,10 @@ module Risc
ret
end
# derived classes must provide a byte_length
def byte_length
raise "Abstract called on #{self}"
end
def to_cpu( translator )
translator.translate( self )
end
def assemble_all( io )
self.assemble(io)
self.next.assemble_all(io) if self.next
end
def assemble io
raise "Abstract called on #{self}"
end
def total_byte_length
ret = 0
self.each{|ins| ret += ins.byte_length}