prog8/examples/test.p8

27 lines
492 B
Plaintext
Raw Normal View History

%import textio
%import string
%zeropage basicsafe
%option no_sysinit
main {
sub start() {
2024-01-05 23:04:15 +00:00
str s = "the quick brown fox jumps over the lazy dog."
uword sp = &s
2024-01-05 23:04:15 +00:00
cbm.SETTIM(0,0,0)
repeat 5000 {
cx16.r0L = 'v' in s
}
2024-01-05 23:04:15 +00:00
txt.print_uw(cbm.RDTIM16())
txt.nl()
2024-01-05 23:04:15 +00:00
cbm.SETTIM(0,0,0)
repeat 5000 {
cx16.r0L = string.contains(s, 'v')
}
2024-01-05 23:04:15 +00:00
txt.print_uw(cbm.RDTIM16())
txt.nl()
2023-12-26 21:01:49 +00:00
}
}