READMEのCASL II仕様書へのリンクを修正
[YACASL2.git] / include / struct.h
index ffc448e..368e9ae 100644 (file)
@@ -1,5 +1,5 @@
-#ifndef YACASL2_CASL2_INCLUDED
-#define YACASL2_CASL2_INCLUDED
+#ifndef YACASL2_STRUCT_INCLUDED
+#define YACASL2_STRUCT_INCLUDED
 
 #include <stdio.h>
 #include <assert.h>
@@ -8,6 +8,7 @@
 #include "word.h"
 #include "cmem.h"
 #include "hash.h"
+#include "exec.h"
 
 /**
  * @brief COMET IIの規格値
@@ -134,6 +135,24 @@ typedef struct {
 
 extern EXECPTR *execptr;
 
+/**
+ * @brief 実行モードを表すデータ型
+ */
+typedef struct {
+    bool trace;           /**<レジストリの内容をステップごとに表示する場合はtrue */
+    bool logical;         /**<レジストリの内容を論理値(0から65535)で表示する場合はtrue */
+    bool dump;            /**<メモリの内容をステップごとに表示する場合はtrue */
+    int dump_start;       /**<メモリの内容をステップごとに表示する場合の開始アドレス */
+    int dump_end;         /**<メモリの内容をステップごとに表示する場合の終了アドレス */
+    bool monitor;         /**<モニターモードの場合はtrue */
+    bool step;            /**<ステップ実行の場合はtrue */
+} EXECMODE;
+
+/**
+ * @brief 実行モード: trace, logical, dump, monitor, step
+ */
+extern EXECMODE execmode;
+
 /**
  * @brief 汎用レジスタの番号からレジスタを表す文字列を返す
  *
@@ -188,4 +207,4 @@ CMDTYPE getcmdtype(WORD code);
  */
 char *getcmdname(WORD code);
 
-#endif            /* YACASL2_CASL2_INCLUDEDの終端 */
+#endif