view tangotests/asm2.d @ 221:68687d8c3e9a trunk

[svn r237] some inline asm output now seems to work, see tangotests/asm2.d
author lindquist
date Fri, 06 Jun 2008 20:51:43 +0200
parents
children 74701ba40398
line wrap: on
line source

module tangotests.asm2;

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

int main()
{
    int i = 40;
    asm
    {
        mov EAX, i;
        add EAX, 2;
        mov i, EAX;
    }
    printf("42 = %d\n", i);
    assert(i == 42);
    return 0;
}