Mail Archives: djgpp/1999/03/18/12:25:59
In article <7cq156$q5$2 AT news DOT luth DOT se>,
Martin Str|mberg <ams AT ludd DOT luth DOT se> wrote:
>Gisle Vanem (gvanem AT eunet DOT no) wrote:
>: ams AT ludd DOT luth DOT se (Martin Str|mberg) said:
>:
>: > How do I set or clear the carry flag? I _think_ "andl %%eax, %%eax"
>: > clears it (and "orl %%eax, %%eax" too).
>:
>: How about "setc" and "clc" ?
>
>Hmm. I get "operands given don't match any known 386 instruction".
>
>What is setc called in gas assembly?
>
>And yes, I _am_ an assembly neophyte.
Your were given a bad mnemonic: "setc" is actually "stc".
asm volatile("clc"); /* clears (sets to 0) the carry flag */
asm volatile("cmc"); /* complements (inverts) the carry flag */
asm volatile("stc"); /* sets (to 1) the carry flag */
- Raw text -