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

From: Yutaka Amanai <yasai-itame19421jade.plala.or.jp>
Date: 2011-05-10 11:10:56
2011/05/10 2:05 Ullrich von Bassewitz wrote:
> The reason is the local scope. ca65 doesn't know if a local symbol STR will
> follow when it encounters the first line of myproc. For example, myproc could
> look like
>
>          STR:    .byte   "str"
>          .proc   myproc
>                  lda     STR,x
>                  lda     #.sizeof(STR)
>          STR:    .res    256
>          .endproc
>
> in which case .sizeof(STR) would be 256 instead of 3. If you want to
> explicitly address the symbol STR in global scope, just use ::STR.

Thank you. I didn't considered about defining STR in "myproc" later. I 
will use "::" for global symbol.
----------------------------------------------------------------------
To unsubscribe from the list send mail to majordomo@musoftware.de with
the string "unsubscribe cc65" in the body(!) of the mail.
Received on Tue May 10 11:11:18 2011

This archive was generated by hypermail 2.1.8 : 2011-05-10 11:11:22 CEST