Re: [cc65] macro arguments

From: <silverdr1inet.com.pl>
Date: 2005-12-29 22:05:28
On 2005-12-29, at 21:54, Ullrich von Bassewitz wrote:

>> after a longer break I downloaded and compiled the 20051221 snapshot
>> of the cc65 and started porting some of my code to ca65. What I
>> noticed is that I can't have macro arguments being named with a
>> single letter or the assembler complains about trailing garbage. The
>> docs don't seem to mention this limitation in the .MACRO section. Is
>> that a bug or a feature?
>
> The following single letter identifiers are reserved keywords: a, x  
> and y. If
> they weren't, the following could not be parsed without conflicts:
>
>         a:      .byte   0
>                 lsr     a       ; Shift what?
>

Ah, I see. I am used to LSR alone for LSR A and co. and therefore  
didn't even think of this potential conflict.

> Other single letter identifiers should be usable without problems.

OK. TNX.

One more question: I am looking for something like .DSB from xa - the  
control command that assembles a given number of bytes. Is there  
something like that? I currently wrote a:

.macro	dsb	numberoftimes
	.repeat	numberoftimes
		.byte	$00
	.endrepeat
.endmacro

macro to emulate this command but maybe I am just missing something?

-- 
According to my research, the name eMac is also a reference to  
"Emacs", a program that is a standard-bearer for the Communistic Open  
Source movement - Dr. Richard Paley

----------------------------------------------------------------------
To unsubscribe from the list send mail to majordomo@musoftware.de with
the string "unsubscribe cc65" in the body(!) of the mail.
Received on Thu Dec 29 22:05:41 2005

This archive was generated by hypermail 2.1.8 : 2005-12-29 22:05:43 CET