+/* エラー番号とエラーメッセージ */
+CERRARRAY cerr[] = {
+ { 201, "Load object file - full of COMET II memory" },
+ { 202, "SVC input - out of Input memory" },
+ { 203, "SVC output - out of COMET II memory" },
+ { 204, "Program Register (PR) - out of COMET II memory" },
+ { 205, "Stack Pointer (SP) - cannot allocate stack buffer" },
+ { 206, "Address - out of COMET II memory" },
+ { 207, "Stack Pointer (SP) - out of COMET II memory" },
+ { 0, NULL },
+};
+
+/* 指定されたファイルからアセンブル結果を読込 */
+bool loadassemble(char *file) {
+ FILE *fp;
+ if((fp = fopen(file, "r")) == NULL) {
+ perror(file);
+ return false;
+ }
+ endptr = startptr + fread(memory, sizeof(WORD), memsize, fp);
+ fclose(fp);
+ return true;
+}
+
+/* comet2コマンド */