Pages

Search in This Blog

Sunday 15 January 2012

SPECIAL ADDRESS TRANSFER INSTRUCTION


SPECIAL ADDRESS TRANSFER INSTRUCTION
  • LEA Instruction - Load Effective Address
LEA Instruction - This instruction indicates the offset of the variable or memory location named as the source and put this offset in the indicated 16 – bit register.
Syntax – LEA register, source
Example:
LEA BX, PRICE              ;Load BX with offset of PRICE in DS
LEA BP, SS:STAK          ;Load BP with offset of STACK in SS
LEA CX, [BX][DI]           ;Load CX with EA=BX + DI
  • LDS Instruction - Load register and Ds with words from memory
LDS Instruction - This instruction loads a far pointer from the memory address specified by op2 into the DS segment register and the op1 to the register.
Syntax – LDS register, memory address of first word or LDS op1, op2
Example:
LDS BX, [4326]           ; copy the contents of the memory at displacement 4326H in DS to BL, contents of the 4327H to BH. Copy contents of 4328H and 4329H in DS to DS register.
  • LES Instruction - Load register and ES with words from memory
This instruction loads a 32- bit pointer from the memory address specified to destination register and Extra Segment. The offset is placed in the destination register and the segment is placed in Extra Segment. Using this instruction, the loading of far pointers may be simplified.
Syntax – LES register, memory address of first word

No comments:

Post a Comment