From: pfay AT acl DOT lanl DOT gov (Patrick J. Fay) Subject: Re: asm assembly syntax 25 Jan 1998 00:57:21 -0800 Message-ID: Reply-To: "Patrick J. Fay" Mime-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII To: edwede AT stl082 DOT magnetek DOT com Cc: gnu-win32 AT cygnus DOT com Hello Ed, You wrote: > the visual C++ syntax is__asm { > lea eax,[edx]GLcontext.Current.ByteColor[0] > } > the gnu would be > __asm__ (" lea eax??????? "); I don't think you can put a variable name like that into gnu asm. You need a regular address, not a variable name. (I hope I'm wrong.) The gnu lea syntax is: leal $0x0(%edx),%eax #where edx is the address that '[edx]GLcontext.Current.ByteColor[0]' resolves to. Note that gnu asm reverses the order of operands. One way to learn gnu asm is to take a C subroutine that does something close to what you want, compile it, and then do: objdump -d --line-numbers --source mysub.obj (or mysub.o) If you are working with masm, you can compile the masm routine with ml /c /coff /Zi /Zd tst.c then: objdump -d --line-numbers --source tst.obj will show you the original masm lines along with the gnu assembler equivalent. Pat Patrick Fay, Ph.D., Intel Corp. email: pfay AT co DOT intel DOT com Los Alamos National Lab wk: (505) 665-9141 CTI M.S. B296 fax: (505) 667-5921 Los Alamos NM 87545 ASCI-RED http://www.acl.lanl.gov/~pfay/teraflop - For help on using this list (especially unsubscribing), send a message to "gnu-win32-request AT cygnus DOT com" with one line of text: "help".