home *** CD-ROM | disk | FTP | other *** search
/ C!T ROM 5 / ctrom5b.zip / ctrom5b / PROGRAM / ASM / ALIB30B / RANDOM8.ASM < prev    next >
Assembly Source File  |  1994-12-05  |  730b  |  35 lines

  1.     page    66,132
  2. ;******************************* RANDOM8.ASM *********************************
  3.  
  4. LIBSEG           segment byte public "LIB"
  5.         assume cs:LIBSEG , ds:nothing
  6.  
  7. ;----------------------------------------------------------------------------
  8. .xlist
  9.     include  mac.inc
  10.     include  common.inc
  11. .list
  12.  
  13. comment 
  14. ;- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -( RANDOM  )
  15. RANDOM_SEED - get low clock value for us as random number
  16. ;  inputs:  none
  17. ;  output:  ax = low value of clock
  18. * * * * * * * * * * * * * *
  19. 
  20.  
  21.     public    RANDOM_SEED
  22. RANDOM_SEED    proc    far
  23.     push    cx
  24.     mov    cx,ds
  25.     sub    ax,ax
  26.     mov    ds,ax
  27.     mov    ax,ds:[46ch]
  28.     mov    ds,cx
  29.     pop    cx
  30.     retf    
  31. RANDOM_SEED    endp
  32.  
  33. LIBSEG    ENDS
  34. ;;    end
  35.