X-Git-Url: http://j8takagi.net/cgi-bin/gitweb.cgi?p=YACASL2.git;a=blobdiff_plain;f=src%2Fexec.c;h=8530640b7f8a4d0a8bbc163973ec2e86656ab90d;hp=7034e1989ba23d0e0dab1f1432f3ee4ccc220b44;hb=e2a1963d2ddaf89d33494212a0a16f7a368797e0;hpb=ef1027cfd02733ad225d67e4a02f0f5901981b89 diff --git a/src/exec.c b/src/exec.c index 7034e19..8530640 100644 --- a/src/exec.c +++ b/src/exec.c @@ -17,6 +17,7 @@ static CERR cerr_exec[] = { { 206, "Address - out of COMET II memory" }, { 207, "Stack Pointer (SP) - out of COMET II memory" }, { 209, "not GR in operand x" }, + { 210, "not command code of COMET II" }, }; /** @@ -380,7 +381,9 @@ bool exec() /* 命令の取り出し */ op = sys->memory[sys->cpu->pr] & 0xFF00; /* 命令の解読 */ - cmdtype = getcmdtype(op); + if((cmdtype = getcmdtype(op)) == NOTCMD) { + setcerr(210, pr2str(sys->cpu->pr)); /* not command code of COMET II */ + } r_r1 = (sys->memory[sys->cpu->pr] >> 4) & 0xF; x_r2 = sys->memory[sys->cpu->pr] & 0xF; /* traceオプション指定時、レジスタを出力 */