Live data from Hacker News

No one should use the AT&T syntax (2021)

outerproduct.net

111–112 of 112 posts

Re: No one should use the AT&T syntax (2021)

#111
post #94

Earlier quoted context omitted.

I learned ibm 370 assembly first, PDP-11 assembly second, then I think Z80. I found them to be very regular and understandable. So when I encountered intel chips and their assembly syntax, I disliked them. So about that time I switched to higher level languages. Are there still chips left have a nice orthogonal assembly language? I vaguely recall 68k being orthogonal too.

Sorry, but Z80 being "regular and understandable"? ADD A,B ;8 bit add, B to A ADD HL,BC ;16 bit add, BC to HL ADD B,A ;invalid! destination can only be A or HL ADC A,B ;add with carry SBC A,B ;subtract with carry SUB B ;subtract (A is implicit, same for AND,OR,XOR) LD A,(HL) ;load A from memory at HL LD B,(HL) ;load B from HL LD A,(DE) ;load A from DE LD B,(DE) ;invalid! must be reg=A or mem=(HL) LD A,(var) ;load A f…

I remember the Z80 in relation to the 8080. I might have misremembered but I thought Z80 allowed some combinations that 8080 could not do. It could also be that the assembler/syntax itself was nicer.

Re: No one should use the AT&T syntax (2021)

#112
post #6

Fun little thing: If you really want to confuse an LLM, try to make it reason about x86 assembler, and watch it trip all over operand order (along with many other things). I've had models assume different operand order in two different places in the same file. x86 assembler really is the gift that keeps on giving. Sadly it doesn't given you anything nice.

Honestly they don't do much better for Z80 or 6502 assembly from what I've seen either.

Any unstructured language seems to be a problem, but x86 just maximises the pitfalls...
Post reply on HN