No exact or substring matches. trying for part
PICList
Thread
'MPASM bugs with #define'
1995\06\22@005001
by
Greg Solberg
Hi,
I use Microchip's MPASM v1.10. Anyone else have problems with #define?
For instance, I compile the following code:
#define FOO(a) (a)
one equ FOO(1)
two equ FOO(1) + 1
three equ FOO(1) + FOO(1) + FOO(1)
four equ 2 + FOO(2)
end
And I get the following in the list file:
0001 #define FOO(a) (a)
0001 0002 one equ FOO(1)
0001 0003 two equ FOO(1) + 1
0001 0004 three equ FOO(1) + FOO(1) + FOO(1)
0004 0005 four equ 2 + FOO(2)
0006 end
The values computed for labels "two" and "three" are wrong. The basic problem
seems to be with using a #define macro at the beginning of an expression.
Does anyone else have this problem? Does Microchip know about it? Anyone
have some nice work-around?
Thanks for your help,
Greg Solberg
spam_OUTgregTakeThisOuT
migsol.com
More... (looser matching)
- Last day of these posts
- In 1995
, 1996 only
- Today
- New search...