Assembly operations

Bismillahir Rahmanir Rahim
Can work upon maximum two operands (variables) only.
Format of instruction:
Label: opcode operand1(destination), operand2(source) ; comment
• Label – named location of instruction used as destination of branching,
• Opcode – name of operation, known as mnemonics or memory aid,
• Operand1 is also the destination of result and operand2 is the source of arithmetic
and logic operations,
• Operands may be registers, variables, or constants,
• The constant can appear only as the source of data processing,viz.,Operand2,
• For single operand instructions the source operand may be a register or variable,
• For two operands instructions the destination and source operands may be
  1. • register, constant
  2. • register, register
  3. • register, memory
  4. • memory, constant
  5. • memory, register
Example:
• mov, add, sub are the names of operations: assignment (=), addition (+) and
subtraction (-),
• mov al, aa results in al = aa,
• add al, bl results in al = al + bl,
• sub al, cl results in al = al - cl,

Category of instructions:
1.Data transfer: Between registers and memory MOV
Stack manipulation PUSH, POP
2.Arithmatic operations: ADD, SUB, MUL, DIV, SHR, SHL, INC, DEC
3.Logical operation: OR, AND, XOR, NOT, CMP
4.Branching: JMP , JCND, LOOP, CALL, RET
5.CPU control: INT, HLT, NOP
Special thanks to
Dr Ehteshamul Haque 

Socializer Widget By Blogger Yard
SOCIALIZE IT →
FOLLOW US →
SHARE IT →