Assembly - Mnemonic (instruction class)

1 - About

A mnemonic is a name that groups different opcode that have the same purpose.

Precisely, a mnemonic is a reserved name for a class of instruction opcodes which have the same function.

3 - Example

Below is the jmp (jump) mnemonic of the Intel CPU where each row corresponds to an instruction.

The two letters in the first column are the opcode. You can see that for each row, they are all different but they are implementing the same function, a jump to another location.

More instruction jmp example

4 - Type

4.1 - Extended

Extended mnemonics specify a combination of:

  • an opcode
  • with a specific operand

E.g. from the System/360 assemblers :

  • B = BC with a mask of 15
  • NOP (“NO OPeration” – do nothing for one step) = BC with a mask of 0.

4.2 - Pseudo

5 - Management

5.1 - List

The mnemonic are given in the isa documentation reference and are a part of the instruction documentation.

See instruction list

6 - Example

6.1 - Inc

  • Increment the memory variable COUNT

INC COUNT

6.2 - Mov

  • Transfer the value 48 in the memory variable TOTAL

MOV TOTAL, 48    

  • Transfer the value 10 to the AL register

MOV AL, 10       

6.3 - Add

  • Add the content of the BH register into the AH register

ADD AH, BH

  • Add 10 to the variable MARKS

ADD MARKS, 10  

6.4 - And

  • Perform AND operation on the variable MASK1 and 128

AND MASK1, 128


Data Science
Data Analysis
Statistics
Data Science
Linear Algebra Mathematics
Trigonometry

Powered by ComboStrap