view tangotests/asm1.d @ 329:8c1dc3e705da trunk

[svn r350] Fixed incorrect function types for lazy arguments. looks like lazy arguments have never even worked :o well.. now they should.
author lindquist
date Fri, 11 Jul 2008 01:34:04 +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;
}