4 int main(int argc, char **argv)
7 unsigned char type = 'b';
16 if ((argc < 2) || (argc > 4))
19 printf("usage: %s port [b|w|l [datum]]\n", argv[0]);
23 port = strtoul(argv[1], NULL, 0);
30 datum = strtoul(argv[3], NULL, 0);
36 printf("Wrote byte 0x%02x to port 0x%04x\n", datum, port);
41 printf("Wrote word 0x%04x to port 0x%04x\n", datum, port);
45 printf("Wrote long 0x%08x to port 0x%04x\n", datum, port);
55 printf("Read byte 0x%02x from port 0x%04x\n", datum, port);
59 printf("Read word 0x%04x from port 0x%04x\n", datum, port);
63 printf("Read long 0x%08x from port 0x%04x\n", datum, port);