just keep binary code payload at 13 for now
there is an extra in there at the last of the last, but ok
This commit is contained in:
@ -160,7 +160,7 @@ module Risc
|
||||
binary = method.binary
|
||||
total_byte_length = method.cpu_instructions.total_byte_length
|
||||
log.debug "Assembled code #{method.name} with length #{length}"
|
||||
raise "length error #{binary.char_length} != #{total_byte_length}" if binary.char_length <= total_byte_length
|
||||
raise "length error #{binary.total_byte_length} != #{total_byte_length}" if binary.total_byte_length <= total_byte_length
|
||||
raise "length error #{length} != #{total_byte_length}" if total_byte_length != length
|
||||
end
|
||||
|
||||
|
@ -46,7 +46,7 @@ module Risc
|
||||
translator.translate( self )
|
||||
end
|
||||
|
||||
def assemble_all io , labels = []
|
||||
def assemble_all( io , labels = [] )
|
||||
self.assemble(io)
|
||||
self.next.assemble_all(io, labels) if self.next
|
||||
end
|
||||
@ -55,7 +55,7 @@ module Risc
|
||||
raise "Abstract called on #{self}"
|
||||
end
|
||||
|
||||
def total_byte_length labels = []
|
||||
def total_byte_length( labels = [])
|
||||
ret = self.byte_length
|
||||
ret += self.next.total_byte_length(labels) if self.next
|
||||
#puts "#{self.class.name} return #{ret}"
|
||||
|
Reference in New Issue
Block a user