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


Previous by date: 8 Sep 2005 19:12:16 +0100 Re: [gnupic] More than one #v(expression) in a single line of a macro, Bill Freeman
Next by date: 8 Sep 2005 19:12:16 +0100 Re: [gnupic] More than one #v(expression) in a single line of a macro, Bill Freeman
Previous in thread: 8 Sep 2005 19:12:16 +0100 Re: [gnupic] More than one #v(expression) in a single line of a macro, Bill Freeman
Next in thread: 8 Sep 2005 19:12:16 +0100 Re: [gnupic] More than one #v(expression) in a single line of a macro, Bill Freeman

Subject: Re: [gnupic] More than one #v(expression) in a single line of a macro
From: Ben Dugan ####@####.####
Date: 8 Sep 2005 19:12:16 +0100
Message-Id: <43207EF7.3090905@curdes.com>

** Actually, I tried to send the file but it was bounced because it was
over 30,000 bytes. The file can be retrieved at the url below; its name
is ENGR2210.inc.


Bill,

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.

I'm attaching ** the file that started all this for me: its Brad Minch's
file of "structured macros" that are used in the pic18f2455 for usb
purposes. The total code for that is available at:

http://pe.ece.olin.edu/ece/projects.html

(I am working with the Lab 2 for 18f2455 one)

But the reason I'm attaching the macro file is that I think it'll
clarify why I'm not sure this will work.

I'm actively looking into this now, so I may be able to report more
later. I appreciate your suggestions, but don't jeopardize your "day
job" to keep providing me with excellent help!

Ben

PS I am attaching the DOS version of this file, but can send a slightly
hacked-up linux version if you prefer.

Bill Freeman wrote:
> Ben,
> 
> 	I find the (f)lex stuff especially scary.
> 
> 	But for your specific problem, would something like the
> following work?
> 
> ---------------------------------------------------------------
> 	list	p=16f877
> 	include "p16f877.inc"
> 
> inner	macro	a, b
> a#v(b)	set	0x45
> 	endm
> 
> outer	macro	a, b
> 	inner	label#v(a)_, b
> 	endm
> 
> inner2	macro	a
> a#v(j)	set	D'69'
> 	endm
> 
> outer2	macro
> 	inner2	label#v(i)_
> 	endm
> 
> 	outer	5, 6
> 
> i	set	3
> j	set	4
> 
> 	outer2
> 
> 	end
> ---------------------------------------------------------------
> 
> 	This assembles for me, and if I look near the end of the .lst
> file I see that both label3_5 and label5_6 have been defined properly.
> 
> 							Bill
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: ####@####.####
> For additional commands, e-mail: ####@####.####
> 
> 
> 



Previous by date: 8 Sep 2005 19:12:16 +0100 Re: [gnupic] More than one #v(expression) in a single line of a macro, Bill Freeman
Next by date: 8 Sep 2005 19:12:16 +0100 Re: [gnupic] More than one #v(expression) in a single line of a macro, Bill Freeman
Previous in thread: 8 Sep 2005 19:12:16 +0100 Re: [gnupic] More than one #v(expression) in a single line of a macro, Bill Freeman
Next in thread: 8 Sep 2005 19:12:16 +0100 Re: [gnupic] More than one #v(expression) in a single line of a macro, Bill Freeman


Powered by ezmlm-browse 0.20.