by kstenerud · 2y ago · 0 comments
This doesn't make any more convincing an argument than the "linguistic" and "consistency" arguments he shot down earlier.
Why should putting the mutated argument first emphasize it any more than putting it second? If you order things the same way every time, people will implicitly know which one is the mutated argument because that's how the language is structured.
There really is no strong benefit to either ordering, other than that [src, dst] is closer to human language (which is a minor benefit at best and not worth fighting over).
"Compare A and B and do X if result is 'less than'" should never mean "do X if B is less than A".
Anyway, the most important consideration for me is that standard documentation uses Intel operand order. Intel's manuals are hard enough to read, I wouldn't want to additionally permute operands in my head.
My only point is that argument ordering is not something to worry about, and every argument I've heard one way or the other has been weak at best.
The argument above applies neatly to assembly instructions, which generally change one thing.
In English, but not Telugu.
Personally I think assembly should just have a little more syntax. If we wrote
dst = mv src
or dst <- add src
it would just be obvious.This really is where AT&T fell over: Their syntax evolution feels bolted on for the most part, and not well thought out. The result can be quite confusing in a lot of cases.
Remember that when the 8080 engineers left to found Zilog, they changed the MVI instruction to LD, as it had been intended.
(LD on 4004 and 8008, MOV on 8080, LD/ST and MOV on 8085, MOV on 8086)
Z80 is also highly unorthogonal (even more so than x86), but obscures this by using the same mnemonic with different operand combinations, not all of which are legal and some require prefix bytes.