mirror of
https://github.com/irmen/prog8.git
synced 2024-11-06 16:07:32 +00:00
25 lines
518 B
Lua
25 lines
518 B
Lua
%import textio
|
|
%zeropage basicsafe
|
|
|
|
main {
|
|
|
|
bool boolvalue1 = true
|
|
bool boolvalue2 = false
|
|
ubyte @shared ubvalue1 = true
|
|
ubyte @shared ubvalue2 = false
|
|
|
|
sub thing(bool b1, bool b2) -> bool {
|
|
return b1 and b2
|
|
}
|
|
|
|
sub start() {
|
|
|
|
ubvalue1 = boolvalue1 & 1
|
|
ubvalue2 = 1 & boolvalue1
|
|
ubvalue1 = boolvalue1 & 0
|
|
ubvalue2 = boolvalue1 & 8
|
|
boolvalue1 = boolvalue2 & 1 ==0
|
|
; boolvar & 1 -> boolvar, (boolvar & 1 == 0) -> not boolvar
|
|
}
|
|
}
|