Posted By

trusktr on 11/29/10


Tagged


Versions (?)

array with random ints


 / Published in: Assembler
 

  1. ;
  2. mov di, 0 ;starting at array position 0
  3. mov bl, 1 ;reseed based on time
  4. call reseed
  5. mov bh, -1 ;set putdec format
  6. populate:
  7. call random
  8. mov [int_arr+di], ax ;put random int into array position DI
  9. mov ax, [int_arr+di]
  10. call putdec$
  11.  
  12. inc di
  13. cmp di, 100
  14. jb populate

Report this snippet  

You need to login to post a comment.