From: j8takagi Date: Wed, 27 Feb 2019 04:09:42 +0000 (+0900) Subject: ヘッダーファイル依存関係の整理 X-Git-Tag: v0.5p9~4^2~2 X-Git-Url: http://j8takagi.net/cgi-bin/gitweb.cgi?p=YACASL2.git;a=commitdiff_plain;h=b57939e6166b26126802b129a3f367b972bb453f;ds=sidebyside ヘッダーファイル依存関係の整理 --- diff --git a/include/assemble.h b/include/assemble.h index f8faf81..a730d16 100644 --- a/include/assemble.h +++ b/include/assemble.h @@ -9,11 +9,7 @@ #include #include #include "cerr.h" -#include "cmem.h" -#include "exec.h" -#include "hash.h" #include "struct.h" -#include "word.h" #include "token.h" /** diff --git a/include/exec.h b/include/exec.h index b38e59a..3a2ed7a 100644 --- a/include/exec.h +++ b/include/exec.h @@ -16,24 +16,6 @@ enum { INSIZE = 256 /** #include #include -#include "token.h" #include "assemble.h" -#include "hash.h" -#include "cmem.h" -#include "cerr.h" -#include "disassemble.h" -#include "word.h" +#include "exec.h" /** * @brief モニター diff --git a/include/struct.h b/include/struct.h index ffc448e..dce1ddf 100644 --- a/include/struct.h +++ b/include/struct.h @@ -134,6 +134,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 汎用レジスタの番号からレジスタを表す文字列を返す * diff --git a/src/casl2.c b/src/casl2.c index 68cbb24..52cfd8b 100644 --- a/src/casl2.c +++ b/src/casl2.c @@ -1,5 +1,6 @@ #include "package.h" #include "assemble.h" +#include "exec.h" /** * @brief CASL IIのエラーをエラーリストに追åŠ