News for hackers. Stuff that matters.
Re:NASM Assembly Language Tutorials by rackjack on Monday January 03, 2022 @04:53PM (#29787492)
Are there any "major" assembly languages, or are they just used as needed for the platform?
Re:NASM Assembly Language Tutorials by erosenbe0 on Monday January 03, 2022 @06:05PM (#29788354)
A family is typically called an "Instruction Set Architecture"

Main ones in development today would be:

x86-64 / AMD64 / Intel Architecture - modern Intel and AMD processors

i386 / x86 / IA-32 - older 32-bit Intel still widely in use

aarch64 - 64-bit ARM in nearly all phones and new Macs

aarch32 / ARM32 - 32-bit ARM in majority of 32-bit microcontrollers and older phones

RISC-V comes in 32 and 64 bit as well and is popular with startups and education due to its relative lack of legal/IP encumbrances

6502 is a classic vintage processor used in original Apple, Nintendo, Commodore 64, and early radiation hardened medical devices. It is resurgent with vintage enthusiasts, tinkerers and YouTubers due to its noted cycle for cycle advantage over other early microprocessors.

IBM 360/370/390 and z-architecture is surely running banks somewhere but you won't find much on that on HN

Re:NASM Assembly Language Tutorials by chrisseaton on Monday January 03, 2022 @07:20PM (#29789100)
> Intel Architecture - modern Intel and AMD processors

Note that 64-bit 'Intel Architecture' isn't AMD64, it's Itanium.

But these aren't assembly languages anyway - they're instruction set architectures. Assembly languages include AT&T and Intel.

Re:NASM Assembly Language Tutorials by erosenbe0 on Tuesday January 04, 2022 @12:57AM (#29791878)
Agree. IA-64 or IA64 is the short form for Itanium not any form of x86.

Assembly languages: AT&T form starting on early Unix PDP/VAX systems and later SVR4 Unix as well as gas assemblers.

Intel form derived from 8080/5/6/8 and 8051 line as well as Zilog z80 line including assemblers such as Microsoft MASM.

IBM would have a couple assembler products for their mainframe lines likely supporting code written as far back as 1965.

Some obsoleted assemblies were a bit in-between as I recall Mac 68k assemblers being neither one nor the other.

Several embedded platforms have idiosyncratic assembly variants as well.

Re:NASM Assembly Language Tutorials by brandmeyer on Monday January 03, 2022 @10:22PM (#29790905)
It seems like every hardware vendor (and sometimes each compiler) provides its own syntax for assembly code. Leaving aside the obvious fact that each ISA has its own instructions, nearly everything else varies from one assembler to the next.

Are clobbered registers the left-most or right-most argument? How are comments expressed? Are operands separated by space alone or with commas? How are jump target labels expressed? How are addressing modes expressed? Go source diving in the FreeRTOS source code and you'll see that even when several different compilers support the same architecture (eg ARMv7-M), they will all have slightly incompatible assembly code syntax.

Re:NASM Assembly Language Tutorials by duped on Monday January 03, 2022 @10:44PM (#29791050)
Assembly languages aren't even defined for the platform, they're defined for the compilers (more technically, the assemblers). There aren't even standard assemblers, almost every compiler will roll their own (including VMs and JITs).

Intel vs AT&T syntax just standardize a few conventions, AT&T requiring more explicitness (and of course, flipping the position of source/destination operands).