Instruction
is the command that executes at runtime. Assembly is a low-level language. There are many instructions for different purposes. Assembly language uses a mnemonic to represent each low-level machine instruction or opcode, typically also each architectural register, flag, etc. Many operations require one or more operands in order to form a complete instruction.an instruction have two parts
1.instruction
2.operands
3.comments(optional)
Instruction is a comment to perform specific tasking assembly for example if you want to move a value from register to variable you use MOV instruction which has specific binary value similarly every instruction in the assembly have specific binary value to tell the system about the task which has to be performed
Operands are the registers or variables on which the specific task have to be performed we can use 8-bit operands & 16-bit operands. 8 or 16-bit operands depend on the instruction you use.in assembly language, it is compulsory to use a register along with a variable. You can use two registers or a register and a variable but can’t use two variables at the same time.
Assembly has some instructions which only use one variable, for example, MUL instruction.in MUL instruction system multiplies the value of the particular variable with lower register(Al) in case of 8 bit and with register (A) in case of 16 bit. Similar is the case with Div. Here is the list of instruction which is used in assembly.
Comments are non-executable part in the assembly. We can write comments in front of every instruction with the help of semi-colon(;).it is most used to make your code more understandable.
Symbol | Description | Condition for Jumps |
JG/JNLE | Jump if greater than Jump if not less than or equal to | ZF = 0 and SF = OF |
JGE/JNL | Jump if greater than or equal to Jump if not less than | SF = OF |
JL/JNGE | Jump if less than Jump if not greater than or equal to | SF <> OF |
JLE/JNG | Jump if less than or equal to Jump if not greater than | ZF = 1 and SF <> OF |
Symbol | Description | Condition for Jumps |
JA/JNBE | Jump if above than Jump if not below than or equal to | ZF = 0 and CF = 0 |
JAE/JNB | Jump if above than or equal to Jump if not below than | CF = 0 |
JB/JNAE | Jump if below than Jump if not above than or equal to | CF = 1 |
JBE/JNA | Jump if below than or equal to Jump if not above than | ZF = 1 and CF = 1 |
Symbol | Description | Condition for Jumps |
JE/JZ | Jump If Equal Jump If Equal to Zero | ZF = 1 |
JNE/JNZ | Jump If Not Equal Jump If Not Equal to Zero | ZF = 0 |
JC | Jump If Carry | CF = 1 |
JNC | Jump If Not Carry | CF = 0 |
JO | Jump If Overflow | OF = 1 |
JNO | Jump If Not Overflow | OF = 0 |
JS | Jump If Sign Negative | SF = 1 |
JNS | Jump If Sign Non Negative | SF = 0 |
JP/JPE | Jump if parity even | PF = 1 |
JNP/JPO | Jump if parity not even/jump if parity odd | PF = 0 |