From e07682b6a32b304127c05ffd9ef472199b96e80c Mon Sep 17 00:00:00 2001 From: Torsten Ruger Date: Mon, 19 May 2014 21:04:15 +0300 Subject: [PATCH] make the asm fibo output its result. slam dunk --- test/arm/test_fibo.rb | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/test/arm/test_fibo.rb b/test/arm/test_fibo.rb index 86990622..a8c85c72 100644 --- a/test/arm/test_fibo.rb +++ b/test/arm/test_fibo.rb @@ -10,10 +10,11 @@ class TestFibo < MiniTest::Test # not my hand off course, found in the net from a basic introduction def test_fibo int = Vm::Integer.new(1) # the one is funny, but the fibo is _really_ tight code and reuses registers - fibo = utoa = @program.get_or_create_function(:fibo) + fibo = @program.get_or_create_function(:fibo) @program.main.mov( int , 10 ) @program.main.call( fibo ) - #could put ... + putint = @program.get_or_create_function(:putint) + @program.main.call( putint ) write 20 , "fibo" end