From b57939e6166b26126802b129a3f367b972bb453f Mon Sep 17 00:00:00 2001 From: j8takagi Date: Wed, 27 Feb 2019 13:09:42 +0900 Subject: [PATCH] =?utf8?q?=E3=83=98=E3=83=83=E3=83=80=E3=83=BC=E3=83=95?= =?utf8?q?=E3=82=A1=E3=82=A4=E3=83=AB=E4=BE=9D=E5=AD=98=E9=96=A2=E4=BF=82?= =?utf8?q?=E3=81=AE=E6=95=B4=E7=90=86?= MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit --- include/assemble.h | 4 ---- include/exec.h | 18 ------------------ include/monitor.h | 7 +------ include/struct.h | 18 ++++++++++++++++++ src/casl2.c | 1 + 5 files changed, 20 insertions(+), 28 deletions(-) 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のエラーをエラーリストに追加 -- 2.18.0