Administrator
|
You need to understand what a mnemonic is.
It is nothing more than a string of letters that is defined to stand for something.
The authors CHOSE to define the two-character string of letters "DM" as meaning that the output of the ALU should be written to both the D register and RAM[A]. The could have chosen ANY string to use for this purpose, include "LEON". That would NOT mean that "NOEL" would have any similar meaning just because it happens to be "LEON" spelled backwards.
It's the same reason that you can't replace the keyword "for" in a C program with "repeat" or "loop" or even "FOR" just because you, as a human, are able to infer that they mean the same thing. The language definition defines the three-letter sequence 'f'-'o'-'r' as meaning something specific and if you use any other sequence of letters the compiler has no idea that you meant a particular loop construct.
If the writer of the assembler WANTS to define another, different, mnemonic "MD" that happens to have the same meaning, they are completely free to do so. But the only destination mnemonics they are required to support are the seven listed in Figure 4.4 in the text.
While it might seem like supporting all of the permutations of each destination mnemonic is a good idea, it really isn't. If your assembler supports ADM, MAD, MDA, DMA, and DAM in addition to AMD then it fosters people writing assembly code to be sloppy about adhering to the official language definition. That's fine as long as their code is ONLY ever assembled on YOUR assembler. But as soon as they go to assemble it on someone else's perfectly valid assembler, now they have a bunch of errors.
|