On Thu, Dec 2, 2021 at 6:45 PM Douglas McIlroy
<[email protected]> wrote:
>
> define(bump,`define(`$1',incr($1))')dnl
> define(counter,0)dnl
> counter
> bump(`counter')counter
> bump(`counter')counter
Thanks Douglas, your solution works great. In the context of the
Assembly macros I mentioned in an
earlier message I'd add something like this to your code:
define(`mymacro',
`Lbump(`counter')counter
mvi a, $1')
mymacro(`3')
But the output is not what I'd expect:
0
1
2
[blank lines]
Lbump(counter)2:
mvi a, 3
Instead I need:
L2:
mvi a, 3
Paolo