projects
/
YACASL2.git
/ blob
commit
grep
author
committer
pickaxe
?
search:
re
b63a28c7eeced0ba214492a162d32fcb059cfc33
[YACASL2.git]
/
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;
12
const WORD w[] = {0x1010, 0x0005, 0x220f, 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
return 0;
22
}