mirror of
https://github.com/xomboverlord/ldc.git
synced 2026-01-14 03:43:13 +01:00
22 lines
324 B
D
22 lines
324 B
D
module tangotests.asm1_1;
|
|
|
|
extern(C) int printf(char*, ...);
|
|
|
|
int main()
|
|
{
|
|
int i = 12;
|
|
int* ip = &i;
|
|
printf("%d\n", i);
|
|
asm
|
|
{
|
|
mov EBX, ip;
|
|
mov EAX, [EBX];
|
|
add EAX, 8;
|
|
mul EAX, EAX;
|
|
mov [EBX], EAX;
|
|
}
|
|
printf("%d\n", i);
|
|
assert(i == 400);
|
|
return 0;
|
|
}
|