fork(1) download
  1. #include <stdio.h>
  2.  
  3. unsigned PORTA = 0;
  4.  
  5. #define OUTPUT PORTA
  6. #define BIT(n) (1 << n)
  7. #define LED(op) (OUTPUT op BIT(4))
  8. #define ON |=
  9. #define OFF &=~
  10.  
  11. int main(void) {
  12. printf("PORTA = %u\n", PORTA);
  13. LED(ON);
  14. printf("PORTA = %u\n", PORTA);
  15. LED(OFF);
  16. printf("PORTA = %u\n", PORTA);
  17. return 0;
  18. }
  19.  
Success #stdin #stdout 0s 2112KB
stdin
Standard input is empty
stdout
PORTA = 0
PORTA = 16
PORTA = 0