home *** CD-ROM | disk | FTP | other *** search
/ ProfitPress Mega CDROM2 …eeware (MSDOS)(1992)(Eng) / ProfitPress-MegaCDROM2.B6I / MISC / MATH / ULTRA101.ZIP / ULT32_FR.ASM < prev    next >
Encoding:
Assembly Source File  |  1992-03-26  |  2.5 KB  |  103 lines

  1. ; Program:      ULTRA.ASM (80386 IBM Fortran/2 version)
  2. ;
  3. ; Description:  The greatest random number generator that ever was
  4. ;               or ever will be.  Way beyond Super-Duper.
  5. ;               (Just kidding, but we think its a good one.)
  6. ; Authors:      Arif Zaman (arif@stat.fsu.edu) and
  7. ;               George Marsaglia (geo@stat.fsu.edu).
  8. ; Date:         26 March 1992
  9. ; Version:      1.01
  10. ; Copyright:    To obtain permission to incorporate this program into
  11. ;               any commercial product, please contact the authors at
  12. ;               the e-mail address given above or at
  13. ;
  14. ;               Department of Statistics and
  15. ;               Supercomputer Computations Research Institute
  16. ;               Florida State University
  17. ;               Tallahassee, FL 32306.
  18. ;
  19. ; See Also:    The file ULTRA.DOC contains detailed comments
  20. ;
  21.    DOSSEG
  22.    .MODEL huge,fortran
  23.  
  24. ;===== B: GLOBAL FUNCTIONS, SUBROUTINES and VARIABLES =================
  25. ;
  26.     public  i31bit, i15bit, i7bit,  i1bit,  uni,    duni,
  27.     public  i32bit, i16bit, i8bit,  rinit,  vni,    dvni
  28.     public  swbfill,swbx,   swbn
  29.  
  30. ;===== D. MACRO DEFINITIONS ===========================================
  31. ;
  32. ; RinitProcStart should take two 32-bit arguments conx and shrx
  33. ;   and place them in eax and ebx.
  34. ;   es and ds should both point to the data segment.
  35. ;   conx must be odd (so we or with 1 just to make sure).
  36. ; FillProc
  37. ;   DS is already the data segment. ES should also be made the same.
  38.  
  39. EnterProcedure   macro
  40.     mov  dx,seg x
  41.     push ds
  42.     mov  ds,dx
  43. endm
  44.  
  45. ExitProcedure    macro
  46.     pop ds
  47.     ret
  48. endm
  49.  
  50. RinitProcStart   macro          ; fortran has call by reference.
  51.   rinit   proc conx:dword, shrx:dword
  52.     EnterProcedure
  53.     mov  ax,ds
  54.     mov  es,ax
  55.     lds  si,ShrX
  56.     lodsd                   ; load shrx in ebx
  57.     mov  ebx,eax
  58.     lds  si,ConX            ; and  conx in eax
  59.     lodsd
  60.     or   al,1               ;  ( congx must be odd )
  61. endm
  62.  
  63. RinitProcEnd     macro
  64.     ExitProcedure
  65.   rinit endp
  66. endm
  67.  
  68. FillProcStart    macro
  69.   fillswb proc near
  70.     mov ax,ds
  71.     mov es,ax
  72. endm
  73.  
  74. FillProcEnd      macro
  75.     ret
  76.   fillswb endp
  77. endm
  78.  
  79. DwordFn macro
  80. endm
  81.  
  82. WordFn  macro
  83. endm
  84.  
  85. ByteFn  macro
  86.     cbw                ; fortran doesn't have bytes so return integer*2
  87. endm
  88.  
  89. RealFn  macro
  90. endm
  91.  
  92. DoubleFn macro
  93. endm
  94.  
  95. DATA SEGMENT WORD PUBLIC 'F@DATA'
  96.   INCLUDE ULT32DAT.INC
  97. DATA ENDS
  98.  
  99. F@ICODE SEGMENT WORD PUBLIC 'CODE'
  100. ASSUME CS:F@ICODE, DS:DATA
  101.   INCLUDE ULT32COD.INC
  102. F@ICODE ENDS
  103. END