2020-12-27 01:22:18 +00:00
|
|
|
%import textio
|
2021-01-03 01:45:25 +00:00
|
|
|
%zeropage basicsafe
|
2020-12-08 00:02:38 +00:00
|
|
|
|
2020-12-08 21:54:20 +00:00
|
|
|
main {
|
2020-12-21 23:59:07 +00:00
|
|
|
|
2021-01-13 21:32:17 +00:00
|
|
|
sub start() {
|
2021-02-13 12:27:06 +00:00
|
|
|
|
2021-02-14 16:13:29 +00:00
|
|
|
str text = "44"
|
|
|
|
uword textptr = &text
|
2021-02-13 12:27:06 +00:00
|
|
|
|
2021-02-14 16:13:29 +00:00
|
|
|
ubyte nlen = conv.any2uword(textptr)
|
2021-02-14 17:24:31 +00:00
|
|
|
ubyte lastchr = text[nlen]
|
|
|
|
ubyte valid_operand
|
2021-02-13 22:50:03 +00:00
|
|
|
|
2021-02-14 17:24:31 +00:00
|
|
|
valid_operand = nlen>0 and lastchr==0
|
|
|
|
txt.print("\nvalidoper? ")
|
|
|
|
txt.print_ub(valid_operand)
|
|
|
|
txt.nl()
|
|
|
|
|
|
|
|
valid_operand = nlen>0
|
|
|
|
valid_operand = valid_operand and lastchr==0
|
|
|
|
|
|
|
|
txt.print("\nvalidoper? ")
|
|
|
|
txt.print_ub(valid_operand)
|
|
|
|
txt.nl()
|
|
|
|
|
|
|
|
|
|
|
|
valid_operand = nlen and lastchr==0
|
2021-02-14 16:13:29 +00:00
|
|
|
txt.print("\nvalidoper? ")
|
|
|
|
txt.print_ub(valid_operand)
|
2021-02-13 22:50:03 +00:00
|
|
|
txt.nl()
|
2021-01-10 14:15:00 +00:00
|
|
|
}
|
2020-08-27 17:47:50 +00:00
|
|
|
}
|