Re: [cc65] ca65: .sizeof() doesn't return correct values?

From: Stefan Wessels <>
Date: 2011-05-08 18:55:26

On 2011-05-08, at 8:56 AM, Yutaka Amanai wrote:

> 2011/05/09 0:31 Groepaz wrote:
>> On Sonntag 08 Mai 2011, you wrote:
>>> According to this listing, .sizeof(FOO)=2 and .sizeof(BAR)=0. And, if
>>> you uncomment the line "lda BAZ,x", ca65 causes an error: "Size of `BAZ'
>>> is unknown". Is this intended behavior? Or am I making a wrong use of
>>> .sizeof() ?
>> what exactly do you expect the size of a label to be? IMHO the (correct)
>> result is always 2, for c64 at least :)
> I always expect 2 (about FOO, BAR, and BAZ). I understand that .sizeof()
> should be independent of newlines.

The documentation for .sizeof says newlines do matter:
"...this is the size of the data declared on the same source line as the label"

I think what you want is simply: lda     #BAR-FOO


To unsubscribe from the list send mail to with
the string "unsubscribe cc65" in the body(!) of the mail.
Received on Sun May 8 19:00:47 2011

This archive was generated by hypermail 2.1.8 : 2011-05-08 19:00:51 CEST