I will report because it discovered the phenomenon that seems to be the bug of the optimizer. (Please forgive dirty sentences because it is a machine translation...) [ test.c ] long a; // must be static life long b; // must be static life void test(void) { a = 0x00112200; // must be immediate pattern is (1stBYTE == 4thBYTE) b = a; // b is 0x11112200 ! } [ command line ] cl65 -c -T -l -O test.c [ part of test.lst ] 000012r 1 ; b = a; 000012r 1 AD rr rr lda _a+2 000015r 1 85 rr sta sreg 000017r 1 AE rr rr ldx _a+1 00001Ar 1 AD rr rr lda _a 00001Dr 1 8D rr rr sta _b 000020r 1 8E rr rr stx _b+1 000023r 1 A4 rr ldy sreg 000025r 1 8C rr rr sty _b+2 000028r 1 8C rr rr sty _b+3 ; lost 4th BYTE ! ---------------------------------------------------------------------- To unsubscribe from the list send mail to majordomo@musoftware.de with the string "unsubscribe cc65" in the body(!) of the mail.Received on Wed Feb 27 10:07:27 2008
This archive was generated by hypermail 2.1.8 : 2008-02-27 10:07:31 CET