prog8/examples/test.p8

32 lines
670 B
Plaintext
Raw Normal View History

%import textio
%import string
%zeropage basicsafe
%option no_sysinit
main {
sub start() {
2024-02-08 00:17:19 +00:00
foo("zzz")
}
2024-02-08 01:22:37 +00:00
sub foo (str sarg) {
str svar = "irmen"
txt.print_uwhex(svar, true)
txt.nl()
2024-02-08 01:22:37 +00:00
txt.print_uwhex(&svar, true)
txt.nl()
2024-02-08 01:22:37 +00:00
txt.print_uwhex(&svar[2], true)
txt.nl()
txt.nl()
2024-02-08 01:22:37 +00:00
txt.print_uwhex(sarg, true)
txt.nl()
2024-02-08 01:22:37 +00:00
txt.print_uwhex(&sarg, true)
txt.nl()
2024-02-08 01:22:37 +00:00
txt.print_uwhex(sarg+2, true)
txt.nl()
2024-02-08 01:22:37 +00:00
cx16.r0 = &sarg[2]
txt.print_uwhex(cx16.r0, true) ; TODO should be the same as the previous one sarg+2 (13)!
txt.nl()
}
}