Re: [cc65] ca65 bug

From: Ullrich von Bassewitz <uz1musoftware.de>
Date: 2006-08-13 23:13:23
On Sun, Aug 13, 2006 at 03:40:03AM +0200, Groepaz wrote:
> is accepted by the assembler with no error, BUT the two calculated bytes are
> wrong (both $00). the confusing part is that when i do exactly the same but
> without using a macro, it works fine - and i see no reason why the macro
> shouldnt work because of that...

Yes, that is definitely a bug. What happens is this: The scanner has two
sources of input. Either a stored list of tokens or a file. As long as there
is a list of tokens, it will use this list and not look at any files. Macros
are stored lists of tokens, so within this list, the .include directive is
correctly parsed, the file opened and pushed onto the input file stack, but
the scanner continues reading tokens from the macro. Once the macro token list
is exhausted, the file is read. So what is actually messed up is the order of
things, and this makes it look so confusing.

> having this fixed would be really appriciated, would save me a lot of
> typing :=)

Unfortunately, it is not a small thing, since I will have to merge both input
stacks (files and token lists) into one and this needs some redesigning.

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 Sun Aug 13 23:13:35 2006

This archive was generated by hypermail 2.1.8 : 2006-08-13 23:13:39 CEST