start on new binary creation process

now writing into BinaryCode instead of stream
also in the risc layer, not arm, for reusability
This commit is contained in:
Torsten Ruger
2018-03-27 20:47:41 +03:00
parent 2e57674008
commit 500851d246
4 changed files with 50 additions and 3 deletions

View File

@ -1,4 +1,5 @@
require_relative "collector"
require_relative "binary_writer"
module Risc
# The Risc Machine is an abstraction of the register level. This is seperate from the
@ -93,6 +94,15 @@ module Risc
at
end
def create_binary
objects.each do |id , method|
next unless method.is_a? Parfait::TypedMethod
puts "CODE1 #{method.name}:#{}"
writer = BinaryWriter.new(method.binary)
writer.assemble(method.cpu_instructions)
end
end
def boot
initialize
@objects = nil