Article View: mod.computers.apollo
Article #3Re: Assembler/Random Number Generator
From: apollo
Date: Thu, 21 Nov 1985 14:00
Date: Thu, 21 Nov 1985 14:00
24 lines
1836 bytes
1836 bytes
When calling the BSD4.2 RAND() in CLIB from Pascal, I seem to get the
System V version of RAND(), despite the SYSTYPE="BSD4.2". Yes, writing
a C language cover function with #systype "bsd4.2" works, but isn't
there a way to call RAND() directly?
In general, you can't call clib routines from a program that has no C code
in it. If you bind in even the tiniest bit of C code, the compiler will
put the clib stamp of approval on your program, and the loader will make
sure the right thing happens when the program runs.
Setting the SYSTYPE environment variable has no effect on which set of
system calls the program sees when it runs. That is determined by the
stamp the binder places on the object module. You can get your modules
stamped "bsd4.2" by putting "#systype" in the source, or giving the
-Tbsd4.2 flag to either /bin/cc or /bin/ld (or -systype to /com/cc or
/com/bind).
Any other random number generators out there to feed my Apollo?
You might try the bsd4.2 random() function. Some people claim it is
better then rand(), and since there is no sys5 version of random(),
you don't have to worry about which universe your program is running in.
-------
Technical Details
Message-ID:
<8511230435.AA16591@uw-beaver.arpa>Path:
arc1-ca.pugleaf.net!utzoo!decvax!ittatc!dcdwest!sdcsvax!ucbvax!apolloShow Full Headers
Complete Article Headers
Relay-Version: version B 2.10 5/3/83; site utzoo.UUCP Posting-Version: version B 2.10.3 4.3bsd-beta 6/6/85; site ucbvax.BERKELEY.EDU Path: arc1-ca.pugleaf.net!utzoo!decvax!ittatc!dcdwest!sdcsvax!ucbvax!apollo From: apollo@ucbvax.UUCP Newsgroups: mod.computers.apollo Subject: Re: Assembler/Random Number Generator Message-ID: <8511230435.AA16591@uw-beaver.arpa> Date: Thu, 21-Nov-85 09:00:43 EST Article-I.D.: uw-beave.8511230435.AA16591 Posted: Thu Nov 21 09:00:43 1985 Date-Received: Tue, 26-Nov-85 01:18:43 EST Sender: daemon@ucbvax.BERKELEY.EDU Organization: The ARPA Internet Lines: 24 Approved: apollo@yale-comix.arpa