mirror of
https://github.com/xomboverlord/ldc.git
synced 2026-04-18 01:39:03 +02:00
[svn r362] Started merging the old 'test' dir as well as the newer 'tangotests' dir into 'tests/mini' and 'tests/minicomplex'.
This commit is contained in:
19
tests/mini/asm2.d
Normal file
19
tests/mini/asm2.d
Normal file
@@ -0,0 +1,19 @@
|
||||
module tangotests.asm2;
|
||||
|
||||
extern(C) int printf(char*, ...);
|
||||
|
||||
int main()
|
||||
{
|
||||
int i = 40;
|
||||
int j = 2;
|
||||
asm
|
||||
{
|
||||
mov EAX, i;
|
||||
mov EBX, j;
|
||||
add EAX, EBX;
|
||||
mov i, EAX;
|
||||
}
|
||||
printf("42 = %d\n", i);
|
||||
assert(i == 42);
|
||||
return 0;
|
||||
}
|
||||
Reference in New Issue
Block a user