Mail Archives: djgpp/2000/05/15/16:17:01
Well from the look of it you should have defined $2 somwhere before main
or in the braces. It does not know what $2 is nor do I. In any case
main should be type int not void. "int main()"
Regards Ian.
Alexandre Devaure wrote:
>
> Hi,
> I want to use .equ directive but I use it badly.
> Can you help me ?
> void main()
> {
> asm(".equ HELLO, $2\n\t"
> "movb HELLO,%ah");
> }
>
> bash-2.03$ gcc -g asm.c
> asm.c: In function `main':
> asm.c:12: warning: return type of `main' is not `int'
> /tmp/ccsR72r4.o: In function `main':
> /home/devaure/tst/asm.c:13: undefined reference to `$2'
> collect2: ld returned 1 exit status
>
> Why does it think $2 is a ref and not a number?
>
> Alex
- Raw text -