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 01:20:28 +02:00
|
|
|
ubyte @shared variable
|
2024-07-21 13:35:28 +02:00
|
|
|
|
2024-07-24 01:20:28 +02:00
|
|
|
variable = 0
|
|
|
|
while variable & %10000000 == 0 {
|
|
|
|
cx16.r0L++
|
|
|
|
variable = 128
|
|
|
|
}
|
|
|
|
txt.chrout('1')
|
|
|
|
while variable & %10000000 != 0 {
|
|
|
|
cx16.r0L++
|
|
|
|
variable = 0
|
|
|
|
}
|
|
|
|
txt.chrout('2')
|
|
|
|
while variable & %01000000 == 0 {
|
|
|
|
cx16.r0L++
|
|
|
|
variable = 64
|
|
|
|
}
|
|
|
|
txt.chrout('3')
|
|
|
|
while variable & %01000000 != 0 {
|
|
|
|
cx16.r0L++
|
|
|
|
variable=0
|
|
|
|
}
|
|
|
|
txt.chrout('4')
|
|
|
|
variable = 255
|
|
|
|
while variable & %10000000 == 0 {
|
|
|
|
}
|
|
|
|
while variable & %01000000 == 0 {
|
|
|
|
}
|
|
|
|
txt.chrout('5')
|
|
|
|
variable = 0
|
|
|
|
while variable & %10000000 != 0 {
|
|
|
|
}
|
|
|
|
while variable & %01000000 != 0 {
|
|
|
|
}
|
|
|
|
txt.chrout('6')
|
|
|
|
txt.chrout('\n')
|
2024-07-21 13:35:28 +02:00
|
|
|
|
2024-07-24 01:20:28 +02:00
|
|
|
variable = 0
|
|
|
|
cx16.r0L++
|
|
|
|
if variable & %10000000 == 0 {
|
|
|
|
txt.print("bit 7 not set\n")
|
|
|
|
}
|
|
|
|
if variable & %10000000 != 0 {
|
|
|
|
txt.print("bit 7 set\n")
|
|
|
|
}
|
|
|
|
if variable & %10000000 == 0 {
|
|
|
|
txt.print("bit 7 not set\n")
|
|
|
|
} else {
|
|
|
|
txt.print("bit 7 set\n")
|
|
|
|
}
|
|
|
|
if variable & %10000000 != 0 {
|
|
|
|
txt.print("bit 7 set\n")
|
|
|
|
} else {
|
|
|
|
txt.print("bit 7 not set\n")
|
|
|
|
}
|
2024-07-21 13:35:28 +02:00
|
|
|
|
2024-07-24 01:20:28 +02:00
|
|
|
variable = 128
|
|
|
|
cx16.r0L++
|
|
|
|
if variable & %10000000 == 0 {
|
|
|
|
txt.print("bit 7 not set\n")
|
|
|
|
}
|
|
|
|
if variable & %10000000 != 0 {
|
|
|
|
txt.print("bit 7 set\n")
|
|
|
|
}
|
|
|
|
if variable & %10000000 == 0 {
|
|
|
|
txt.print("bit 7 not set\n")
|
|
|
|
} else {
|
|
|
|
txt.print("bit 7 set\n")
|
|
|
|
}
|
|
|
|
if variable & %10000000 != 0 {
|
|
|
|
txt.print("bit 7 set\n")
|
|
|
|
} else {
|
|
|
|
txt.print("bit 7 not set\n")
|
|
|
|
}
|
2024-07-21 13:35:28 +02:00
|
|
|
|
2024-07-24 01:20:28 +02:00
|
|
|
if variable & %01000000 == 0 {
|
|
|
|
txt.print("bit 6 not set\n")
|
|
|
|
}
|
|
|
|
if variable & %01000000 != 0 {
|
|
|
|
txt.print("bit 6 set\n")
|
|
|
|
}
|
|
|
|
if variable & %01000000 == 0 {
|
|
|
|
txt.print("bit 6 not set\n")
|
|
|
|
} else {
|
|
|
|
txt.print("bit 6 set\n")
|
|
|
|
}
|
|
|
|
if variable & %01000000 != 0 {
|
|
|
|
txt.print("bit 6 set\n")
|
|
|
|
} else {
|
|
|
|
txt.print("bit 6 not set\n")
|
|
|
|
}
|
|
|
|
variable = %01000000
|
|
|
|
cx16.r0L++
|
|
|
|
if variable & %01000000 == 0 {
|
|
|
|
txt.print("bit 6 not set\n")
|
|
|
|
}
|
|
|
|
if variable & %01000000 != 0 {
|
|
|
|
txt.print("bit 6 set\n")
|
|
|
|
}
|
|
|
|
if variable & %01000000 == 0 {
|
|
|
|
txt.print("bit 6 not set\n")
|
|
|
|
} else {
|
|
|
|
txt.print("bit 6 set\n")
|
|
|
|
}
|
|
|
|
if variable & %01000000 != 0 {
|
|
|
|
txt.print("bit 6 set\n")
|
|
|
|
} else {
|
|
|
|
txt.print("bit 6 not set\n")
|
|
|
|
}
|
2024-07-21 13:35:28 +02:00
|
|
|
}
|
|
|
|
}
|