In: Electrical Engineering
Depending on the operation they perform, all instructions divided in several groups:
Arithmetic Instructions
Branch instructions
Data transfer Instructions
Logical Instructions
Logical instructions with bits(boolean operations)
1) Arithmetic instructions:--
These instructions perform several basic operations such as addition, subtraction, multiplication, division etc
After execution, the result is stored in the first operand. For example, ADD instruction is used to add source byte to the accumulator such as result stored in accumulator.
ADD A, <source byte>
2) Logical Instructions:--
These instructions perform logical operations between corresponding bits of two registers after execution the result is stored in the first operand. Thus it comprises of AND, OR, XOR etc.
For example:- Logical AND i.e ANL instructions perform a bitwise AND operation between destination byte and source byte storing the result in destination. Thus the value of store byte is not affected.
ANL <destination byte>, <source byte>
3) Data transfer instructions:--
These instructions move the content of one register to another one.
Thus the register whose content is moved remains unchanged.
If they have suffix X i.e MOVX the data is transferred to from external memory.
MOV <destination byte> , <source byte>
4) Branching Instructions:--
The branch instructions consist of two types of instructions such as
Unconditional jump instructions:-- After unconditional jump instructions execution program control transfer to a new location from where the program continues the execution.
Conditional jump instructions:-- if some condition is met a jump is executed. Otherwise the program normally proceeds with the next instructions.
Thus, ACALL addr11 it is called as absolute call
LCALL addr16.. It is called as long call.
RET it is return from subroutine instruction.
5) Logical operations on Bits (boolean variable manipulation instructions)
As it is similar to logical instructions, these instructions perform logical operations.
The difference is that these operations are performed on single bits such as clear bit. For example, CLR bit
CPL that is complement bit,
SET bit that sets bit to 1
JC jump if carry
JB jump if bit.. Etc
Thus these are types of the instruction sets. Thus 8051 consists. Thus I have given some information to elaborate these instructions.
Hope you understand.. Please take it positively.. Thank you..