array with random ints


/ Published in: Assembler
Save to your folder(s)



Copy this code and paste it in your HTML
  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


Comments

RSS Icon Subscribe to comments

You need to login to post a comment.