#include #include #include "alpha.h" int main(int argc, char * argv[]) { int i; int found = 0; if (argc < 2) { fputs("Must enter an instruction to search for.\n", stderr); return -1; } for (i = 0; i < alpha_num_opcodes; i++) { if (strcasecmp(alpha_opcodes[i].name, argv[1]) == 0) { printf("%3d: %18s - opcode %#04X\n", i, alpha_opcodes[i].name, AXP_OP(alpha_opcodes[i].opcode)); found = 1; } } if (!found) { puts("Sorry, instruction not found."); return -1; } return 0; }