bit-ops/bit-ops.c

18 lines
295 B
C
Raw Normal View History

2020-10-31 12:47:08 +01:00
#include <stdio.h>
2020-10-31 12:49:18 +01:00
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);
}
2020-10-31 12:47:08 +01:00
int main() {
printf("*** bit-ops pls ***\n");
2020-10-31 12:49:18 +01:00
do_bit_ops();
2020-10-31 12:47:08 +01:00
return 0;
}