Home  Site Map  Instruction Index 

LDS  -  Load Far Pointer Instruction


The LDS instruction is used to load (read) a segment and Far address from a memory location into registers. The memory address most hold the Segment and Offset address.

This command has 3 parts, Instruction, Register, and a 32 bit memory address made up of 16 bit Segment number and a 16 bit offset address.

LDS loads the offset address into the Register provided in the first operand, then the Segment into the DS Register.



Breakdown   Description16bit Machine
Code
LDS ; InstructionC5
SI ; Register for the offset address
;  See below
[BX] ; A memory address from [BX]
;  pointed to by BX
DataAddress; A Label address


LDS using a memory address

Assembly
Sample
Description
MOV BX, 0x0345;  Assign the memory address of the Pointer
or
MOV BX, DataAddress;  Assign the memory address of the Pointer
LDS SI, [BX];  Call LDS


Alternate method

Assembly
Sample
Description
MOV BX, 0x0005;  Assign the memory address of the Pointer
PUSH BX
POP DS
MOV SI, DataAddress;  Assign the memory address of the
; Pointer to SI Register


Assembly
Sample
Description   16 bit Machine
  Code
LDS SI, [BX];  Load DS and SI from the memory
;  address in [BX]
  C5 33