title: generate random number in a range in assembly
body: <p>I'm trying to genarate a random number between -27 and +33 in assembly.</p>
  
  <p>There is a procedure called <code>Randomize</code> that generates a random number between  0 and n where n is the upper bound.</p>
  
  <p>How to shift the lower bound to be -27 not 0?</p>
  
  <p>This is the code:</p>
  
  <pre><code>title test
  INCLUDE irvine32.inc
  
  
  .data
  msg byte "Genrating 50 number",0
  .code
  main PROC
  mov edx,offset byte
  call WriteString
  call crlf
  mov ecx,50
  L1:
  mov eax,+33
  call RandomRange
  call writeDec
  
  
  
  exit
  main ENDP
  END main 
  </code></pre>