serious bit fiddling, div10 using shift magic

forgot that arm has no division (or respectively only later models have)
many magic formulae out there, none seem to work 1000% on the
interpreter. some big 0 ending numbers are 1 off.
This commit is contained in:
Torsten Ruger
2015-11-13 20:46:27 +02:00
parent c190f718ec
commit 4a8bb32039
5 changed files with 120 additions and 52 deletions

View File

@ -152,7 +152,7 @@ module Register
@space.get_class_by_name(:Word).add_instance_method Builtin::Word.send(:putstring , nil)
obj = @space.get_class_by_name(:Integer)
[:mod , :putint , :div10 , :mod10].each do |f|
[ :putint, :mod4].each do |f|
obj.add_instance_method Builtin::Integer.send(f , nil)
end
end