X-Git-Url: http://j8takagi.net/cgi-bin/gitweb.cgi?p=YACASL2.git;a=blobdiff_plain;f=include%2Fstruct.h;h=e36c13f7fb0d886ab49303f538a78edae75973dc;hp=54a2418b94240ff0e9bfe80983d4fba93fb8083c;hb=2f0b91ab1a54973a084e1609b46a1432c8b8e334;hpb=03e322484530da78d796401413d9f5f493d95345 diff --git a/include/struct.h b/include/struct.h index 54a2418..e36c13f 100644 --- a/include/struct.h +++ b/include/struct.h @@ -1,8 +1,13 @@ #ifndef YACASL2_CASL2_INCLUDED #define YACASL2_CASL2_INCLUDED +#include +#include +#include #include #include "word.h" +#include "cmem.h" +#include "hash.h" /** * @brief COMET IIの規格値 @@ -80,7 +85,7 @@ typedef enum { /** * オペランドなし */ - NONE = 00, + NONE = 0, } CMDTYPE; /** @@ -120,6 +125,15 @@ typedef struct { extern EXECPTR *execptr; +/** + * @brief 汎用レジスタの番号からレジスタを表す文字列を返す + * + * @return 汎用レジスタを表す文字列。「GR0」「GR1」・・・「GR7」のいずれか + * + * @param word レジスタ番号[0-7]を表すWORD値 + */ +char *grstr(WORD word); + /** * COMET II仮想マシンのリセット */ @@ -156,6 +170,16 @@ bool create_code_cmdtype(); */ const void (*getcmdptr(WORD code)); +/** + * 命令コードから命令のタイプを返す + */ +CMDTYPE getcmdtype(WORD code); + +/** + * 命令コードから命令の名前を返す + */ +char *getcmdname(WORD code); + /** * コードがキーの命令ハッシュ表を解放する */