Mercurial > projects > ldc
diff 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 diff
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/tangotests/asm2.d Fri Jun 06 20:51:43 2008 +0200 @@ -0,0 +1,17 @@ +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; +}