??? 04/06/07 23:35 Read: times |
#136776 - nobody disputes the definition of mnemonic Responding to: ???'s previous message |
Andy Neil said:
In my class, the "mnemonic" referred specifically to the instruction mnemonic - MOV, CLR, etc... The distinction is between instruction and opcode. Do they even teach assembly language in today's college courses? The reference to mnemonic was because everything in assembly language is in mnemonic form. Mnemonic is a term that implies a usage that is easier to remember than what it represents. It also, by implication, is used for things that can't easily be expressed. You can't type a binary, or a HEX, or an octal value. As near as you can get to that is one of the common forms of ASCII-represented binary, octal, or hex. As I wrote before, the purpose of the assembler is to provide a way for you, the programmer, to express what you want the object processor to do in a way in which you can express, and remember, it. You can easily express and remember text. I doubt you know many people who actually think in binary, octal, or hex. Some folks can do decimal arithmetic in their heads. A few can do it in hex and binary, though I doubt many, aside, perahps, from a few savants, can actually manipulate numbers longer than 16 bits mentally in HEX or binary. When you define an object, for example, the SBUF, rather than referring to it by means of its absolute address, which, eventually, you may also learn to recall, you're using a mnemonic. Though the definition of mnemonic is a memory aid, using the mnemonic actually saves you from having to memorize it. As for the distinction between opcode and instruciton, many instructions contain the mnemonic, MOV. The opcode, however, is derived from the entire instruction, which consists of several components. If we weren't so "approximate" in our expression of what we're saying, there'd be a lot less confusion. I noted that someone in another post referred to what goes in the leftmost field of the instruction line, as a command. Actually it is what we once called a pseudo-op. That's similar to a compiler directive, commonly preceded by a '#' in 'C'. Some assemblers assume a pseudo-op to be a label unless preceded by a '.' while others don't. In any case, labels are, in fact, pseudo-op's, as they direct the assembler to interpret the mnemonic in that first field to be a symbolic representation of the current program counter. RE |