Re:What was the original reason for the design of AT&T assem...
by eru on Sunday February 14, 2021 @02:25AM
(#26130373)
Mathematical formulas, especially definitions, are often written like E = m * c^2 or pV = n k * T or F = m * a. Ie the simpler stuff often goes to the left.
So that tradition might have been where most programming languages picked the convention up from?
Re:What was the original reason for the design of AT&T assem...
by mhh__ on Sunday February 14, 2021 @05:08AM
(#26131026)
lowercase n should be nRT under modern conventions, to be pedantic (else you're off by a factor of N_a)
Re:What was the original reason for the design of AT&T assem...
by eru on Tuesday February 16, 2021 @09:03AM
(#26153923)
Yes. Though ideally, we would redefine temperature units so we could get rid of R and Avogadro's constant in that formula.
Ie so that it becomes T := N / (p * V) where N is measured in number of molecules, not in number of moles.
So we'd measure temperature in Joule (or electron-volt) per degree of freedom.
What I don’t like about Intel’s syntax is that the normal phrase is ‘move A to B’, but ‘mov A, B’ moves what’s in B to A.
(The reason I don’t like it may be because the first CPU I programmed was a 6502, which had separate load and store instructions. Unfortunately, that doesn’t work well with memory-to-memory (which the 6502 doesn’t have) or register to-register (for which the 6502 used a T for ‘transfer’, as in TXA for ‘copy X register into Accumulator) instructions)