Hi I guess the thing that's throwing me here, is the use of [EAX].TSparseList Is it casting the register as a pointer to a TSparseList instance, in order to get the offset to the FList field? I'm wondering what the equivalent is in AT&T.
Todd. > Hi all > > >> The following code appears in Grids.pas >> >> { Jump to TSparsePointerArray.ForAll so that it looks like it >> was called >> from our caller, so that the BP trick works. } >> >> function TSparseList.ForAll(ApplyFunction: Pointer {TSPAApply}): >> Integer; assembler; >> asm >> MOV EAX,[EAX].TSparseList.FList >> JMP TSparsePointerArray.ForAll >> end; >> >> Does anyone know what the first line does? >> > It's using a BASM extension to calculate an offset per the > TSparseList.Flist member and deference and load EAX from there. So given > that EAX points to a TSparseList, afterwards EAX will point to the TList > instance via the FList member. > > >> More importantly, does anyone know how to convert the Intel >> style assembler code to AT&T? >> > It's a non-trival change. The parameter order to instructions is often > different and the sizing is all explicit. > > http://www.redhat.com/docs/manuals/enterprise/RHEL-3-Manual/gnu-assemble > r/i386-syntax.html > > Cheers, > Paul. > _______________________________________________ NZ Borland Developers Group - Delphi mailing list Post: delphi@delphi.org.nz Admin: http://delphi.org.nz/mailman/listinfo/delphi Unsubscribe: send an email to delphi-requ...@delphi.org.nz with Subject: unsubscribe