Hello World in D using Assembly

IchorDev zxinsworld at gmail.com
Sat Dec 28 11:44:16 UTC 2024


On Friday, 27 December 2024 at 20:08:08 UTC, Renato Athaydes 
wrote:
> Anyway, I thought this was cool and as I couldn't find anything 
> much about ASM in D, I thought this may be useful to others.

The reason is probably that D's regular inline assembly isn't 
very desirable. It only supports x86 and x86-64, and offers less 
fine-grained control than the alternative ['extended' assembly 
syntax](https://dlang.org/spec/iasm.html#gcc) (which is very 
similar to `gcc`'s inline assembler) offered by GDC and LDC2. 
Additionally, I think many programmers who choose D are sick of 
writing platform-specific code and just want their code to work 
everywhere without bugs hidden behind `version` statements. If 
inline assembly in D was popular then the original syntax 
would've probably been extended to work with other processors.


More information about the Digitalmars-d-learn mailing list