X-Git-Url: http://j8takagi.net/cgi-bin/gitweb.cgi?p=YACASL2.git;a=blobdiff_plain;f=src%2Fexec.c;h=b9f987157f1991cb8979bed1ca5fe099331cfc19;hp=94c79254ed90628d0e244c56f125a114d57f8b1a;hb=ccc3acda4256e10a822e41e84f6c9991271c2f61;hpb=d2638d2dd5f2437cabbf752c89042ca49347a248 diff --git a/src/exec.c b/src/exec.c index 94c7925..b9f9871 100644 --- a/src/exec.c +++ b/src/exec.c @@ -40,10 +40,9 @@ void svcout() if(memory[GR[1]+i] == '\0') { break; } - /* 「文字の組」の符号表に記載された文字と、改行(CR)/タブを表示 - それ以外の文字は、「.」で表す */ - if(((c = (char)(memory[GR[1]+i])) >= 0x20 && c <= 0x7E) || c == 0xA || c == '\t') - { + /* 「文字の組」の符号表に記載された文字と、改行(CR)/タブを表示 */ + /* それ以外の文字は、「.」で表す */ + if(((c = (char)(memory[GR[1]+i])) >= 0x20 && c <= 0x7E) || c == 0xA || c == '\t') { putchar(c); } else { putchar('.'); @@ -231,7 +230,7 @@ WORD srl(WORD val0, WORD val1) return res; } -/* 仮想マシンのリセット */ +/* COMET II仮想マシンのリセット */ void reset() { int i; @@ -253,7 +252,7 @@ void exec() char *errpr = malloc(8); clock_t clock_begin, clock_end; - if(tracemode) { + if((&execmode)->tracemode) { fprintf(stdout, "\nExecuting machine codes\n"); } /* フラグレジスタの初期値設定 */ @@ -289,15 +288,15 @@ void exec() if(cerrno > 0) { goto execerr; } - if(tracemode){ + if((&execmode)->tracemode){ fprintf(stdout, "#%04X: Register::::\n", PR); dspregister(); } - if(dumpmode){ + if((&execmode)->dumpmode){ fprintf(stdout, "#%04X: Memory::::\n", PR); dumpmemory(); } - if(dumpmode || tracemode) { + if((&execmode)->dumpmode || (&execmode)->tracemode) { fprintf(stdout, "\n"); } PR++;