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('.');
return res;
}
-/* 仮想マシンのリセット */
+/* COMET II仮想マシンのリセット */
void reset()
{
int i;
char *errpr = malloc(8);
clock_t clock_begin, clock_end;
- if(tracemode) {
+ if((&execmode)->tracemode) {
fprintf(stdout, "\nExecuting machine codes\n");
}
/* フラグレジスタの初期値設定 */
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++;