Re: [cc65] Re: Porting to CC65

From: Ullrich von Bassewitz <uz1musoftware.de>
Date: 2010-10-11 08:30:12
Good morning.

On Sun, Oct 10, 2010 at 09:49:58PM +0200, doynax wrote:
> > Are you sure this table must be within a single page? A can only see a
> > requirement for word alignment, caused by the 6502 bug in conjunction with the
> > indirect jmp.
>
> Sorry, I should have made it clear that I'm treating "state" as a
> single-byte variable (hence the LSB operator for the state constants.)

Ahh, I didn't realize that. Sorry!

> Right, that's the version I eventually got working by making the macro
> tail-recursive. Before that I tried recursing from within an if-branch
> and hit a sixteen level nesting limit. I didn't mean to submit a bug
> report or anything, I just wanted your take on whether I was abusing
> the assembler in a way likely to get me into trouble.

I'm using recursive macros myself to emulate loops. If this means abuse, then
at least you do know now that you're not alone:-) Seriously: Something like
.while might be a good idea, but for now, using recursive macros is the only
way to go.

> I wouldn't be averse to implementing this feature myself and
> submitting a patch, especially as the code looks surprisingly clean
> and readable to me. How would you prefer to see it handled?

Making Token a struct and adding some more information is probably what I
would have done. There might be other ways. If you're about to add something
like that, I would suggest to contact me in private mail first, so we can sort
it out and make sure it doesn't collide with something else that is planned or
just in my head:-)

Regards


        Uz


-- 
Ullrich von Bassewitz                                  uz@musoftware.de
----------------------------------------------------------------------
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 Oct 11 08:30:21 2010

This archive was generated by hypermail 2.1.8 : 2010-10-11 08:30:24 CEST