Inter-compiler portability of asm between gdc and ldc2 (and dmd)
Paulo Pinto
pjmlp at progtools.org
Sat Oct 3 14:21:25 UTC 2020
On Saturday, 3 October 2020 at 09:52:56 UTC, Ola Fosheim Grøstad
wrote:
> On Saturday, 3 October 2020 at 08:51:58 UTC, Paulo Pinto wrote:
>> It is also what I favour, the excuse those other compilers
>> vendor give is that the clunky syntax they use is easier to
>> integrate with the compiler backend for the optimiser's
>> understanding of what is going on.
>
> Huh? How come?
>
> I think the only reason for this is that AT&T engineers had a
> preference for PDP11 syntax which they were used to and that it
> therefore became the default syntax on Unix and thus become
> associated with C compilers...
The PC / Amiga way of
void myfunc (int data)
{
asm {
mov bx, data
int 21h
}
}
Versus the clunky way of
void myfunc (int data)
{
asm("weird Assembly pseudo syntax", data);
}
More information about the Digitalmars-d
mailing list