]> j8takagi.net git repositories - yacasl2.git/commitdiff
monitorでqまたはEOFでcomet IIを即時終了するように
authorj8takagi <j8takagi@nifty.com>
Mon, 6 Jul 2026 14:21:40 +0000 (23:21 +0900)
committerj8takagi <j8takagi@nifty.com>
Mon, 6 Jul 2026 14:21:40 +0000 (23:21 +0900)
src/exec.c
src/monitor.c

index 5ff61204e67f463e840585b0fb0bd130b3579c92..a95d4401374964877a20d93d506938dbdbc857be 100644 (file)
@@ -692,7 +692,8 @@ void exec()
     create_cmdtable(HASH_CODE);                 /* 命令コードがキーのハッシュ表を作成 */
 
     /* 機械語の実行 */
-    for (sys->cpu->pr = execptr->start; ; ) {
+    sys->cpu->pr = execptr->start;
+    do {
         clock_begin = clock();                     /* クロック周波数設定のため、実行開始時間を格納 */
         dsp_trace_dump();
         /* モニターモードでCOMET II起動時、またはステップモードかブレークポイントの場合、モニターを起動 */
@@ -742,7 +743,7 @@ void exec()
         do {
             clock_end = clock();
         } while(clock_end - clock_begin < CLOCKS_PER_SEC / sys->clocks);
-    }
+    } while(1);
 execfin:
     FREE(s);
     freebps();
index fa03bea8afde5f399f8c4afa3d558c87b40c7b18..08e4db3f5cf01ec27695afba7a456d3daa593729 100644 (file)
@@ -371,6 +371,7 @@ void monquit()
 {
     execmode.monitor = false;
     execmode.step = false;
+    execptr->stop = true;
     freebps();
 }