Administrator
|
This is reflective of one of the issues that I pointed out with the first edition. The natural ordering of the bits in the instruction, listing them from msb to lsb, is ADM, but the language specification for the dest field has it as AMD. There's nothing that requires the ordering to be consistent, since one is a hardware coding issue and the other is a language syntax issue, but it would have eliminated a point of confusion and error had they been consistent. It's also the kind of thing that is easy to miss.
Then they did something that, while I understand the motivation, I don't think was the best thing from a pedagogical standpoint -- they wrote their tools so that the ordering didn't matter. That makes it easier to write Hack assembly programs and not get students frustrated by such fine points, but it hides the reality that the fine points matter. This comes back to bite students later when they write their assembler, because most of them write it expecting the order to be what the language specification states, and now the programs that they wrote that passed Chapter 4 won't assemble using their assembler. The conclusion most of them come to is that the problem is with their assembler and they sometimes spend a bunch of time trying to figure out what they did wrong when, in fact, their assembler is perfectly valid.
Accepting all of the possible orders also reinforces the incorrect assumption made my many students that the C-type instructions are expressions instead of mnemonics, so I believe that the official assembler should be strictly-compliant with the language specification to drive this point home.
In the second edition, they changed the language specification to be consistent with the hardware ordering, so it is now ADM. However, in doing so, code what was strictly compliant with the first edition is not strictly compliant with the second (and vice versa). So now they have to either add an option to the tools to let the user specify which language edition they are using, or they have to make the tools loosely-compliant. My preference would have been to have them be loosely-compliant by default, but to add menu options to make them strictly-compliant with the selected edition.
|