bugZ80 assembler - Bugs: bug #26772, string argument to macro is not...

 
 

bug #26772: string argument to macro is not parsed correctly

Submitter:  None
Submitted:  Wed 10 Jun 2009 10:48:08 AM UTC
   
 
Category:  None Severity:  3 - Normal
Item Group:  None Status:  Fixed
Privacy:  Public Assigned to:  asgalon
Open/Closed:  Closed
* Mandatory Fields

Add a New Comment Rich Markup
   

Sat 13 Mar 2021 05:11:15 PM UTC, comment #5: 
Peter Kollner <asgalon>
Group Member
Sat 13 Mar 2021 05:03:29 PM UTC, comment #4: 

The following works:


bug26772:
x:        macro arg
        db arg
        endm

        org 0x8000
        x 'mld '                 ; macro should handle string arg correctly


which leads to:


$ ../src/z80asm -I ../headers bug26772.asm -o bug26772.bin
$


The following does not work:


        add hl, de

bug26772:
x:        macro arg
        db arg
        endm

        org 0x8000
        x 'mld '                 ; macro should handle string arg correctly



running the assembler now produces:


$ ../src/z80asm -I ../headers bug26772.asm -o bug26772.bin
bug26772.asm:10: error: unable to resolve reference: arg
*** 1 error found ***
$


Peter Kollner <asgalon>
Group Member
Tue 02 Mar 2021 10:32:48 PM UTC, comment #3: 

Something had changed with the compiler optimization that lead to an error with the macro argument fix. I'll have to check that in depth next weekend.

Peter Kollner <asgalon>
Group Member
Tue 02 Mar 2021 05:33:40 PM UTC, comment #2: 

pass.err problem confirmed. Have to take a look the next weekend.

Peter Kollner <asgalon>
Group Member
Thu 05 May 2016 11:50:23 PM UTC, comment #1: 

will be fixed in next release

Peter Kollner <asgalon>
Group Member
Wed 10 Jun 2009 10:48:08 AM UTC, original submission:  

$ z80asm
x: macro arg
        db arg
endm


org     0xc000

        x 'mld   '
^D
internal assembler error, sp == 1
invalid number of arguments for macro (is 2, must be 1)

get_macro_args() cannot deal with string arguments.

In addition, in the man page for z80asm the macro example is ended with endif. Surely that should be endm? If not this should be explained.

Anonymous

 

(Note: upload size limit is set to 16384 kB, after insertion of the required escape characters.)

Attach Files:
   
   
Comment:
   

Attached Files
file #44816:  pass.err added by john_critchley (380B - application/octet-stream - pass.asm:77: error: unable to resolve reference: arg * 1 error found * : gcc (Ubuntu 7.3.0-16ubuntu3) 7.3.0)

 

Depends on the following items: None found

Items that depend on this one: None found

 

Carbon-Copy List
  • -email is unavailable- added by john_critchley (Updated the item)
  • -email is unavailable- added by asgalon (Updated the item)
  •  

    There are 0 votes so far. Votes easily highlight which items people would like to see resolved in priority, independently of the priority of the item set by tracker managers.

    Only logged-in users can vote.

     

    Follow 8 latest changes.

    Date Changed by Updated Field Previous Value => Replaced by
    2021-03-13 asgalon StatusIn Progress Fixed
        Open/ClosedOpen Closed
    2021-03-02 asgalon StatusReady For Test In Progress
    2018-08-20 john_critchley Attached File- Added pass.err, #44816
    2016-05-05 asgalon Assigned toNone asgalon
    2016-05-05 asgalon StatusIn Progress Ready For Test
    2016-05-05 asgalon StatusConfirmed In Progress
    2016-05-05 asgalon StatusNone Confirmed

    Back to the top

    Powered by Savane 3.13-d3ae.
    Corresponding source code