News:

MASM32 SDK Description, downloads and other helpful links
MASM32.com New Forum Link
masmforum WebSite

Simple MOV question ...

Started by James Ladd, October 12, 2006, 11:15:29 PM

Previous topic - Next topic

James Ladd

I have this code which takes the adress in a parameter and puts it in a register, so I can
then mov a value unto the memory addressed by that register.

       mov edx, [ebp +12]
       mov [edx], eax

Is it possible to just MOV more directly / cheaply ?
eg: mov [[ebp +12]], eax

Rgs, James.

mnemonic

Hi James,

this is not possible since that would be double dereferencing and that is just not possible with x86 hardware.

HTH
Be kind. Everyone you meet is fighting a hard battle.--Plato
-------
How To Ask Questions The Smart Way

Ratch

James Ladd,

     Cascaded indirect addressing is the purview of Big Iron (mainframes).  The one I worked with had an indirect address bit within its instructon format that caused the indirect operand counter to reference to the next operand any number of times, as long as the 'i- bit' was set at each address.  Not to stray off the topic, but it could also post increment its index register automatically, if another bit called the index bit was set in the instruction.  The computer word was 36-bits long, so it had room to hold all those goody bits that did those funky things.  Ratch