Home  Site Map  Instruction Index 

LES  -  Load Far Pointer Instruction


The LES instruction is used to load (read) a segment and address from a memory address 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 followed by an offset from the start of it.

LES loads the Offset address into the Register provided in the first operand, then the Segment in to the ES Register.



Breakdown   Description16 bit Machine
Code
LES ; InstructionC4h
DI ; Register number
[BX] ; A memory address from [BX] pointed
; to by BX
DataAddress; A Label address 25 C0


LES 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
LES DI, [BX];  Call LES


Alternate method

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


Assembly
Sample
Description   16 bit Machine
  Code
LES SI, [BX];  Load ES and DI from the memory
;  address in [BX]
  C4 33