Question

In: Electrical Engineering

Describe the types and differences in the assembly instructions of 8051 microcontroller

Describe the types and differences in the assembly instructions of 8051 microcontroller

Solutions

Expert Solution

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..


Related Solutions

Describe the types of instructions supported by the ATmega8 microcontroller.
Describe the types of instructions supported by the ATmega8 microcontroller.
Write an assembly language program for 8051 microcontroller to find the sum of the following series,...
Write an assembly language program for 8051 microcontroller to find the sum of the following series, 1, -2, +3, -4, +5, -6,..., up to 100 terms. Store lower byte in R0 and higher byte in R1.
Draw the layout of the PSW register of the 8051 Microcontroller and explain its flags with examples.
Draw the layout of the PSW register of the 8051 Microcontroller and explain its flags with examples.
Write a code of digital alarm clock 8051 microcontroller using pin AT89S52
Write a code of digital alarm clock 8051 microcontroller using pin AT89S52
write a assembly language program to convert GRAY to BCD code in 8051
write a assembly language program to convert GRAY to BCD code in 8051
Write an 8051-assembly language program for the interfacing of ADC0804 and LM35 to display the room...
Write an 8051-assembly language program for the interfacing of ADC0804 and LM35 to display the room temperature on 16x2 LCD (10marks) please note that the program should be interfacing with ADC0804.
1. Convert the machine language instructions into assembly language instructions: 7976C1 06
1. Convert the machine language instructions into assembly language instructions: 7976C1 06
write a program for the microcontroller-msp430fr6989 using code composer studio not assembly language. write a code...
write a program for the microcontroller-msp430fr6989 using code composer studio not assembly language. write a code that transmits a single character and lights the red LED upon receiving that character. The board will "talk" to itself. The green LED should turn on whenever a message is sent and the LCD will display the message being received.
Describe the differences between the various governmental fund types
Describe the differences between the various governmental fund types
Describe the functions provided by the microcontroller PIC24FJ256GB106 whihc is used in printers such as HP...
Describe the functions provided by the microcontroller PIC24FJ256GB106 whihc is used in printers such as HP Office Jet 6000? only functionality, no features needed
ADVERTISEMENT
ADVERTISEMENT
ADVERTISEMENT