Mercurial > projects > ldc
comparison tests/mini/asm2.d @ 341:1bb99290e03a trunk
[svn r362] Started merging the old 'test' dir as well as the newer 'tangotests' dir into 'tests/mini' and 'tests/minicomplex'.
author | lindquist |
---|---|
date | Sun, 13 Jul 2008 02:51:19 +0200 |
parents | tangotests/asm2.d@74701ba40398 |
children | 4ac97ec7c18e |
comparison
equal
deleted
inserted
replaced
340:351c0077d0b3 | 341:1bb99290e03a |
---|---|
1 module tangotests.asm2; | |
2 | |
3 extern(C) int printf(char*, ...); | |
4 | |
5 int main() | |
6 { | |
7 int i = 40; | |
8 int j = 2; | |
9 asm | |
10 { | |
11 mov EAX, i; | |
12 mov EBX, j; | |
13 add EAX, EBX; | |
14 mov i, EAX; | |
15 } | |
16 printf("42 = %d\n", i); | |
17 assert(i == 42); | |
18 return 0; | |
19 } |