MICROPROCESSOR AND INTERFACE DESIGN 8051 Microcontroller Dis
MICROPROCESSOR AND INTERFACE DESIGN
8051 Microcontroller
Disassemble the following code. What does the program do?Solution
0020 12 Lcall addr16 ;this is long call for calling the subroutine in other segment with 16 bit address
0021 00 NOP ; no operation used to insert the time
0022 27 ADD A,@R; used to add the contents present in the address saved in register R to the contents of the accumulator A
0023 80 SJMP offset;short jump with in the address of 8 bits
0024 F0 MOVX @DPTR,A;move the contents present in A to the address mention in dptr
0025 00 NOP;no operation
0026 FF MOV R7,A;move the contents of A to register 7
0027 7D MOV R5,#immediate data;move the data directly to register5
0028 FF MOV R7,A;move the contents of accumulator A to register 7
0029 FE MOV R6,A;move the contents of A to register 6
002A 22 RET ;return to the main program
