Mercurial > projects > ldc
view tangotests/asm2.d @ 222:251548c1035d trunk
[svn r238] use *m for memory input constraints and pass in their address
author | ChristianK |
---|---|
date | Fri, 06 Jun 2008 21:44:17 +0200 |
parents | 68687d8c3e9a |
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; }