[mod.computers.apollo] Assembler/Random Number Generator

DIEGERT@SANDIA-CAD.ARPA (Carl Diegert) (11/20/85)

Has anyone pushed much on Apollo's (unsupported) assmebler.  I need
to get all 64 bits of mult of two 32 bit integers.. a 68000 mult long
instruction, but don't see any way to generate this instruction from
Pascal/C/Fortran...

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?

Any other random number generators out there to feed my Apollo?
-------

apollo@ucbvax.UUCP (11/21/85)

    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.
-------