title: Error in a string reversal program in emu8086
body: <p>I tried a string reversal program, but emu8086 is showing me an error message</p>
  <blockquote>
  <p>(12)offset calculation error</p>
  </blockquote>
  <p>What is wrong with the line <code>LEA DI,STR2+LEN-1</code> ?</p>
  <pre><code>DATA SEGMENT
  STR1 DB 'HELLO'
  LEN EQU $-STR1
  STR2 DB 20 DUP(0)
  DATA ENDS
  CODE SEGMENT
  ASSUME CS:CODE, DS:DATA, ES:DATA
  START: MOV AX,DATA
  MOV DS,AX
  MOV ES,AX
  LEA SI,STR1
  LEA DI,STR2+LEN-1
  MOV CX,LEN
  UP: CLD
  LODSB
  STD
  STOSB
  LOOP UP
  MOV AH,4CH
  INT 21H
  CODE ENDS
  END START
  </code></pre>