diff --git a/src/cc65/codegen.c b/src/cc65/codegen.c index 90f3c3ebc..06fe224c7 100644 --- a/src/cc65/codegen.c +++ b/src/cc65/codegen.c @@ -166,7 +166,7 @@ void g_preamble (void) /* If we're producing code for some other CPU, switch the command set */ if (CPU == CPU_65C02) { - AddTextLine ("\t.pc02"); + AddTextLine ("\t.setcpu\t\t\"65C02\""); } /* Allow auto import for runtime library routines */ diff --git a/src/cc65/main.c b/src/cc65/main.c index e7a68d502..3ed7127e3 100644 --- a/src/cc65/main.c +++ b/src/cc65/main.c @@ -383,6 +383,7 @@ static void OptCreateDep (const char* Opt attribute ((unused)), static void OptCPU (const char* Opt, const char* Arg) /* Handle the --cpu option */ { + /* Find the CPU from the given name */ CPU = FindCPU (Arg); if (CPU != CPU_6502 && CPU != CPU_65C02) { AbEnd ("Invalid argument for %s: `%s'", Opt, Arg);