3 ms·
Now I'm curious - what other syntaxes are there?
by Cockbrand 1y ago
Now I'm curious - what other syntaxes are there?
- jabr 1y agoAT&T * https://imada.sdu.dk/u/kslarsen/dm546/Material/IntelnATT.htm https://imada.sdu.dk/u/kslarsen/dm546/Material/IntelnATT.htm * https://en.wikipedia.org/wiki/X86_assembly_language https://en.wikipedia.org/wiki/X86_assembly_language
- pjmlp 1y agoThe other one, is a clunky one from UNIX world point of view on x86 CPUs, follow the links on the sibling comment. Rather clunky and most UNIX Assemblers were never as powerfull as other systems macro assemblers, since after UNIX System V, it was there only as an additional external tool pass for the C compilation steps, and even before that, the assembler was quite minimalist. Then there is the whole brain twist of being used to op dest, src, and having to switch into op src, dest. I prefer the Intel approach as it is more similar to dest = src, rather than src -> dest. Intel's approach is also more common across various assembly languages.
- ykonstant 1y agoI think the schizophrenic notation 12(%ebp) is much worse than the dest/src switch.
- pjmlp 1y agoYes, that is the cherry on top, maybe.
- derdi 1y agodest/src order is not a big deal in absolute terms: The ISA designer picks an order, documents it, everyone follows their documentation, done. Intel picks one order for programming Intel, DEC picks another order for programming the VAX? Great, just look in the instruction set manual and you're set. The silly thing is importing one order to another architecture that uses the opposite order. Now your users have to transpose operands for no reason. The really silly thing is messing up the operand order of the cmp instruction in the process. The VAX assembly language had a compare with the sane operand order, BTW.