fork download
  1.  
  2. #include <xc.h>
  3. #define X (uint8_t *) 0x1C // Pointer for variable A
  4. #define Y (uint8_t *) 0x1D // Pointer for variable B
  5. #define K (uint8_t *) 0x1E // Pointer for variable B
  6. uint8_t WREG; // Simulated Working register.
  7. void main() {
  8. WREG =*X; // WREG has the value of A
  9. WREG = WREG + *Y;
  10. *K = WREG;
  11. *X = 0b01010101;
  12. *Y = 0; // Update WREG with the new value of operation
  13. WREG = *K;
  14. WREG = *X & WREG; // Now WREG has the value of B
  15. *Y = WREG;
  16. *Y = ~ (*Y);
  17. return; // End of the program
  18. }
Success #stdin #stdout 0.03s 25628KB
stdin
Standard input is empty
stdout
#include <xc.h>
#define X (uint8_t *) 0x1C // Pointer for variable A 
#define Y (uint8_t *) 0x1D // Pointer for variable B 
#define K (uint8_t *) 0x1E // Pointer for variable B 
uint8_t WREG; // Simulated Working register.
void main() {
WREG =*X; // WREG has the value of A
WREG = WREG + *Y;
*K = WREG;
*X = 0b01010101;
*Y = 0; // Update WREG with the new value of operation 
WREG = *K;
WREG = *X & WREG; // Now WREG has the value of B
*Y = WREG;
*Y = ~ (*Y);
return; // End of the program
}