title: How to use LES in assembly language?
body: <p>I have to create COM file and use LES there. I didn't find any examples of using LES, only this one.
  And there is an error <strong>"operand types do not match"</strong> in the string <code>LES BX, VIDEO</code>
  What should I do? I thought we can use register bx for LES.</p>
  
  <pre><code>.model  tiny
  .code
  ORG 100h
  start:                                 
  LES BX, VIDEO ; ES = B800h (memory VGA), BX = 72Eh      
  MOV AX, 0         ; reset registers
  MOV ES, AX        ; ES = 0
  MOV BX, AX        ; BX = 0
  
  MOV BX, VIDEO     ; analog of using LES
  MOV ES, VIDEO+2   ; with using two commands MOV
                  ; ES = B800h (memory VGA), BX = 72Eh
  RET               ; exit
  
  VIDEO DW 72Eh
  DW 0B800h
  END start
  </code></pre>