root/test/system/comet2_smoke/direct/create_a.c

/* [<][>][^][v][top][bottom][index][help] */

DEFINITIONS

This source file includes following definitions.
  1. main

   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     return 0;
  22 }

/* [<][>][^][v][top][bottom][index][help] */