バージョンアップ
[YACASL2.git] / include / monitor.h
index b9ca454..e370072 100644 (file)
@@ -4,11 +4,8 @@
 #include <stdio.h>
 #include <string.h>
 #include <assert.h>
-#include "hash.h"
-#include "cmem.h"
-#include "cerr.h"
+#include "assemble.h"
 #include "exec.h"
-#include "word.h"
 
 /**
  * @brief モニター
@@ -52,6 +49,12 @@ enum {
     MONINSIZE = 40    /**<モニターの、入力領域 */
 };
 
+typedef enum {
+    MONREPEAT = 0,
+    MONNEXT = 1,
+    MONQUIT = 2,
+} MONCMDTYPE;
+
 /**
  * @brief アドレスのハッシュ値を返す
  *
@@ -79,6 +82,16 @@ MONARGS *monargstok(const char *str);
  */
 MONCMDLINE *monlinetok(const char *line);
 
+/**
+ * @brief モニターの命令を実行する
+ *
+ * @return モニター命令の種類
+ *
+ * @param *cmd モニター命令
+ * @param *args モニター命令の引数
+ */
+MONCMDTYPE monitorcmd(char *cmd, MONARGS *args);
+
 /**
  * @brief ブレークポイント表にアドレスがある場合はtrue、ない場合はfalseを返す
  *
@@ -114,4 +127,11 @@ bool delbps(WORD adr);
  */
 void freebps();
 
+/**
+ * @brief COMET IIモニターを起動する
+ *
+ * @return なし
+ */
+void monitor();
+
 #endif        /* end of MONITOR_INCLUDE */