home *** CD-ROM | disk | FTP | other *** search
- ; Program: ULTRA.ASM (80386 Turbo Pascal version)
- ;
- ; Description: The greatest random number generator that ever was
- ; or ever will be. Way beyond Super-Duper.
- ; (Just kidding, but we think its a good one.)
- ; Authors: Arif Zaman (arif@stat.fsu.edu) and
- ; George Marsaglia (geo@stat.fsu.edu).
- ; Date: 26 March 1992
- ; Version: 1.01
- ; Copyright: To obtain permission to incorporate this program into
- ; any commercial product, please contact the authors at
- ; the e-mail address given above or at
- ;
- ; Department of Statistics and
- ; Supercomputer Computations Research Institute
- ; Florida State University
- ; Tallahassee, FL 32306.
- ;
- ; See Also: The file ULTRA.DOC contains detailed comments.
- ;
- DOSSEG
- .MODEL TPASCAL
-
- ;===== B: GLOBAL FUNCTIONS, SUBROUTINES and VARIABLES =================
- ;
- public i31bit, i15bit, i7bit, i1bit, uni, duni,
- public i32bit, i16bit, i8bit, rinit, vni, dvni
- public swbfill
-
- ;===== D. MACRO DEFINITIONS ===========================================
- ;
- ; RinitProcStart should take two 32-bit arguments conx and shrx
- ; and place them in eax and ebx.
- ; es and ds should both point to the data segment.
- ; conx must be odd (so we or with 1 just to make sure).
- ; FillProc
- ; DS is already the data segment. ES should also be made the same.
-
- EnterProcedure macro
- endm
-
- ExitProcedure macro
- ret
- endm
-
- RinitProcStart macro
- rinit proc conx:dword, shrx:dword
- EnterProcedure
- mov ax,ds
- mov es,ax
- mov eax,conx
- or al,1
- mov ebx,shrx
- endm
-
- RinitProcEnd macro
- ExitProcedure
- rinit endp
- endm
-
- FillProcStart macro
- fillswb proc near
- mov ax,ds
- mov es,ax
- endm
-
- FillProcEnd macro
- ret
- fillswb endp
- endm
-
- DwordFn macro
- endm
-
- WordFn macro
- endm
-
- ByteFn macro
- endm
-
- RealFn macro
- endm
-
- DoubleFn macro
- endm
-
- N equ 37 ; The number of 32 bit words in the table
-
- extrn swbx : dword ; In Turbo-Pascal, the DATA segment can't
- extrn x : dword ; have any initial values, so we put all
- extrn swbn : word ; the constants in the Turbo-Pascal unit
- extrn bits : byte ; and only refer to them here.
- extrn nbits : byte
- extrn flags : byte
- extrn congx : dword
- extrn seven : word
- extrn scale31 : word
- extrn scale63 : word
-
- swbneg equ word ptr swbx+N*4
- conglo equ word ptr congx
- conghi equ word ptr congx+2
-
- .CODE
- INCLUDE ULT32COD.INC
- END