+/* casl2コマンドのオプション */
+static struct option longopts[] = {
+ {"source", no_argument, NULL, 's'},
+ {"label", no_argument, NULL, 'l'},
+ {"labelonly", no_argument, NULL, 'L'},
+ {"assembledetail", no_argument, NULL, 'a'},
+ {"assembledetailonly", no_argument, NULL, 'A'},
+ {"assembleout", optional_argument, NULL, 'o'},
+ {"assembleoutonly", optional_argument, NULL, 'O'},
+ {"trace", no_argument, NULL, 't'},
+ {"tracearithmetic", no_argument, NULL, 't'},
+ {"tracelogical", no_argument, NULL, 'T'},
+ {"dump", no_argument, NULL, 'd'},
+ {"memorysize", required_argument, NULL, 'M'},
+ {"clocks", required_argument, NULL, 'C'},
+ {"help", no_argument, NULL, 'h'},
+ {0, 0, 0, 0},
+};
+
+/* casl2のエラー定義 */
+CERRARRAY cerr_casl2[] = {
+ { 126, "source file is not specified" },
+};
+bool addcerrlist_casl2()
+{
+ return addcerrlist_casl2(ARRAYSIZE(cerr_casl2), cerr_casl2);
+}
+
+/* 指定されたファイルにアセンブル結果を書込 */
+void outassemble(const char *file) {