shutdown関数の追加
[YACASL2.git] / include / casl2.h
index a293b13..038f3dd 100644 (file)
@@ -78,19 +78,32 @@ typedef enum {
     NONE = 0,
 } CMDTYPE;
 
-/* 命令コード配列 */
+/* 命令コード配列 */
 typedef struct {
     char *cmd;
     CMDTYPE type;
     WORD code;
 } CMDCODEARRAY;
 
+/* 命令コード配列のサイズ */
+extern int cmdcodesize;
+
 /* 命令コードのハッシュ表 */
 typedef struct _CMDCODETAB {
     struct _CMDCODETAB *next;
     CMDCODEARRAY *cca;
 } CMDCODETAB;
 
+extern CMDCODETAB **cmdtype_code;
+extern CMDCODETAB **code_type;
+extern int cmdtabsize;
+
+/* COMET II仮想マシンのリセット */
+void reset();
+
+/* COMET II仮想マシンのシャットダウン */
+void shutdown();
+
 /* 命令と命令タイプがキーのハッシュ表を作成する */
 bool create_cmdtype_code();
 
@@ -98,9 +111,6 @@ bool create_cmdtype_code();
 /* 無効な場合は0xFFFFを返す */
 WORD getcmdcode(const char *cmd, CMDTYPE type);
 
-/* 命令と命令タイプからハッシュ値を生成する */
-unsigned hash_cmdtype(const char *cmd, CMDTYPE type);
-
 /* 命令と命令タイプがキーのハッシュ表を表示する */
 void print_cmdtype_code();
 
@@ -110,9 +120,6 @@ void free_cmdtype_code();
 /* 命令コードがキーのハッシュ表を作成する */
 bool create_code_type();
 
-/* 命令コードからハッシュ値を生成する */
-unsigned hash_code(WORD code);
-
 /* 命令コードから命令タイプを取得する */
 /* 無効な場合はNONEを返す */
 CMDTYPE getcmdtype(WORD code);
@@ -124,6 +131,6 @@ void print_code_type();
 void free_code_type();
 
 /* 指定されたファイルにアセンブル結果を書込 */
-void outassemble(char *file);
+void outassemble(const char *file);
 
-#endif
+#endif            /* YACASL2_CASL2_INCLUDEDの終端 */