view tangotests/asm4.d @ 291:068cb3c60afb trunk

[svn r312] Changed assert codegen to insert an unreachable terminator after the call to the assert function, which currently calls abort(). Changed array comparison runtime support to pass the array typeinfo instead of the element typeinfo. This allows a cleaner and faster implementation.
author lindquist
date Sat, 21 Jun 2008 21:16:26 +0200
parents 79d8f6b3fbaf
children
line wrap: on
line source

module tangotests.asm4;

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

void main()
{
    char* fmt = "yay!\n";
    asm
    {
        jmp L2;
    L1:;
        jmp L3;
    L2:;
        jmp L1;
    L3:;
        push fmt;
        call printf;
        pop EAX;
    }
}