5 WORD getgr(const char *str, bool is_x);
9 char *title = malloc(64);
15 "", "0", "aaa", "GR", "GR8", "GR20",
16 "GR0", "GR1", "GR2", "GR3", "GR4", "GR5", "GR6", "GR7"
18 static CERR cerr_getgr[] = {
19 { 120, "GR0 in operand x" },
22 cerr_init(); /* エラーの初期化 */
23 addcerrlist(ARRAYSIZE(cerr_getgr), cerr_getgr);
24 for(i = 0; i <= 1; i++) {
25 title = (is_x[i] == false) ? "Generel Register" : "Index Register";
26 printf("== %s ==\n", title);
27 for(j = 0; j < ARRAYSIZE(str); j++) {
29 r = getgr(str[j], is_x[i]);
30 printf("%s\t#%04X", str[j], r);
32 printf("\tError - %d\t%s", cerr->num, cerr->msg);