Re: [cc65] .cpu none?

From: Ullrich von Bassewitz <uz1musoftware.de>
Date: 2004-05-10 16:12:52
On Thu, Apr 15, 2004 at 03:43:33PM +0200, MagerValp wrote:
> Yeah. On a somewhat related note - how do you detect if the (zp,x)
> addressing mode is used? The 65j02 doesn't have that one, and I'm not
> sure how to .match it.  

I've extended token lists, so this is now possible. Token lists can now
optionally be enclosed in curly braces, which makes it possible to include
tokens that would otherise terminate the list. In some places, when reading
token lists, the assembler had already implemented matching pairs of
parenthesis. This matching has been removed, because it was not available
everywhere, didn't work in all cases, and is no longer needed with the new
curly brace extension. Please note however, that in rare cases, existing code
may need modification.

With the new feature that is available in the current snapshot, matching for
(zp,x) works as in the following example:

----------------------------------------------------------------------------
.macro  foo     arg1, arg2
        .if     .match({.left(1, {arg1})},{(}) .and .match({arg2}, {x)})
                .out    "(zp,x)"
        .else
                .out    "Something else"
        .endif
.endmacro

        foo     (zp,x)          ; "(zp,x)
        foo     (zp),y          ; "Something else"
        foo     zp              ; "Something else"
----------------------------------------------------------------------------

Any feedback regarding the new code is appreciated.

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 May 10 16:12:56 2004

This archive was generated by hypermail 2.1.8 : 2004-05-10 16:13:03 CEST