Article View: borland.public.cppbuilder.language.basm
Article #18Re: ASM conversion from Delphi to C++Builder
From: Bob Gonder
Date: Sat, 21 Jul 2007 16:58
Date: Sat, 21 Jul 2007 16:58
29 lines
1859 bytes
1859 bytes
Malcolm Smith wrote:
>Your translations is what I had, but it always failed to compile, like this:
>
>void __fastcall TForm1::Button1Click(TObject *Sender)
>{
>TRegisters Registers;
> MOV EDI, Registers
EDI now contains garbage because you loaded it from Registers.
You wanted to +point+ it to Registers.
Either mov edi, offset Registers
or lea edi, Registers
Whereas in the GetCPUID code, Registers is an alias for ECX
so
> MOV EDI, Registers
is really
> MOV EDI, ECX
which is fine.
>and why do I need to pass the DWORD Param (it would not compile without it).
Likely because that is the signature you have for it elsewhere?
Or because it is a class member (remember +this+)
You might also like to look at the code here
http://www.buraks.com/p3uns/
Technical Details
Message-ID:
<ma44a351l70894pknjbs3bgrgqpk0kacvl@4ax.com>Path:
arc1-ca.pugleaf.net!g2news1.google.com!news4.google.com!proxad.net!feeder1-2.proxad.net!62.111.101.3.MISMATCH!news.germany.com!newsfeed01.sul.t-online.de!t-online.de!newsgroups.borland.com!not-for-mailReferences:
<46a047d3$1@newsgroups.borland.com> <46a0dcbb$1@newsgroups.borland.com> <46a1ef22@newsgroups.borland.com>Show Full Headers
Complete Article Headers
X-Google-Thread: 107b11,b95ef5f9173e844a X-Google-Attributes: gid107b11,public,usenet X-Google-Language: ENGLISH,ASCII-7-bit From: Bob Gonder <notbg@notmindspring.invalid> Newsgroups: borland.public.cppbuilder.language.basm Subject: Re: ASM conversion from Delphi to C++Builder Date: Sat, 21 Jul 2007 09:58:34 -0700 Organization: MindSpring Enterprises, Inc. Reply-To: notbg@notmindspring.invalid Message-ID: <ma44a351l70894pknjbs3bgrgqpk0kacvl@4ax.com> References: <46a047d3$1@newsgroups.borland.com> <46a0dcbb$1@newsgroups.borland.com> <46a1ef22@newsgroups.borland.com> X-Newsreader: Forte Agent 1.93/32.576 English (American) MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit NNTP-Posting-Host: 69.69.85.190 X-Trace: newsgroups.borland.com 1185037111 69.69.85.190 (21 Jul 2007 09:58:31 -0700) Lines: 32 Path: arc1-ca.pugleaf.net!g2news1.google.com!news4.google.com!proxad.net!feeder1-2.proxad.net!62.111.101.3.MISMATCH!news.germany.com!newsfeed01.sul.t-online.de!t-online.de!newsgroups.borland.com!not-for-mail