ASM access to array

Heinz malagana15 at yahoo.com
Tue Feb 1 08:07:26 PST 2011


Hi there,
Although i've been coding in D for the last 5 years, i've never got my hands
into ASM until now. I'm trying to use the inline assembler now and i'm trying
to apply opcodes to a class member, an uint array but don't know how. This is
what i've been trying to accomplish:

class MyClass
{
    private uint[] array;

    private void MyFunc()
    {
        asm
        {
            rol array[1], 8;
            rol array[2], 16
        }
    }
}

The above code complains about type/size. However, it seems to work with
single uint variables local to the function. I've tried moving the values to
EBX and ECX then applying rol to these registers. The code compile and run but
does nothing at all.
Any ideas or guide? A good doc about asm with D?
BIG THXS!!!


More information about the Digitalmars-d-learn mailing list