feat: add do_bit_ops()

This commit is contained in:
surtur 2020-10-31 12:49:18 +01:00
parent 1895f37d81
commit 1b21c9f773
Signed by: wanderer
GPG Key ID: 19CE1EC1D9E0486D

@ -1,6 +1,17 @@
#include <stdio.h> #include <stdio.h>
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() { int main() {
printf("*** bit-ops pls ***\n"); printf("*** bit-ops pls ***\n");
do_bit_ops();
return 0; return 0;
} }