fixed foo and hello, next putint

This commit is contained in:
Torsten Ruger
2014-06-12 09:07:03 +03:00
parent eef6744827
commit 506f98da5a
8 changed files with 16 additions and 18 deletions

View File

@ -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