int main(int argc, char** argv) {
char c;
uint32 i,j;
+ int64_t result;
+ int64_t temp;
printf("hello.\n");
fd = open(argv[1], O_RDWR);
printf("open %s = %d\n", argv[1], fd);
}
}
- //send(0x03, 0x101010);
- //send(0x00, 0x101010);
- //send(0x01, 0x010101);
- /*
- send(0x06, 0x22);
- send(0x02, 0x22);
- send(0x04,
- inst(0x01, 0, 1, 1, 1, 0, 1, 0x00)
- );
- */
- /*
- if (argc > 3)
- send(27, atoi(argv[3]));
- if (argc > 4)
- send(7, atoi(argv[4]));
- */
printf("\n===================================================================\n\n");
- /*
- sendc(0x00);
- sendc(12);
- sendc(12);
- sendc(0x06);
- */
-
- // for( j=0; j<16; j++) {
- i = recvc();
- printf("result: %d / %x \n", i, i);
- i = recvc();
- printf("result: %d / %x \n", i, i);
- i = recvc();
- printf("result: %d / %x \n", i, i);
- i = recvc();
- printf("result: %d / %x \n", i, i);
- i = recvc();
- printf("result: %d / %x \n", i, i);
- i = recvc();
- printf("result: %d / %x \n", i, i);
- // }
+ while(1) {
+ result = 0;
+ for(j=0; j<6; j++) {
+ temp = recvc();
+ temp = temp << (j * 8);
+ result = result | temp;
+ }
+ printf("%lld = 0x%llx\n", result, result);
+ fflush(stdout);
+ }
return 0;
}