projects
/
YACASL2.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
comet2monitorの追加と、モニター機能作成
[YACASL2.git]
/
include
/
struct.h
diff --git
a/include/struct.h
b/include/struct.h
index
c806e57
..
e36c13f
100644
(file)
--- a/
include/struct.h
+++ b/
include/struct.h
@@
-1,8
+1,13
@@
#ifndef YACASL2_CASL2_INCLUDED
#define YACASL2_CASL2_INCLUDED
#ifndef YACASL2_CASL2_INCLUDED
#define YACASL2_CASL2_INCLUDED
+#include <stdio.h>
+#include <assert.h>
+#include <string.h>
#include <time.h>
#include "word.h"
#include <time.h>
#include "word.h"
+#include "cmem.h"
+#include "hash.h"
/**
* @brief COMET IIの規格値
/**
* @brief COMET IIの規格値
@@
-80,7
+85,7
@@
typedef enum {
/**
* オペランドなし
*/
/**
* オペランドなし
*/
- NONE = 0
0
,
+ NONE = 0,
} CMDTYPE;
/**
} CMDTYPE;
/**
@@
-120,6
+125,15
@@
typedef struct {
extern EXECPTR *execptr;
extern EXECPTR *execptr;
+/**
+ * @brief 汎用レジスタの番号からレジスタを表す文字列を返す
+ *
+ * @return 汎用レジスタを表す文字列。「GR0」「GR1」・・・「GR7」のいずれか
+ *
+ * @param word レジスタ番号[0-7]を表すWORD値
+ */
+char *grstr(WORD word);
+
/**
* COMET II仮想マシンのリセット
*/
/**
* COMET II仮想マシンのリセット
*/
@@
-149,16
+163,26
@@
void free_cmdtype_code();
/**
* コードがキーの命令ハッシュ表を作成する
*/
/**
* コードがキーの命令ハッシュ表を作成する
*/
-bool create_code_type();
+bool create_code_
cmd
type();
/**
* 命令コードから命令の関数ポインタを返す
*/
const void (*getcmdptr(WORD code));
/**
* 命令コードから命令の関数ポインタを返す
*/
const void (*getcmdptr(WORD code));
+/**
+ * 命令コードから命令のタイプを返す
+ */
+CMDTYPE getcmdtype(WORD code);
+
+/**
+ * 命令コードから命令の名前を返す
+ */
+char *getcmdname(WORD code);
+
/**
* コードがキーの命令ハッシュ表を解放する
*/
/**
* コードがキーの命令ハッシュ表を解放する
*/
-void free_code_type();
+void free_code_
cmd
type();
#endif /* YACASL2_CASL2_INCLUDEDの終端 */
#endif /* YACASL2_CASL2_INCLUDEDの終端 */