Re: [cc65] ca65: Why doesn't this zero-page override work?

From: <silverdr1wfmh.org.pl>
Date: 2012-05-25 12:39:51
On 24 maj 2012, at 21:18, Agent Friday <64subnet@gmail.com> wrote:

> On Thu, May 24, 2012 at 5:24 AM,  <silverdr@wfmh.org.pl> wrote:
>> 
>> On 2012-05-24, at 13:47, Agent Friday wrote:
>>>       LDA  Z:FOO
>>> 
>>> FOO = $12
>> 
>> I think the forward declaration is a problem. I recall discussing
>> similar thing with UZ some time ago. Check if you get warning when
>> the forced Z: is omitted (this would be result of my discussion) and
>> if you get the same if the declaration of FOO is _before_ its first
>> use.
> 
> Yes, the "warning: didn't use zeropage ..."

Ok. 

> ...
>        LDA  Z:FOO      ; _NO_ ERROR!

Right, this confirms my suspicions.

> So it seems that Z: _is_ in fact recognized as zero-page addressing
> override, but instead of being used as the default size for FOO
> (when not yet defined), it is still assuming FOO must be 16 bits,

Yes, I recall discussing exactly this. But in the context of Z: ...

> ..I conclude that this is a bug in the implementation of Z:

.. I believe your conclusion is a valid one ;-)
-- 
Sent from mobile phone (so please have understanding)
----------------------------------------------------------------------
To unsubscribe from the list send mail to majordomo@musoftware.de with
the string "unsubscribe cc65" in the body(!) of the mail.
Received on Fri May 25 12:41:54 2012

This archive was generated by hypermail 2.1.8 : 2012-05-25 12:41:58 CEST