# How is "load, R3, 7" a mnemonic?

4 messages
Open this post in threaded view
|

## How is "load, R3, 7" a mnemonic?

 This post was updated on . 6.1 Background "Clearly, specifying these operations in binary code is a pain. A natural solution is using an agreed-upon equivalent symbolic syntax, say, “load R3,7”. The load operation code is sometimes called a mnemonic, which in Latin means a pattern of letters designed to help with remembering something." Examples of popular mnemonics that come to mind: Kingdom, Phylum, Class, Order, Family, Genus, Species. King Phillip Cried Out “For Goodness Sakes!” There's also using knuckles of both hands to help remember which months have 31 days and which ones have 28 or 30 days. What is the pattern of letters "load, R3, 7" to help us remember? The binary code? I doubt that. I can see that "load, R3, 7" is symbolic, but I can't see how it is mnemonic.
Open this post in threaded view
|

## Re: How is "load, R3, 7" a mnemonic?

 The mnemonic referred to in the quoted passage is "load", not the full assembly language statement "load R3, 7". The mnemonic "load" is a short string of letters used here to recall a larger idea, just as the quote suggests.  The idea usually being expressed is "get a value from one place and copy it into another place."  In most cases it also implies that the value in the source location remains unchanged and any value currently in the destination location is overwritten with the copied value.  That's a lot of information contained in only four letters. As you suggest, this does seem like a kind of code, but in the context of assembly language programming, the word "mnemonic" is a term of art and always refers to a short string which represents a specific machine instruction operation code (opcode).  As the authors point out, this is much more compact and easier to understand than using a full description of the operation or its binary (or hexadecimal) representation.