diff --git a/bit-ops.c b/bit-ops.c index 90412d6..f21994d 100644 --- a/bit-ops.c +++ b/bit-ops.c @@ -1,6 +1,17 @@ #include +void do_bit_ops() { + unsigned char PTAD = 0x10; + printf("PTAD = %#010x\n", PTAD); + PTAD |= 0x01; + printf("PTAD |= 0x01\t %#010x\n", PTAD); + PTAD &= 0xfe; + printf("PTAD &= 0xfe\t %#010x\n", PTAD); +} + + int main() { printf("*** bit-ops pls ***\n"); + do_bit_ops(); return 0; }