/* Expect zp x indirect */
L = SkipSpace (L+1);
if (toupper (*L) != 'X') {
- Error ("ASM code error: `X' expected");
+ Error ("ASM code error: 'X' expected");
return 0;
}
L = SkipSpace (L+1);
if (*L != ')') {
- Error ("ASM code error: `)' expected");
+ Error ("ASM code error: ')' expected");
return 0;
}
L = SkipSpace (L+1);
if (*L == ',') {
L = SkipSpace (L+1);
if (toupper (*L) != 'Y') {
- Error ("ASM code error: `Y' expected");
+ Error ("ASM code error: 'Y' expected");
return 0;
}
L = SkipSpace (L+1);
/* Check for subroutine call to local label */
if ((OPC->Info & OF_CALL) && IsLocalLabelName (Arg)) {
Error ("ASM code error: "
- "Cannot use local label `%s' in subroutine call",
+ "Cannot use local label '%s' in subroutine call",
Arg);
}
AM = AM65_ABS;
unsigned Hash = HashStr (Arg) % CS_LABEL_HASH_SIZE;
Label = CS_FindLabel (S, Arg, Hash);
- /* If we don't have the label, it's a forward ref - create it */
- if (Label == 0) {
+ /* If we don't have the label, it's a forward ref - create it unless
+ ** it's an external function.
+ */
+ if (Label == 0 && (OPC->OPC != OP65_JMP || IsLocalLabelName (Arg)) ) {
/* Generate a new label */
Label = CS_NewCodeLabel (S, Arg, Hash);
}
case '.':
/* Control instruction */
ReadToken (L, " \t", Token, sizeof (Token));
- Error ("ASM code error: Pseudo instruction `%s' not supported", Token);
+ Error ("ASM code error: Pseudo instruction '%s' not supported", Token);
break;
default:
if (L) {
/* We found it - be sure it does not already have an owner */
if (L->Owner) {
- Error ("ASM label `%s' is already defined", Name);
+ Error ("ASM label '%s' is already defined", Name);
return L;
}
} else {
/* Safety. This call is quite costly, but safety is better */
if (CollIndex (&S->Labels, L) >= 0) {
- Error ("ASM label `%s' is already defined", Name);
+ Error ("ASM label '%s' is already defined", Name);
return L;
}
/* Print some debugging output */
if (Debug) {
- printf ("Removing unused global label `%s'", X->Name);
+ printf ("Removing unused global label '%s'", X->Name);
}
/* And free the label */