-/* comet2のエラー定義 */
-CERR cerr_comet2[] = {
- { 201, "load object file - full of COMET II memory" },
- { 208, "object file is not specified" },
-};
-bool addcerrlist_comet2()
-{
- return addcerrlist(ARRAYSIZE(cerr_comet2), cerr_comet2);
-}
-
-/* 指定されたファイルからアセンブル結果を読込 */
-bool loadassemble(char *file) {
- FILE *fp;
- bool status = true;
-
- if((fp = fopen(file, "r")) == NULL) {
- perror(file);
- return false;
- }
- prog->end = prog->start +
- fread(sys->memory, sizeof(WORD), sys->memsize - prog->start, fp);
- if(prog->end == sys->memsize) {
- setcerr(201, NULL); /* Load object file - full of COMET II memory */
- fprintf(stderr, "Execute error - %d: %s\n", cerr->num, cerr->msg);
- status = false;
- }
- fclose(fp);
- return status;
-}