nasm is an assembler though, not a ‘languages’, that only supports x86/x64. gas for example supports a wide range of architectures so you can write risc-v, arm, x64, etc.
That’s like saying “clang is a compiler though, not a language”. It’s correct but completely beside the point. Unless you’re writing a compiler, “cross platform assembler” is kind of an insane thing to ask for. If want to learn low level programming, pick a platform. If you are trying to write a cross-platform program in assembly, WHY!? Unless you’re writing a compiler. But even then, in this day and age using a cross-platform assembler is still kind of an insane way to approach that problem; take a lesson from decades of progress and do what LLVM did: use an intermediate representation.
Are you arguing that assembly languages are not architecture-specific? I don’t think that’s the typical definition.
Nasm is an assembler, but it also represents a specific assembly language targeting x86 architectures.
Gas is an assembler of a higher order. It can emit code for many architectures, and thus it accepts many different architecture-specific assembly languages.
Assembly languages are always architecture specific. Thats kind of their defining feature. Assembly is readable machine code.
nasm
is an assembler though, not a ‘languages’, that only supportsx86/x64
.gas
for example supports a wide range of architectures so you can writerisc-v
,arm
,x64
, etc.That’s like saying “clang is a compiler though, not a language”. It’s correct but completely beside the point. Unless you’re writing a compiler, “cross platform assembler” is kind of an insane thing to ask for. If want to learn low level programming, pick a platform. If you are trying to write a cross-platform program in assembly, WHY!? Unless you’re writing a compiler. But even then, in this day and age using a cross-platform assembler is still kind of an insane way to approach that problem; take a lesson from decades of progress and do what LLVM did: use an intermediate representation.
Are you arguing that assembly languages are not architecture-specific? I don’t think that’s the typical definition.
Nasm is an assembler, but it also represents a specific assembly language targeting x86 architectures.
Gas is an assembler of a higher order. It can emit code for many architectures, and thus it accepts many different architecture-specific assembly languages.