make valgrind対応のため、テストを更新
[YACASL2.git] / test / system / comet2_smoke / direct / create_a.c
1 #include <stdio.h>
2 #include <stdlib.h>
3 #include "cmem.h"
4 #include "word.h"
5
6 /**
7  * 引数で指定したファイルにアセンブル結果を書込
8  */
9 int main()
10 {
11     FILE *fp = NULL;
12     const WORD w[] = {0x1010, 0x0005, 0x2210, 0x0006, 0x8100, 0x0003, 0x0001};
13     const char *f = "a.o";
14
15     if((fp = fopen(f, "w")) == NULL) {
16         perror(f);
17         exit(-1);
18     }
19     fwrite(w, sizeof(WORD), ARRAYSIZE(w), fp);
20     fclose(fp);
21     FREE(fp);
22     return 0;
23 }