Xref: news2.mv.net comp.os.msdos.djgpp:2091 From: korpela AT islay DOT ssl DOT berkeley DOT edu (Eric J. Korpela) Newsgroups: comp.os.msdos.djgpp Subject: Re: Is this ASM ok? Date: 22 Mar 1996 18:41:13 GMT Organization: Cal Berkeley-- Space Sciences Lab Lines: 26 Message-ID: <4ius89$76n@agate.berkeley.edu> References: <3150B8B2 DOT 8B2 AT jeffnet DOT org> <4ishog$obf AT mack DOT rt66 DOT com> NNTP-Posting-Host: islay.ssl.berkeley.edu To: djgpp AT delorie DOT com DJ-Gateway: from newsgroup comp.os.msdos.djgpp In article <4ishog$obf AT mack DOT rt66 DOT com>, Brennan "Mr. Wacko" Underwood wrote: >asm( > "loopf:\n\t" > "movb %%dh, (%%edi)\n\t" /* write integer portion of color - U1 */ > "addl %%ebx, %%edx\n\t" /* Add colstep to col - V1 */ > "incl %%edi\n\t" /* increment edi - U2 */ > "decl %ecx\n\t" /* decrement count - V2 */ > "jnz loopf" /* If ecx not zero goto loop - U3 */ > : : "D" (tscreen), "d" (tcol1), "b" (tcolstep), "c" (tlength)/*loaded regs*/ > : "%edi", "%ebx", "%ecx", "%edx"); /* clobbered regs */ I think there is a problem with your clobbered register list. Because you have already specified the loaded registers gcc already knows that these registers will be modified. Ordinarily I wouldn't think that would be a problem, but the GCC info pages state that "The input operands are guaranteed not to use any of the clobbered registers." There's clearly a contradiction here, and I would hope GCC flags this as an error, or at least gives a warning. Eric -- Eric Korpela | An object at rest can never be korpela AT ssl DOT berkeley DOT edu | stopped. Click here for more info.