title: 8086 random number generator (not just using the system time)?
body: <p>I am using assembly 8086emu and I need a numbers generator for 8 numbers.<br />
  I tried to use this piece of code by @johnfound:</p>
  <pre><code>RANDGEN:         ; generate a rand no using the system time
  
  RANDSTART:
     MOV AH, 00h  ; interrupts to get system time        
     INT 1AH      ; CX:DX now hold number of clock ticks since midnight      
  
     mov  ax, dx
     xor  dx, dx
     mov  cx, 10    
     div  cx       ; here dx contains the remainder of the division - from 0 to 9
  
     add  dl, '0'  ; to ascii from '0' to '9'
     mov ah, 2h   ; call interrupt to display a value in DL
     int 21h    
  RET    
  </code></pre>
  <p>but it is useful only when you generate one number.  Repeated calls get the same number, because that clock only ticks 18.2 times per second.</p>
  <p>I've tried to create pseudo-random function but I am pretty new to assembly and I did not succeed.
  I would like to know if there's a way to do something similar to java's <code>Math.random()</code> function in emu8086.</p>