home *** CD-ROM | disk | FTP | other *** search
- {$IFNDEF i32} unit ultra;
- {$ELSE} unit ultra32;
- {$ENDIF}
-
- interface
-
- Function i32bit : LongInt;
- Function i31bit : LongInt;
- Function i16bit : Integer; { You can declare this to be Word }
- Function i15bit : Integer;
- Function i8bit : ShortInt; { You can declare this to be Byte }
- Function i7bit : ShortInt;
- Function i1bit : Boolean;
- Function uni : Single;
- Function vni : Single;
- Function duni : Double;
- Function dvni : Double;
- Procedure rinit(x,y : LongInt);
-
- implementation
-
- var swbx,x : Array [0..36] of LongInt;
- const
- swbn : Integer = 0; { Number of fresh bytes remaining in swbx. }
- bits : Byte = 0; { Eight bits to be fed out one at a time by i1bit.}
- nbits : Byte = 0; { Number of fresh bits remaining in bits.}
- flags : Byte = 0; { The state of the carry flag for the SWB generator.}
- congx : LongInt = $E8072C6C; { Congruential generator seed }
- {$IFNDEF i32}
- shrgx : LongInt = 0; { Shift Register seed }
- {$ENDIF}
- seven : Integer = 7; { The 8087 can't load immediate values.}
- scale31 : Integer = -31; { these are some values we need to scale integers}
- scale63 : Integer = -63; { into floating point numbers.}
-
- Function i32bit : LongInt; external;
- Function i31bit : LongInt; external;
- Function i16bit : Integer; external;
- Function i15bit : Integer; external;
- Function i8bit : ShortInt; external;
- Function i7bit : ShortInt; external;
- Function i1bit : Boolean; external;
- Function uni : Single; external;
- Function vni : Single; external;
- Function duni : Double; external;
- Function dvni : Double; external;
- Procedure rinit(x,y : LongInt); external;
-
- {$IFNDEF i32} {$L ultra_tp.obj}
- {$ELSE} {$L ult32_tp.obj}
- {$ENDIF}
-
- begin
- rinit(1234567,7654321);
- end.
-