title: Assembler Language: Error A2075 Jump destination too far: by 30 bytes
body: <p>What is the  best way to check and debug if jumping too far?</p>
  
  <p>So I have a var <code>inBuffer</code> which contains a <code>BYTE</code> lenght of 115.
  I move that into <code>bufSize</code> and try xor'ing it against a set of 3 keys to decrypt the message.
  My code compiles but I am unable to to build except this part where it says I am jumping too far.</p>
  
  <pre><code>bufSize DWORD ?
  mov eax,115
  mov bufSize,eax
  
  ;-------------------------------------------------
  AnalyzeBuffer PROC
  ;receives nothing
  ;returns nothing
  ;-------------------------------------------------
  pushad          ; pushes all data in this method into a stack
  mov ecx,bufSize ; loop count
  mov esi,0       ; start at index 0 in translated buffer
  
  top:
      cmp buffer[esi],20h    ; checks if character is space which is ok
      je yes
  
      cmp buffer[esi],2ch    ; checks if character is comma wich is okay
      je yes
  
      cmp buffer[esi],2eh    ; checks if character is period which is okay
      je yes
  
      cmp buffer[esi],41h     ; checks if character is above A in the ascii chart
      jb no
  
      ;the following are all unacceptable characters
      cmp buffer[esi],5bh     ;checks if character is [
      je no
      cmp buffer[esi],5ch     ; checks if character is \
      je no
      cmp buffer[esi],5dh     ;checks if character is ]
      je no
      cmp buffer[esi],5eh      ; checks if character is ^
      je no
      cmp buffer[esi],5fh     ; checks if character is _
      je no
      cmp buffer[esi],60h     ; checks if character is `
      je no
      cmp buffer[esi],7bh     ; checks if characre is {
      je no
      cmp buffer[esi],7ch     ; checks if character is |
      je no
      cmp buffer[esi],7dh     ; checks if }
      je no
      cmp buffer[esi],7eh     ; checks if ~
      je no
      cmp buffer[esi],7fh     ; checks if 
      je no
  
  
  
      yes:
          inc esi             ; going to next character
          loop top
          ;getting to this step means these keys worked for all characters in buffer
  
          mov edx,OFFSET goodMsg
          call WriteString
          call DisplayAllKeys ; shows 3 keys used
          call Crlf
          call Crlf
          mov edx,OFFSET buffer   ; displays decrypted message
          call WriteString
          call Crlf
          call Crlf
  
      no:
      ;the current character wasnt good so trying next key
      popad
      ret
  
  AnalyzeBuffer ENDP
  </code></pre>