gnupic: Re: [gnupic] More than one #v(expression) in a single line of a macro


Previous by date: 8 Sep 2005 20:59:32 +0100 Re: [gnupic] More than one #v(expression) in a single line of a macro, Ben Dugan
Next by date: 8 Sep 2005 20:59:32 +0100 Re: [gnupic] Proposed addition to gpasm, Craig Franklin
Previous in thread: 8 Sep 2005 20:59:32 +0100 Re: [gnupic] More than one #v(expression) in a single line of a macro, Ben Dugan
Next in thread: 8 Sep 2005 20:59:32 +0100 Re: [gnupic] More than one #v(expression) in a single line of a macro, Ben Dugan

Subject: Re: [gnupic] More than one #v(expression) in a single line of a macro
From: Bill Freeman ####@####.####
Date: 8 Sep 2005 20:59:32 +0100
Message-Id: <17184.39242.181297.430737@localhost.localdomain>

Ben Dugan writes:
...
 > This is clever; thanks! I have to think if it'll do what I'm really
 > looking for, though. It might, but I'm not sure. I am looking for a
 > way that the labels are generated automatically, and branches to them
 > can be calculated automatically, through macros. So I don't want to
 > "set" the adresses of the labels as you've done. This may be a minor
 > issue, but I can't tell yet.
...

	The following seems to work:

---------------------------------------------------------------
	list	p=16f877
	include "p16f877.inc"

inrtgt	macro	a, b
a#v(b)
	endm

target	macro	a, b
	inrtgt	label#v(a)_, b
	endm

inrbrn	macro	a, b
	goto	a#v(b)	
	endm

brnch	macro	a, b
	inrbrn	label#v(a)_, b
	endm

	org	0
	target	1,2
	movlw	0
	brnch	3, 4
	target	3, 4
	movlw	1
	brnch	1, 2

	end
---------------------------------------------------------------

							Bill

Previous by date: 8 Sep 2005 20:59:32 +0100 Re: [gnupic] More than one #v(expression) in a single line of a macro, Ben Dugan
Next by date: 8 Sep 2005 20:59:32 +0100 Re: [gnupic] Proposed addition to gpasm, Craig Franklin
Previous in thread: 8 Sep 2005 20:59:32 +0100 Re: [gnupic] More than one #v(expression) in a single line of a macro, Ben Dugan
Next in thread: 8 Sep 2005 20:59:32 +0100 Re: [gnupic] More than one #v(expression) in a single line of a macro, Ben Dugan


Powered by ezmlm-browse 0.20.