From 98987917710c678943799aed5038b51dec041c72 Mon Sep 17 00:00:00 2001 From: Irmen de Jong Date: Sat, 9 Oct 2021 16:32:44 +0200 Subject: [PATCH] clean test.p8 --- examples/test.p8 | 68 +++--------------------------------------------- 1 file changed, 4 insertions(+), 64 deletions(-) diff --git a/examples/test.p8 b/examples/test.p8 index 0475e7eeb..03f7faf6e 100644 --- a/examples/test.p8 +++ b/examples/test.p8 @@ -1,70 +1,10 @@ %import textio -%zeropage dontuse +%import test_stack +%zeropage basicsafe main { - sub start() { - uword v - v = test.get_value1() - txt.print_uw(v) - txt.nl() - v = test.get_value2() - txt.print_uw(v) - txt.nl() - v = test.get_value3() - txt.print_uw(v) - txt.nl() - v = test.get_value4() - txt.print_uw(v) - v = test.get_value4() - txt.print_uw(v) - v = test.get_value4() - txt.print_uw(v) - v = test.get_value4() - txt.print_uw(v) - v = test.get_value4() - txt.print_uw(v) - v = test.get_value4() - txt.print_uw(v) - v = test.get_value4() - txt.print_uw(v) - v = test.get_value4() - txt.print_uw(v) - v = test.get_value4() - txt.print_uw(v) - v = test.get_value4() - txt.print_uw(v) - txt.nl() - v = test.get_value5() - txt.print_uw(v) - txt.nl() - v = test.get_value6() - txt.print_uw(v) - txt.nl() - } -} - - -test { - uword[] arr = [1111,2222,3333] - uword value = 9999 - - sub get_value1() -> uword { - return &value - } - sub get_value2() -> uword { - return arr[2] - } - sub get_value3() -> ubyte { - return @($c000) - } - sub get_value4() -> uword { - return value - } - sub get_value5() -> uword { - return $c000 - } - sub get_value6() -> uword { - return "string" + txt.print("ok") + test_stack.test() } }