thats putstring working again (better testing == better code => better sleep, longer life :-)

This commit is contained in:
Torsten Ruger
2014-05-21 21:27:05 +03:00
parent 587fd56300
commit e3bccaa0fe
3 changed files with 10 additions and 3 deletions

View File

@ -94,7 +94,14 @@ module Vm
end
def load block , right
block.mov( self , right )
if(right.is_a? IntegerConstant)
block.mov( self , right ) #move the value
elsif right.is_a? StringConstant
block.add( self , right , nil) #move the address, by "adding" to pc, ie pc relative
block.mov( Integer.new(register+1) , right.length ) #and the length HACK TODO
else
raise "unknown #{right.inspect}"
end
self
end