getting a _start and _exit, just missing the actual code

This commit is contained in:
Torsten Ruger
2014-05-06 00:12:04 +03:00
parent 7d20b5e2df
commit 22b5117c8b
12 changed files with 43 additions and 105 deletions

View File

@@ -40,14 +40,15 @@ module Arm
end
def main_entry
mov( :left => :fp , :right => 0 )
entry = Vm::Block.new("main_entry")
entry.add_code mov( :left => :fp , :right => 0 )
end
def main_exit
syscall(0)
entry = Vm::Block.new("main_exit")
entry.add_code syscall(0)
end
def syscall num
mov( :left => 7 , :right => num )
swi( :left => 0 )
[mov( :left => :r7 , :right => num ) , swi( :left => 0 )]
end
end
end