From: radon AT swipnet DOT se (Rikard Björklind) Newsgroups: comp.os.msdos.djgpp Subject: asm code Date: Sun, 25 Jan 1998 09:38:55 GMT Organization: A customer of Tele2 Lines: 52 Message-ID: <34cb0769.598790@nntpserver.swip.net> NNTP-Posting-Host: nn1.swip.net Cache-Post-Path: nn1!s-298159 AT dialup178-4-2 DOT swipnet DOT se To: djgpp AT delorie DOT com DJ-Gateway: from newsgroup comp.os.msdos.djgpp Precedence: bulk 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... =) -------------------------- #include unsigned char dbuffer[64000]; void smooth(unsigned char *bitmap) { //"smoothl:\n\t" asm( "movb $0,%ah\n\t" "movb -321(%edi),%al\n\t" "addb -320(%edi),%al\n\t" "adcb 0,%ah\n\t" "addb -319(%edi),%al\n\t" "adcb 0,%ah\n\t" "addb -1(%edi),%al\n\t" "adcb 0,%ah\n\t" "addb 1(%edi),%al\n\t" "adcb 0,%ah\n\t" "addb 319(%edi),%al\n\t" "adcb 0,%ah\n\t" "addb 320(%edi),%al\n\t" "adcb 0,%ah\n\t" "addb 321(%edi),%al\n\t" "adcb 0,%ah\n\t" "shr %eax,3\n\t" "movb (%edi),al\n\t" "inc %edi\n\t" "dec %ecx\n\t" "jnz smoothl\n\t" : : "c"(63360), "a" (0), "D" (bitmap+320) : "%eax", "%ebx", "%ecx", "%edx", "%edi"); } int main() { smooth(&dbuffer); return 0; } -------------------------------------------