Mail Archives: djgpp/1998/01/26/01:22:33
At 09:38 1/25/1998 GMT, Rikard Björklind wrote:
>Hi I'm trying to make a little proggy in DJGPP, and I'm learning this
>AT&T syntax... now the stuff doesn't work!! I think it should be easy
>for you to see what I', doing wrong, the source is below..
>The compile error is on the clobbering list, about 20 messages about
>some numbers after the '%'.
>If you know what's wrong, please help me... =)
In each place you refer to a register by name, you must precede it with two
`%' signs to keep the compiler from confusing it with the asm operands of
the form `%0'. I.e. the first line would look like:
"movb $0,%%ah"
The GCC info page on Extended Asm does mention this.
(Incidentally, "xorb %%ah,%%ah" is smaller and possibly faster, I think.)
Nate Eldredge
eldredge AT ap DOT net
- Raw text -