X-Git-Url: http://j8takagi.net/cgi-bin/gitweb.cgi?p=YACASL2.git;a=blobdiff_plain;f=include%2Fassemble.h;h=ae746fd1eb593b093cc997529ec2fc25bed0ed54;hp=6372e19105c884cedac77c512701f4bf8b69a39a;hb=ed3225328d7bc0d718fc97dd0b05692b7287667b;hpb=fda1563ea37180835e0b9c6e7a9c7ae607895446 diff --git a/include/assemble.h b/include/assemble.h index 6372e19..ae746fd 100644 --- a/include/assemble.h +++ b/include/assemble.h @@ -1,3 +1,6 @@ +#ifndef YACASL2_ASSEMBLE_INCLUDED +#define YACASL2_ASSEMBLE_INCLUDED + /* CASL IIの制限 */ enum { LINESIZE = 1024, /* 行の最大文字数 */ @@ -7,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; @@ -88,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に変換 */ @@ -148,3 +161,5 @@ bool writeRPUSH(PASS pass); /* マクロ命令「RPOP」をメモリに書込 */ bool writeRPOP(PASS pass); + +#endif /* YACASL2_ASSEMBLE_INCLUDEDの終端 */