bugZ80 assembler - Bugs: bug #60160, "junk at end of line"...


bug #60160: "junk at end of line" during macro definition

Submitted by:  Paul Flo Williams <hisdeedsaredust>
Submitted on:  Wed 03 Mar 2021 10:55:32 AM UTC
Category:  None Severity:  3 - Normal
Item Group:  None Status:  Confirmed
Privacy:  Public Assigned to:  None
Open/Closed:  Open
* Mandatory Fields

Add a New Comment (Rich Markup)

Comment Type & Canned Response:
       No canned response available


Wed 03 Mar 2021 10:55:32 AM UTC, original submission:  

If a listing is asked for, a "junk at end of line" error will be generated for every content line of a macro (other than the "macro" and "endm" lines themselves).

This appears to be as a result of the line not being consumed in the normal fashion by moving ptr, but by separate tokenisation, so a listing buffer is formed in the usual fashion, but then ptr still points to the final token(s), which will produce an error.

This case is already dealt with in the block that deals with "if", so a simple solution is to clear out ptr in the same fashion during macro definition, i.e. directly after

if (cmd == ENDM)
  define_macro = 0;

Add a new line:

ptr = "";

Paul Flo Williams <hisdeedsaredust>
Project Member


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

Attach Files:

No files currently attached


Depends on the following items: None found

Items that depend on this one: None found


Carbon-Copy List
  • -email is unavailable- added by asgalon (Updated the item)
  • -email is unavailable- added by hisdeedsaredust (Submitted 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.





    Follows 1 latest change.

    Date Changed by Updated Field Previous Value => Replaced by
    2021-03-13 asgalon StatusNone => Confirmed

    Back to the top

    Powered by Savane 3.9