#1 #define macros with arguments

None
closed
Borut Ražem
None
5
2012-11-01
2002-05-14
David Ellsworth
No

If I assemble the file below, I get a
test1.asm:11:Error [103] parse error
Line 11 is the one with movlw.

This works fine with mplab. This is with gputils
0.10.3.

Thanks,
David

------ cut here -------
        list      p=16f877

        __CONFIG 0

#define L7(val)  ((val) & 0x7f)

        RADIX   DEC

        org     0x000
        nop
        movlw   L7(123)
        goto    $

        END

Discussion

  • Craig Franklin
    Craig Franklin
    2002-05-15

    Logged In: YES
    user_id=91596

    gpasm does not yet support #define macros with arguments. I
    will see what I can do for the next release. Thanks.

     
  • Borut Ražem
    Borut Ražem
    2012-10-16

    • Description has changed:

    Diff:

    --- old
    +++ new
    @@ -8,6 +8,7 @@
     Thanks,
     David
    
    +~~~~~~
     ------ cut here -------
             list      p=16f877
    
    @@ -23,3 +24,4 @@
             goto    $
    
             END
    +~~~~~~
    
    • assigned_to: Borut Ražem
    • milestone: --> Next_Release_(example)

    • Description has changed:

    Diff:

    --- old
    +++ new
    @@ -14,7 +14,7 @@
    
             __CONFIG 0
    
    -#define L7(val)  ((val) & 0x7f)
    +#define L7(val)  ((val) & 0x7f)
    
             RADIX   DEC
    
     


Anonymous


Cancel   Add attachments