Go compiler moving from C to Go
ponce
contact at g3mesfrommars.fr
Sat Dec 21 11:57:58 PST 2013
>
> Personally I rather use powerful external macro assemblers like
> NASM/MASM than inline assemblers, as I mentioned a few times
> here.
>
> Specially since most inline assemblers I used tend to be rather
> limited in comparison.
Actually DMD might be the most powerful macro assembler out there:
import std.stdio;
import std.conv;
int test(int Result)()
{
asm { naked; }
mixin(r"
asm
{
mov EAX, " ~ to!string(Result) ~ r";
ret;
}"
);
}
void main()
{
writefln("%s", test!4());
writefln("%s", test!5());
}
More information about the Digitalmars-d
mailing list