No exact or substring matches. trying for part
'MPASM bugs with #define'
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)
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)
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,
More... (looser matching)
- Last day of these posts
- In 1995
, 1996 only
- New search...