D言語のインラインアセンブラ
// asmtest.d import std.cstream; void main() { int result; asm { mov result, 110; add result, 40; } dout.writefln("%d", result); }
$ gdc asmtest.d $ ./a.out 150 $
// asmtest.d import std.cstream; void main() { int result; asm { mov result, 110; add result, 40; } dout.writefln("%d", result); }
$ gdc asmtest.d $ ./a.out 150 $