prog8/examples/test.p8

25 lines
394 B
Plaintext
Raw Normal View History

2019-07-01 21:41:30 +00:00
%import c64utils
%zeropage basicsafe
2019-07-08 22:02:38 +00:00
%option enable_floats
2019-03-29 01:13:28 +00:00
~ main {
2019-07-08 13:13:24 +00:00
sub start() {
2019-07-08 22:02:38 +00:00
float fl
ubyte ub
when A+Y {
fl -> A=2
fl+3.3 -> A=3
ub -> A=4
ub+2 -> A=5
4 -> {
Y=7
}
else -> A=99
2019-07-08 22:17:34 +00:00
5 -> Y=5 ; @todo error; else already seen
2019-07-08 22:02:38 +00:00
}
2019-07-08 13:13:24 +00:00
}
2019-07-01 21:41:30 +00:00
}