clean test.p8

This commit is contained in:
Irmen de Jong 2021-10-09 16:32:44 +02:00
parent a1c658274d
commit 9898791771

View File

@ -1,70 +1,10 @@
%import textio %import textio
%zeropage dontuse %import test_stack
%zeropage basicsafe
main { main {
sub start() { sub start() {
uword v txt.print("ok")
v = test.get_value1() test_stack.test()
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"
} }
} }