Re: [cc65] computed labels witih .repeat

From: thefox xofeht <thefox1aspekt.fi>
Date: 2012-08-28 07:10:57
On Tue, Aug 28, 2012 at 3:34 AM, Egan Ford <egan@sense.net> wrote:
> Hello all,
>
> I would like to unroll a loop with .repeat, but I need each copy of
> the loop to have a unique label, e.g.:
>
> .repeat 4, R
> @R:  code
>            more code
>              etc....
> .endrepeat
>
> The above does not work.  Looking for a way to do this if possible.  Thanks.

Something like this:

.repeat 4, R
  .ident( .sprintf( "myLabel%d", R ) ):
    ; Code
.endrepeat

-thefox
----------------------------------------------------------------------
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 Aug 28 07:11:09 2012

This archive was generated by hypermail 2.1.8 : 2012-08-28 07:11:14 CEST