annotate 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
rev   line source
lindquist@221 1 module tangotests.asm2;
lindquist@221 2
lindquist@221 3 extern(C) int printf(char*, ...);
lindquist@221 4
lindquist@221 5 int main()
lindquist@221 6 {
lindquist@221 7 int i = 40;
lindquist@225 8 int j = 2;
lindquist@221 9 asm
lindquist@221 10 {
lindquist@221 11 mov EAX, i;
lindquist@225 12 mov EBX, j;
lindquist@225 13 add EAX, EBX;
lindquist@221 14 mov i, EAX;
lindquist@221 15 }
lindquist@221 16 printf("42 = %d\n", i);
lindquist@221 17 assert(i == 42);
lindquist@221 18 return 0;
lindquist@221 19 }