rubyx/lib/register/builtin/integer.rb
Torsten Ruger 4a8bb32039 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.
2015-11-13 20:46:27 +02:00

22 lines
504 B
Ruby

#integer related kernel functions
module Register
module Builtin
module Integer
module ClassMethods
include AST::Sexp
def mod4 context
compiler = Soml::Compiler.new.create_method(:Integer,:mod4 ).init_method
return compiler.method
end
def putint context
compiler = Soml::Compiler.new.create_method(:Integer,:putint ).init_method
return compiler.method
end
end
extend ClassMethods
end
end
end