fork(1) download
  1. #include <stdio.h>
  2.  
  3. int main(void) {
  4. unsigned short set_value, dev=6, page=0, reg=2;
  5. set_value = 0x1000 | 0x0400 | dev << 5 | 0x16 ;
  6. printf("%04x\n", set_value);
  7. set_value |= 0x8000;
  8. printf("%04x\n", set_value);
  9.  
  10. set_value = 0x1000 | 0x0400 | dev << 5 | reg ;
  11. printf("%04x\n", set_value);
  12. set_value |= 0x8000;
  13. printf("%04x\n", set_value);
  14.  
  15. return 0;
  16. }
  17.  
Success #stdin #stdout 0s 5276KB
stdin
Standard input is empty
stdout
14d6
94d6
14c2
94c2