gnupic: Passing relational operators to macros


Previous by date: 31 Aug 2005 21:07:12 +0100 Re: [gnupic] Proposed addition to gpasm, Peter Onion
Next by date: 31 Aug 2005 21:07:12 +0100 Re: [gnupic] MPLAB under wine?, Ben Dugan
Previous in thread:
Next in thread:

Subject: Passing relational operators to macros
From: Ben Dugan ####@####.####
Date: 31 Aug 2005 21:07:12 +0100
Message-Id: <43160DE2.2030601@curdes.com>

I'm looking at Brad Minch's assembler code for the 18f2455, which is 
mpasm-ready, but maybe not quite gpasm-ready.  I'm trying to see if I 
can get it to work with gpasm.

He wrote some interesting macros, which is the reason I'm posting this 
question:

Can a macro in gpasm be passed a relational operator (==, !=, <=, >=, 
etc.) as a argument, and then use it in a conditional statement?  For 
instance, can I write:

blah macro relop
	if (1 relop 1)
		; an equal sign was passed
	else if (1 relop 0)
		; one of these was passed: !=, >, or >=
	endif
	endm

Apparently mpasm can handle this, but I'm getting syntax errors from 
gpasm on the (1 relop 1) and (1 relop 0) lines.

Let me know if this is not an appropriate place to ask this question!

If it would be helpful I can send a short asm file.

Thanks.

Ben



Previous by date: 31 Aug 2005 21:07:12 +0100 Re: [gnupic] Proposed addition to gpasm, Peter Onion
Next by date: 31 Aug 2005 21:07:12 +0100 Re: [gnupic] MPLAB under wine?, Ben Dugan
Previous in thread:
Next in thread:


Powered by ezmlm-browse 0.20.