News for hackers. Stuff that matters.
Re:ARM Assembly Is Too High Level: ROR and RRX by ajross on Wednesday September 26, 2018 @09:32AM (#18075712)
The BCD instructions aren't "too high level", these are[1] real hardware operations that had real utility to real problems. In the late 70's, the modular math required to format decimal numbers for display could be a big chunk of your ROM budget, and these instructions eliminated the problem.

This is like saying SSE is "too high level" because you could just do all the operations independently with scalar math.

[1] Were, anyway. They're surely microcoded on modern processors.

Re:ARM Assembly Is Too High Level: ROR and RRX by XlogicX on Wednesday September 26, 2018 @11:51AM (#18077162)
I have no objection to the utility of something like AAD. What I'm saying is that this same very instruction can do more at a machine level. AAD assembles to D5 0A, even though D5 is the part that refers to AAD, 0A is hardcoded for base 10. One could machine code something like D5 08 (to have base 8 conversions). You can really do just about any base. Even the Intel manual states you can do this, you just have to do it at the machine code level, you can't do it with the assembly level instruction of AAD (it's too high level or abstracted). This is all I meant by my comment.
Re:ARM Assembly Is Too High Level: ROR and RRX by amluto on Wednesday September 26, 2018 @10:59AM (#18076606)
XlogicX wasn’t complaining about the existence of the AAD and AAM instructions. He was complaining that they had useful variants that couldn’t be expressed in assembly.

edit: See http://www.rcollins.org/secrets/opcodes/AAD.html