Ultimate magazine theme for WordPress.

Instructions in Assembly



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




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.

SymbolDescriptionCondition for Jumps
JG/JNLEJump if greater than

Jump if not less than or equal to

ZF = 0 and SF = OF
JGE/JNLJump if greater than or equal to

Jump if not less than

JL/JNGEJump if less than

Jump if not greater than or equal to

SF <> OF
JLE/JNGJump if less than or equal to

Jump if not greater than

ZF = 1 and SF <> OF
SymbolDescriptionCondition for Jumps
JA/JNBEJump if above than

Jump if not below than or equal to

ZF = 0 and CF = 0
JAE/JNBJump if above than or equal to

Jump if not below than

CF = 0
JB/JNAEJump if below than

Jump if not above than or equal to

CF = 1
JBE/JNAJump if below than or equal to

Jump if not above than

ZF = 1 and CF = 1
SymbolDescriptionCondition for Jumps
JE/JZJump If Equal

Jump If Equal to Zero

ZF = 1
JNE/JNZJump If Not Equal

Jump If Not Equal to Zero

ZF = 0
JCJump If CarryCF = 1
JNCJump If Not CarryCF = 0
JOJump If OverflowOF = 1
JNOJump If Not OverflowOF = 0
JSJump If Sign NegativeSF = 1
JNSJump If Sign Non NegativeSF = 0
JP/JPEJump if parity evenPF = 1
JNP/JPOJump if parity not even/jump if parity oddPF = 0

Leave A Reply