Mail Archives: cygwin/1998/01/25/00:57:21
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".
- Raw text -