From: "Andrew Crabtree" Newsgroups: comp.os.msdos.djgpp Subject: Re: Problems with inline asm!? Date: Wed, 4 Mar 1998 09:08:53 -0800 Organization: Hewlett Packard Lines: 20 Message-ID: <6dk1qv$576$1@rosenews.rose.hp.com> References: NNTP-Posting-Host: ros51675cra.rose.hp.com Mime-Version: 1.0 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: 7bit To: djgpp AT delorie DOT com DJ-Gateway: from newsgroup comp.os.msdos.djgpp Precedence: bulk CD (CeDric) wrote in message ... > asm("lea ax,[eax+eax*4]"); > asm("move [es:di],al"); Here are some tips. Full documentation is available, check the faq for details 1) Instructions must have a size suffix 2) Operands go src, dst instead of dst,src 3) Memory references are 'disp (base,index,scale)' 4) Registers must be preceded with a % (must use 2 %s to escape properly in inline) 5) Immediates must be preceded with a $ Example (untested) movl $5, 20(%eax,%esi,2)