Re: [cc65] Optimizing code fails - Found the error!

Date view Thread view Subject view

From: Benjamin Bahnsen (bb_at_game64.de)
Date: 2003-11-22 12:38:26


Hello,

i finally found the problem. It seems to be a bug in the compiler. I don't
use any jumps to $EA?? at the end of my interrupt. I restore the values of
a, x and y myself.

 asm("pla");
 asm("tay");
 asm("pla");
 asm("tax");
 asm("pla");
 asm("rti");

If i compile the program with the -O option, the generated code is:
.
.
00007Ar 1  68            pla
00007Br 1  68            pla
00007Cr 1  68            pla
00007Dr 1  40            rti
00007Er 1
00007Er 1               .endproc
00007Er 1
00007Er 1

Is this error reproducable?  I can send you the source code of the file if
you need it.

Regards,
 Benjamin


----------------------------------------------------------------------
To unsubscribe from the list send mail to majordomo_at_musoftware.de with
the string "unsubscribe cc65" in the body(!) of the mail.


Date view Thread view Subject view

This archive was generated by hypermail 2.1.3 : 2003-11-22 12:41:55 CET