While scanning through some of the old posts I became really fascinated by the idea of storing pages of grid buttons states and trig patterns as binary. Not coming from a computer science background binary is still a little cryptic to me. After a lot of frustration about how to actually use BSET/BCLR I slimmed the code down to 2 scripts and documented it all here because writing things out helps me a lot.
I’m new to all this so if anything could be better/cleaner please help me out.
#I G.BTX 0 0 0 1 1 1 3 8 16 6 G.FDR 0 0 7 8 1 2 3 8 #8 J + G.BTNY A; K G.BTNX IF G.BTNV: P J BSET P J K ELSE: P J BCLR P J K A * G.FDRN 6 L 0 95: $ 7 #7 K + A / I 16 G.BTN.V I BGET P K WRP I 0 15