mainZ80 assembler - Support: sr #108669, Added IFDEF & IFNDEF support.

 
 

sr #108669: Added IFDEF & IFNDEF support.

Submitter:  S. Bryant Keller <bkeller>
Submitted:  Sat 18 Oct 2014 02:50:27 AM UTC
   
 
Category:  None Priority:  5 - Normal
Severity:  3 - Normal Status:  None
Privacy:  Public Assigned to:  None
Open/Closed:  Closed Operating System:  None
* Mandatory Fields

Add a New Comment Rich Markup
   

Sat 16 Jun 2018 07:17:53 AM UTC, comment #2: 

Sorry for being several years late.

Thanks for the patch! I'm not including it though, because as you wrote, the ? operator is supposed to be used for that.

It was broken for a long time though (which is why you couldn't get it to work: it didn't), but it has recently been fixed. So now instead of "ifdef foo", you can do "if ?foo". Because this is an expression which returns a value (0 or 1), it can also be used instead of ifndef: "if !?foo".

Closing this item because things work as they should again.

Thanks again!

Bas Wijnen <shevek>
Group administrator
Sun 19 Oct 2014 04:03:33 AM UTC, comment #1: 

I wrote this change.diff file because I couldn't get the ?label method to work as described in the MAN pages. The 1.8 Manual Pages on my Debian Linux desktop are full of errors (most have been reported) but it's unclear as to how ?label is supposed to work. When I tried using:

if ?somelbl == 0
 somelbl: equ 123
endif

I get two errors, one for the obvious use of an undefined symbol, the other is "error: expression expected (not )" which I assume is a result of the assembler treating the question mark as a ternary operator (since that has higher precedence).

S. Bryant Keller <bkeller>
Sat 18 Oct 2014 02:50:27 AM UTC, original submission:  


S. Bryant Keller <bkeller>

 

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

Attach Files:
   
   
Comment:
   

Attached Files
file #32287:  changes.diff added by bkeller (2KiB - text/x-patch - IFDEF & IFNDEF Support)

 

Depends on the following items: None found

Items that depend on this one: None found

 

Carbon-Copy List
  • -email is unavailable- added by shevek (Posted a comment)
  • -email is unavailable- added by bkeller (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.

     

    Follow 2 latest changes.

    Date Changed by Updated Field Previous Value => Replaced by
    2018-06-16 shevek Open/ClosedOpen Closed
    2014-10-18 bkeller Attached File- Added changes.diff, #32287

    Back to the top

    Powered by Savane 3.13-02a9.
    Corresponding source code