🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: borland.public.cppbuilder.language.basm
Article #20

Re: ASM conversion from Delphi to C++Builder

#20
From: Malcolm Smith
Date: Sun, 22 Jul 2007 00:50
45 lines
2327 bytes
Are there any good sites you can recommend for beginners (for C++). 
Everything I've come across is Delphi related and mostly samples rather than 
explanations.  I did find one series of BASM for beginners, but again it is 
Delphi related.

-- 
Malcolm Smith


"Bob Gonder" <notbg@notmindspring.invalid> wrote in message 
news:ma44a351l70894pknjbs3bgrgqpk0kacvl@4ax.com...
> 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: <46a2e43a@newsgroups.borland.com>
Path: arc1-ca.pugleaf.net!g2news1.google.com!news1.google.com!news.glorb.com!newsfeeds.ihug.co.nz!ihug.co.nz!newsgroups.borland.com!not-for-mail
References: <46a047d3$1@newsgroups.borland.com> <46a0dcbb$1@newsgroups.borland.com> <46a1ef22@newsgroups.borland.com> <ma44a351l70894pknjbs3bgrgqpk0kacvl@4ax.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
Reply-To: "Malcolm Smith" <mjfreelancing@optusnet.com.au>
From: "Malcolm Smith" <mjfreelancing@optusnet.com.au>
Newsgroups: borland.public.cppbuilder.language.basm
References: <46a047d3$1@newsgroups.borland.com> <46a0dcbb$1@newsgroups.borland.com> <46a1ef22@newsgroups.borland.com> <ma44a351l70894pknjbs3bgrgqpk0kacvl@4ax.com>
Subject: Re: ASM conversion from Delphi to C++Builder
Date: Sun, 22 Jul 2007 10:50:32 +1000
Lines: 47
Organization: MJ Freelancing
X-Priority: 3
X-MSMail-Priority: Normal
X-Newsreader: Microsoft Outlook Express 6.00.2900.3138
X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2900.3138
X-RFC2646: Format=Flowed; Original
NNTP-Posting-Host: 58.107.74.229
Message-ID: <46a2e43a@newsgroups.borland.com>
X-Trace: newsgroups.borland.com 1185080378 58.107.74.229 (21 Jul 2007 21:59:38 -0700)
Path: arc1-ca.pugleaf.net!g2news1.google.com!news1.google.com!news.glorb.com!newsfeeds.ihug.co.nz!ihug.co.nz!newsgroups.borland.com!not-for-mail