fix arm write syscall

This commit is contained in:
Torsten Ruger 2018-06-19 10:49:53 +03:00
parent 046617f8dc
commit 9fc7f9b528

View File

@ -140,7 +140,7 @@ module Arm
end end
def putstring( int_code ) def putstring( int_code )
codes = ArmMachine.add( :r1 , :r1 , 12 ) # adjust for object header codes = ArmMachine.add( :r1 , :r1 , Parfait::Word.type_length*4 ) # adjust for object header
codes.append ArmMachine.mov( :r0 , 1 ) # write to stdout == 1 codes.append ArmMachine.mov( :r0 , 1 ) # write to stdout == 1
syscall(int_code , codes ) syscall(int_code , codes )
end end