Skip to content

Commit 1a7c129

Browse files
committed
Added error string for unsupported CPU type
1 parent 76afbf5 commit 1a7c129

File tree

3 files changed

+3
-6
lines changed

3 files changed

+3
-6
lines changed

src/assemble.c

Lines changed: 1 addition & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1036,18 +1036,13 @@ void handle_asm_cpu(void) {
10361036
adlmode = 0;
10371037
return;
10381038
}
1039-
//if(fast_strcasecmp(token.start, "Z280") == 0) {
1040-
// cputype = CPU_Z280;
1041-
// adlmode = 0;
1042-
// return;
1043-
//}
10441039
if(fast_strcasecmp(token.start, "EZ80") == 0) {
10451040
cputype = CPU_EZ80;
10461041
adlmode = 1;
10471042
return;
10481043
}
10491044

1050-
error("Unknown CPU type", "%s", token.start);
1045+
error(message[ERROR_UNSUPPORTED_CPU], "%s", token.start);
10511046
}
10521047

10531048
void handle_asm_if(void) {

src/defines.h

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -449,6 +449,7 @@ typedef enum {
449449
ERROR_INVALID_CPU_MODE,
450450
ERROR_NESTEDRELOCATE,
451451
ERROR_MISSINGRELOCATE,
452+
ERROR_UNSUPPORTED_CPU,
452453
ERROR_SYNTAX
453454
} errormessage_t;
454455

src/globals.c

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -135,5 +135,6 @@ char *message[] = {
135135
"No ADL mode for CPU type",
136136
"Nested relocate not allowed",
137137
"Missing RELOCATE directive",
138+
"Unsupported CPU type",
138139
"Syntax error"
139140
};

0 commit comments

Comments
 (0)