projects
/
YACASL2.git
/ blob
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
history
|
raw
|
HEAD
READMEのCASL II仕様書へのリンクを修正
[YACASL2.git]
/
comet2
/
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;
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
return 0;
22
}