Author: Bruce Moreland
Date: 18:08:22 01/23/99
Go up one level in this thread
On January 23, 1999 at 16:30:24, James Robertson wrote:
>In my prog I have written:
>
>void Func(int **i) {
> __asm {
> mov eax,i
> mov ebx,[eax]
> }
>}
>
>I am hoping there is some assembler instruction that combines both operations
>into one.
>
>Later on in the function I have:
>
>void Func(int **i){
> __asm {
> mov eax,i
> mov ebx,something_useful
> mov [eax],ebx
> }
>}
>
>Is there any way to shorten this? Mr. Nalimov mentioned that Intel has a file
>somewhere with all the assembler instuctions explianed, but I downloaded it in
>Acrobat format, and I am too lazy to download Acrobat. Figured it would probably
>be a little easier to post here. :)
>
>James
If there is an instruction that lets you load a register and indirect, it is
news to me.
One way to learn how to do assembler is to watch what the compiler does. You
can do this by looking at the assembly listings (-Fa or -Fc with the Microsoft
compiler).
I recommend also that if you convert a routine from C to assembly, that you keep
the C routine around and compare to see which is faster. If you can't tell
which one is faster, I recommend keeping the C routine and discarding the
assembler.
bruce
This page took 0 seconds to execute
Last modified: Thu, 15 Apr 21 08:11:13 -0700
Current Computer Chess Club Forums at Talkchess. This site by Sean Mintz.