fixed foo and hello, next putint
This commit is contained in:
@ -96,9 +96,9 @@ module Arm
|
||||
# assumes string in standard receiver reg (r2) and moves them down for the syscall
|
||||
def write_stdout function #, string
|
||||
# TODO save and restore r0
|
||||
function.mov( :r0 , 1 ) # 1 == stdout
|
||||
function.mov( :r1 , :r2 )
|
||||
function.mov( :r2 , :r3 )
|
||||
function.mov( :r0 , 1 ) # 1 == stdout
|
||||
function.mov( :r1 , RECEIVER_REG )
|
||||
function.mov( RECEIVER_REG , :r3 )
|
||||
syscall( function.insertion_point , 4 ) # 4 == write
|
||||
end
|
||||
|
||||
|
Reference in New Issue
Block a user