Monday, August 30, 2010

Instruction Set Continued


LCALL - Long Call
Description: The LCALL instruction unconditionally calls a subroutine located at the specified address. The call can be route from a page of memory to another page of memory block The PC is incremented by three to obtain the address of the following instruction. The 16-bit PC is then stored on the stack (low-order byte first) and the stack pointer is incremented twice.
Syntax: LCALL Address
Example:
LCALL LABEL

LJMP - Long Jump
Description: The LJMP instruction unconditionally jumps to the specified address. The jump can be route from a page of memory to another page of memory block.
Syntax: LJMP Address
Example:
LJMP LABEL

MOV - Move Memory
Description: The MOV instruction used to copy the content of source i.e second operand to the destination i.e first operand. The content of second operand will be unchanged. There are fifteen number of combinations of source and destination operands.
Syntax: MOV destination, source
Example:
MOV A, B
MOV A, R0
MOV A, @R0
etc....

MOVC - Move Code Memory
Description: The MOVC instruction used to move the content of code memory to the Accumulator. The address or memory location from where the byte is to be copied is represented by the adding the content of Accumulator with 16-bit DPTR register.
Syntax: MOVC A, @A+DPTR
Example:
MOVC A, @A+DPTR

MOVX - Move Extended Memory
Description: The MOVX instruction used to read or write the bytes of external memory location to or from the Accumulator. The address of external memory location can be stored in DPTR or other registers.
Syntax: MOVX operand1, operand2
Example:
MOVX A, @DPTR
MOVX @DPTR, A
MOVX @R0, A

MUL - Multiply Accumulator by B
Description: The MUL instruction used to multiply the contents of register A with register B. The least significant byte of the result is placed in the Accumulator and the most-significant-byte is placed in the "B" register.
Syntax: MUL AB
Example:
MUL AB

NOP - No Operation
Description: The NOP instruction is as name suggests does nothing.
Syntax: NOP
Example:
NOP

ORL - Bitwise OR
Description: The OR instruction does a bitwise logical 'OR' operation on the two operands. The result will be stored in the destination operand. The contents of the source operand will be remain unchanged. The operand combinations could be: accumulator as destination then the source will be register, direct data, register-indirect or immediate address; if destination is direct address the source can accumulator or direct data. Each bit of two operands logically 'OR' and the result will be stored in the respective bit of the first operand.
Syntax: ORL Source, Destination
Example:
ORL A, Rn
{A} << {A} OR R0

ORL A, #0x10
{A} << {A} OR 0x10

ORL A, &(RAM)
{A} << {A} OR &(RAM)

ORL &(RAM), A
{&(RAM)} << {&(RAM)} OR A

ORL &(RAM), #0x10
{&(RAM)} << {&(RAM)} OR #0x10

ORL C, bit addr

No comments:

Post a Comment