(i) ADDC: The ADDC instruction adds a byte value and the value of the carry flag to the accumulator. The results of the addition are stored back in the accumulator. Several of the flag registers are affected.
ADDC
Function: Add with Carry
Syntax: ADDC A, source byte
Flags affected: OV,AC,CY
Description: ADDC simultaneously adds the byte variable indicated, the carry flag and the Accumulator contents, leaving the result in the Accumulator (A = A + byte +CY). The carry and auxiliary-carry or bit flags are set, respectively. If CY = 1 prior to this instruction, CY is also added to A.
Addressing modes supported for ADDC instruction :
* Immediate: ADDC A,#data
* Register: ADDC A, Rn
* Direct: ADDC A, address
* Register Indirect: ADDC A, @Ri
(ii) LCALL
Function: Long call, Transfers control to a subroutine
Syntax: LCALL 16 bit addr
Flags affected : None
No. of bytes used: 3 byte( 1 byte is opcode and other two bytes are the 16 bit address of the target subroutine)
Description: This instruction is used to transfers control to a subroutine To reach the target address in the 64 Kbytes maximum ROM space of the 8051, LCALL instruction is used. For calling a subroutine, the PC register (which has the address of the instruction after the LCALL) is pushed onto the stack, and the stack pointer (SP) is incremented by 2. Then the program counter is loaded with the new address and control is transferred to the subroutine.