use fake memory

fix integer offset bug
(which only didn’t cause errors as fixnums are still an order too big
and the famous +1 error hit the empty space)
This commit is contained in:
Torsten Ruger
2018-05-28 15:09:59 +03:00
parent 6c06f61ab8
commit f9a89db10c
14 changed files with 42 additions and 20 deletions

View File

@ -36,7 +36,7 @@ module Risc
sl = main_ticks(26)
assert_equal SlotToReg , sl.class
assert_equal :r1 , sl.array.symbol
assert_equal 3 , sl.index
assert_equal 2 , sl.index
assert_equal :r1 , sl.register.symbol
assert_equal 9 , @interpreter.get_register(:r1)
end

View File

@ -61,7 +61,7 @@ module Risc
sl = main_ticks( base + 3 )
assert_equal SlotToReg , sl.class
assert_equal :r1 , sl.array.symbol #load from message
assert_equal 3 , sl.index
assert_equal 2 , sl.index
assert_equal :r1 , sl.register.symbol
end
def test_op

View File

@ -60,7 +60,7 @@ module Risc
assert_equal RegToSlot , sl.class
assert_equal :r1 , sl.register.symbol #return
assert_equal :r2 , sl.array.symbol #parfait integer
assert_equal 3 , sl.index
assert_equal 2 , sl.index
end
def test_return
done = main_ticks(43)