X-Git-Url: http://j8takagi.net/cgi-bin/gitweb.cgi?p=YACASL2.git;a=blobdiff_plain;f=include%2Fassemble.h;h=ae746fd1eb593b093cc997529ec2fc25bed0ed54;hp=594157c1d3299e33f285f1ea7a62d24e76e798ba;hb=5a84169c51f754a58929ce360e9e1a358e0ca74e;hpb=e07b6371cc8a59c6793a895e968ff2c6cf28181b diff --git a/include/assemble.h b/include/assemble.h index 594157c..ae746fd 100644 --- a/include/assemble.h +++ b/include/assemble.h @@ -10,6 +10,16 @@ enum { OPDSIZE = 40, /* オペラントの最大数 */ }; +/* アセンブルモード */ +typedef struct { + bool src; /* ソースを表示する場合はtrue */ + bool label; /* ラベル表を表示する場合はtrue */ + bool onlylabel; /* ラベル表を表示して終了する場合はtrue */ + bool asdetail; /* アセンブラ詳細結果を表示する場合はtrue */ + bool onlyassemble; /* アセンブルだけを行う場合はtrue */ +} ASMODE; +extern ASMODE asmode; + /* 値を格納するポインタ */ extern WORD ptr; @@ -91,9 +101,9 @@ OPD *opdtok(const char *str); /* 1行を解析する */ CMDLINE *linetok(const char *line); -/* 汎用レジスタを表す文字列「GR[0-7]」をWORD値に変換 - is_xがTRUEの場合は、指標レジスタとして用いる汎用レジスタ - 文字列が汎用レジスタを表さない場合は、0xFFFFを返す */ +/* 汎用レジスタを表す文字列「GR[0-7]」から、レジスタ番号[0-7]をWORD値で返す */ +/* 文字列が汎用レジスタを表さない場合は、0xFFFFを返す */ +/* is_xがtrueの場合は指標レジスタ。GR0は、COMET IIの仕様により、エラー発生 */ WORD getgr(const char *str, bool is_x); /* 10進定数をWORDに変換 */ @@ -152,4 +162,4 @@ bool writeRPUSH(PASS pass); /* マクロ命令「RPOP」をメモリに書込 */ bool writeRPOP(PASS pass); -#endif +#endif /* YACASL2_ASSEMBLE_INCLUDEDの終端 */