X-Git-Url: http://j8takagi.net/cgi-bin/gitweb.cgi?a=blobdiff_plain;ds=inline;f=test%2Fsystem%2Fcomet2_err%2Ferr_206%2Fcreate_a.c;fp=test%2Fsystem%2Fcomet2_err%2Ferr_206%2Fcreate_a.c;h=b63a28c7eeced0ba214492a162d32fcb059cfc33;hb=473906d23322ef829ee8dad807895235d645981c;hp=0000000000000000000000000000000000000000;hpb=7ac339dcd755848e9820142422752fbdc8186b5c;p=YACASL2.git diff --git a/test/system/comet2_err/err_206/create_a.c b/test/system/comet2_err/err_206/create_a.c new file mode 100644 index 0000000..b63a28c --- /dev/null +++ b/test/system/comet2_err/err_206/create_a.c @@ -0,0 +1,22 @@ +#include +#include +#include "cmem.h" +#include "word.h" + +/** + * 引数で指定したファイルにアセンブル結果を書込 + */ +int main() +{ + FILE *fp; + const WORD w[] = {0x1010, 0x0005, 0x220f, 0x0006, 0x8100, 0x0003, 0x0001}; + const char *f = "a.o"; + + if((fp = fopen(f, "w")) == NULL) { + perror(f); + exit(-1); + } + fwrite(w, sizeof(WORD), ARRAYSIZE(w), fp); + fclose(fp); + return 0; +}