mirror of
https://github.com/irmen/prog8.git
synced 2025-01-01 08:30:14 +00:00
27 lines
454 B
Lua
27 lines
454 B
Lua
%import textio
|
|
%zeropage basicsafe
|
|
|
|
main {
|
|
sub start() {
|
|
if (cx16.r0 & 1) as bool == false
|
|
cx16.r1++
|
|
else
|
|
cx16.r2++
|
|
|
|
if (cx16.r0 & 1) as bool == true
|
|
cx16.r1++
|
|
else
|
|
cx16.r2++
|
|
|
|
if not((cx16.r0 & 1) as bool)
|
|
cx16.r1++
|
|
else
|
|
cx16.r2++
|
|
|
|
if (cx16.r0 & 1) as bool
|
|
cx16.r1++
|
|
else
|
|
cx16.r2++
|
|
}
|
|
}
|