2021-12-21 18:08:33 +00:00
|
|
|
%import textio
|
2022-01-23 12:42:52 +00:00
|
|
|
%zeropage basicsafe
|
2021-12-15 22:43:14 +00:00
|
|
|
|
2021-10-30 13:15:11 +00:00
|
|
|
main {
|
2022-01-18 20:21:49 +00:00
|
|
|
sub start() {
|
2022-01-28 14:22:26 +00:00
|
|
|
byte bb1 = -50
|
|
|
|
byte bb2 = -51
|
|
|
|
|
|
|
|
word ww = func(bb1, bb2)
|
|
|
|
txt.print_w(ww)
|
2022-01-28 15:27:11 +00:00
|
|
|
txt.print(" <- must be -50\n")
|
2022-01-28 14:22:26 +00:00
|
|
|
|
|
|
|
ubyte ub1 = 50
|
|
|
|
ubyte ub2 = 51
|
|
|
|
uword uw = funcu(ub1, ub2)
|
|
|
|
txt.print_uw(uw)
|
2022-01-28 15:27:11 +00:00
|
|
|
txt.print(" <- must be 50\n")
|
2022-01-28 14:22:26 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
sub func(word x1, word y1) -> word {
|
|
|
|
return x1
|
2022-01-28 15:27:11 +00:00
|
|
|
;word zz = x1+1
|
|
|
|
;return zz-1
|
2022-01-28 14:22:26 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
sub funcu(uword x1, uword y1) -> uword {
|
2022-01-28 15:27:11 +00:00
|
|
|
uword zz = x1+1
|
|
|
|
return zz-1
|
2022-01-27 17:05:25 +00:00
|
|
|
}
|
2022-01-23 01:42:26 +00:00
|
|
|
}
|