home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Aminet 6
/
Aminet 6 - June 1995.iso
/
Aminet
/
dev
/
gcc
/
libnixV0_8.lha
/
gnu
/
libnix-sources.lha
/
sources
/
amiga
/
misc
/
FastRand.c
< prev
next >
Encoding:
Amiga
Atari
Commodore
DOS
FM Towns/JPY
Macintosh
Macintosh JP
Macintosh to JP
NeXTSTEP
RISC OS/Acorn
Shift JIS
UTF-8
Wrap
C/C++ Source or Header
|
1994-12-12
|
253 b
|
22 lines
#include <exec/types.h>
ULONG FastRand(ULONG seed)
{ ULONG a=seed<<1;
if((LONG)seed<=0)
a^=0x1d872b41;
return a;
}
/*
asm("
.text
.globl _FastRand
_FastRand: movel sp@(4:W),d0
addl d0,d0
bhis L1
eoril #0x1D872B41,d0
L1: rts
");
*/