2024-01-21 22:05:51 +00:00
|
|
|
%import textio
|
2024-02-07 01:09:08 +00:00
|
|
|
%import string
|
|
|
|
|
2024-01-22 23:56:06 +00:00
|
|
|
%zeropage basicsafe
|
|
|
|
%option no_sysinit
|
2023-12-31 00:02:33 +00:00
|
|
|
|
2024-01-07 17:48:18 +00:00
|
|
|
main {
|
|
|
|
sub start() {
|
2024-02-07 01:09:08 +00:00
|
|
|
str name1 = ""
|
2024-02-07 22:06:01 +00:00
|
|
|
str name2 = "hello"
|
2024-02-07 01:09:08 +00:00
|
|
|
str name3 = " \n\rhello"
|
2024-02-07 22:06:01 +00:00
|
|
|
str name4 = " \x02\x02\x02\n\r\xa0\xa0\xff\xffhello"
|
|
|
|
|
|
|
|
txt.chrout('[')
|
|
|
|
txt.print(string.ltrimmed(name1))
|
|
|
|
txt.print("]\n")
|
|
|
|
txt.chrout('[')
|
|
|
|
txt.print(string.ltrimmed(name2))
|
|
|
|
txt.print("]\n")
|
|
|
|
txt.chrout('[')
|
|
|
|
txt.print(string.ltrimmed(name3))
|
|
|
|
txt.print("]\n")
|
|
|
|
txt.chrout('[')
|
|
|
|
txt.print(string.ltrimmed(name4))
|
|
|
|
txt.print("]\n\n")
|
|
|
|
|
|
|
|
txt.chrout('[')
|
|
|
|
txt.print(string.lstripped(name1))
|
|
|
|
txt.print("]\n")
|
|
|
|
txt.chrout('[')
|
|
|
|
txt.print(string.lstripped(name2))
|
|
|
|
txt.print("]\n")
|
|
|
|
txt.chrout('[')
|
|
|
|
txt.print(string.lstripped(name3))
|
|
|
|
txt.print("]\n")
|
|
|
|
txt.chrout('[')
|
|
|
|
txt.print(string.lstripped(name4))
|
|
|
|
txt.print("]\n")
|
2024-02-06 21:18:52 +00:00
|
|
|
|
2024-02-07 22:06:01 +00:00
|
|
|
; foo(name2)
|
2024-02-07 21:36:43 +00:00
|
|
|
}
|
2024-02-04 12:50:18 +00:00
|
|
|
|
2024-02-07 21:36:43 +00:00
|
|
|
sub foo (str s2) {
|
|
|
|
str s = "irmen"
|
|
|
|
txt.print_uwhex(s, true)
|
|
|
|
txt.nl()
|
|
|
|
txt.print_uwhex(&s, true)
|
|
|
|
txt.nl()
|
|
|
|
txt.print_uwhex(&s[2], true) ; TODO doesn't print correctly in the AST!
|
|
|
|
txt.nl()
|
|
|
|
txt.nl()
|
|
|
|
txt.print_uwhex(s2, true)
|
|
|
|
txt.nl()
|
|
|
|
txt.print_uwhex(&s2, true)
|
|
|
|
txt.nl()
|
|
|
|
txt.print_uwhex(s2+2, true)
|
|
|
|
txt.nl()
|
|
|
|
txt.print_uwhex(&s2[2], true) ; TODO should be the same as the previous one! TODO doesn't print correctly in the AST!
|
|
|
|
txt.nl()
|
2024-02-03 00:57:17 +00:00
|
|
|
}
|
|
|
|
}
|