2024-06-01 15:03:01 +02:00
|
|
|
%import textio
|
2024-06-29 15:41:39 +02:00
|
|
|
%option no_sysinit
|
2024-07-16 00:25:29 +02:00
|
|
|
%zeropage basicsafe
|
2023-12-31 01:02:33 +01:00
|
|
|
|
2024-07-21 13:35:28 +02:00
|
|
|
|
2024-01-07 18:48:18 +01:00
|
|
|
main {
|
2024-07-16 00:25:29 +02:00
|
|
|
sub start() {
|
2024-07-24 22:51:49 +02:00
|
|
|
ubyte @shared v1,v2,v3
|
|
|
|
v1 = %10011001
|
|
|
|
v2 = %10101010
|
|
|
|
v3 = %00111100
|
2024-07-21 13:35:28 +02:00
|
|
|
|
2024-07-24 22:51:49 +02:00
|
|
|
v1 &= %00011111
|
|
|
|
v1++
|
|
|
|
txt.print_ubbin(v1, true)
|
|
|
|
txt.nl()
|
2024-07-21 13:35:28 +02:00
|
|
|
|
2024-07-24 22:51:49 +02:00
|
|
|
v1 &= ~v2
|
|
|
|
v1++
|
|
|
|
txt.print_ubbin(v1, true)
|
|
|
|
txt.nl()
|
2024-07-21 13:35:28 +02:00
|
|
|
|
2024-07-24 22:51:49 +02:00
|
|
|
v1 |= 100
|
|
|
|
v1++
|
|
|
|
txt.print_ubbin(v1, true)
|
|
|
|
txt.nl()
|
2024-07-21 13:35:28 +02:00
|
|
|
|
2024-07-24 22:51:49 +02:00
|
|
|
v1 |= v2
|
|
|
|
v1++
|
|
|
|
txt.print_ubbin(v1, true)
|
|
|
|
txt.nl()
|
|
|
|
|
|
|
|
v1 |= v2 & v3
|
|
|
|
v1++
|
|
|
|
txt.print_ubbin(v1, true)
|
|
|
|
txt.nl()
|
|
|
|
|
|
|
|
v1 &= v2|v3
|
|
|
|
v1++
|
|
|
|
txt.print_ubbin(v1, true)
|
|
|
|
txt.nl()
|
|
|
|
|
|
|
|
v1 &= ~(v2|v3)
|
|
|
|
v1++
|
|
|
|
txt.print_ubbin(v1, true)
|
|
|
|
txt.nl()
|
2024-07-21 13:35:28 +02:00
|
|
|
}
|
|
|
|
}
|