putstring was missing the steam id

This commit is contained in:
Torsten Ruger 2015-07-01 21:42:59 +03:00
parent 8f0fd30ef3
commit 1b791dc0d0

View File

@ -14,8 +14,9 @@ module Arm
end end
def putstring int_code , codes def putstring int_code , codes
codes << ArmMachine.mov( :r1 , 20 ) # String length, obvious TODO codes << ArmMachine.mov( :r0 , 1 ) # stdout == 1
codes << ArmMachine.ldr( :r0 , Register.message_reg, 4 * Register.resolve_index(:message , :receiver)) codes << ArmMachine.ldr( :r1 , Register.message_reg, 4 * Register.resolve_index(:message , :receiver))
codes << ArmMachine.mov( :r2 , 20 ) # String length, obvious TODO
syscall(int_code , codes ) syscall(int_code , codes )
end end