view tangotests/asm1.d @ 303:4aa2b6753059 trunk

[svn r324] Small indentation fixes. Added end of line to complex.cpp.
author ChristianK
date Wed, 25 Jun 2008 20:42:30 +0200
parents ccc2e6898a78
children
line wrap: on
line source

module tangotests.asm1;

extern(C) int printf(char*, ...);

int main()
{
    int i = 12;
    int* ip = &i;
    printf("%d\n", i);
    asm
    {
        mov EBX, ip;
        mov EAX, [EBX];
        add EAX, 8;
        mul EAX, EAX;
        mov [EBX], EAX;
    }
    printf("%d\n", i);
    assert(i == 400);
    return 0;
}