2023-11-14 22:47:31 +01:00
|
|
|
%import textio
|
2023-11-20 23:19:08 +01:00
|
|
|
%zeropage basicsafe
|
2023-11-24 21:26:34 +01:00
|
|
|
|
2023-10-15 22:44:34 +02:00
|
|
|
main {
|
2023-11-25 13:54:44 +01:00
|
|
|
ubyte counter
|
|
|
|
uword wcounter
|
|
|
|
ubyte end=10
|
|
|
|
uword wend=10
|
|
|
|
|
2023-11-12 20:40:17 +01:00
|
|
|
sub start() {
|
2023-11-25 13:54:44 +01:00
|
|
|
cx16.r0=0
|
|
|
|
forloops()
|
|
|
|
txt.print_uw(cx16.r0)
|
|
|
|
txt.nl()
|
2023-11-22 01:42:41 +01:00
|
|
|
|
2023-11-25 13:54:44 +01:00
|
|
|
cx16.r0=0
|
|
|
|
untilloops()
|
|
|
|
txt.print_uw(cx16.r0)
|
2023-11-19 17:52:43 +01:00
|
|
|
txt.nl()
|
2023-11-25 13:54:44 +01:00
|
|
|
}
|
2023-11-21 22:33:37 +01:00
|
|
|
|
2023-11-25 13:54:44 +01:00
|
|
|
sub forloops() {
|
|
|
|
end=10
|
|
|
|
for counter in 0 to end {
|
|
|
|
cx16.r0++
|
|
|
|
}
|
|
|
|
end=0
|
|
|
|
for counter in 0 to end {
|
|
|
|
cx16.r0++
|
|
|
|
}
|
|
|
|
end=255
|
|
|
|
for counter in 0 to end {
|
|
|
|
cx16.r0++
|
|
|
|
}
|
|
|
|
|
|
|
|
wend=1000
|
|
|
|
for wcounter in 0 to wend {
|
|
|
|
cx16.r0++
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
sub untilloops() {
|
|
|
|
|
|
|
|
end=10
|
|
|
|
counter = 0
|
|
|
|
repeat {
|
|
|
|
cx16.r0++
|
|
|
|
if counter==end
|
2023-11-19 17:52:43 +01:00
|
|
|
break
|
2023-11-25 13:54:44 +01:00
|
|
|
counter++
|
2023-11-19 17:52:43 +01:00
|
|
|
}
|
2023-11-21 22:33:37 +01:00
|
|
|
|
2023-11-25 13:54:44 +01:00
|
|
|
end=0
|
|
|
|
counter = 0
|
|
|
|
repeat {
|
|
|
|
cx16.r0++
|
|
|
|
if counter==end
|
2023-11-19 17:52:43 +01:00
|
|
|
break
|
2023-11-25 13:54:44 +01:00
|
|
|
counter++
|
2023-11-24 21:26:34 +01:00
|
|
|
}
|
2023-11-19 17:52:43 +01:00
|
|
|
|
2023-11-25 13:54:44 +01:00
|
|
|
counter = 0
|
|
|
|
end=255
|
|
|
|
repeat {
|
|
|
|
cx16.r0++
|
|
|
|
if counter==end
|
2023-11-19 17:52:43 +01:00
|
|
|
break
|
2023-11-25 13:54:44 +01:00
|
|
|
counter++
|
|
|
|
}
|
2023-11-19 17:52:43 +01:00
|
|
|
|
2023-11-25 13:54:44 +01:00
|
|
|
wcounter = 0
|
|
|
|
wend=1000
|
|
|
|
repeat {
|
|
|
|
cx16.r0++
|
|
|
|
if wcounter==wend
|
|
|
|
break
|
|
|
|
wcounter++
|
|
|
|
}
|
2023-11-14 18:23:37 +01:00
|
|
|
}
|
2023-10-03 22:54:28 +02:00
|
|
|
}
|