Re: [cc65] How to force a read from a memory mapped register w/o volatile

From: Oliver Schmidt <ol.sc1web.de>
Date: 2010-12-06 16:57:21
Hi Dave,

>> 1. Write the function in assembler
>
> I tried using inline assembler, and it still got optimized out:

The above meant non-inline assembler. Regarding inline assembler
http://www.cc65.org/doc/cc65-9.html
says:

"Note: Inline assembler statements are subject to all optimizations
done by the compiler. There is currently no way to protect an inline
assembler statement from being moved or removed completely by the
optimizer. If in doubt, check the generated assembler output, or
disable optimizations."

Regards,
Oliver
----------------------------------------------------------------------
To unsubscribe from the list send mail to majordomo@musoftware.de with
the string "unsubscribe cc65" in the body(!) of the mail.
Received on Mon Dec 6 16:58:59 2010

This archive was generated by hypermail 2.1.8 : 2010-12-06 16:59:02 CET