create return address as own class to hold return addresses

to distinguish from integer, which does not need adjusting
This commit is contained in:
Torsten Ruger
2018-05-30 23:49:01 +03:00
parent e86ca5ae9d
commit e39e96f646
9 changed files with 60 additions and 11 deletions

View File

@ -52,7 +52,7 @@ module Risc
end
def test_pc1
@interpreter.tick
assert_equal 19224 , @interpreter.pc
assert_equal 20376 , @interpreter.pc
end
def test_tick2
@interpreter.tick
@ -66,7 +66,7 @@ module Risc
def test_pc2
@interpreter.tick
@interpreter.tick
assert_equal 19228 , @interpreter.pc
assert_equal 20380 , @interpreter.pc
end
def test_tick_14_jump
14.times {@interpreter.tick}