+/* 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のエラー定義 */
+CERR cerr_casl2[] = {
+ { 126, "no source file" },
+};
+bool addcerrlist_casl2()
+{
+ return addcerrlist(sizeof(cerr_casl2), cerr_casl2);
+}
+
+/* 指定されたファイルにアセンブル結果を書込 */
+void outassemble(const char *file) {