[net.micro.68k] sun and vax diffs, an update

tiberio@seismo.UUCP (Mike Tiberio) (08/20/84)

<*** REPLACE THIS LINE WITH YOUR MESSAGE ***>

My original posting has generated some discussion and raised some questions.
I have done some more tests on the sun and this is what I have found. First
off, while the value of log10(0.) may be undefined,it is certainly closer
to negative Infinity than Infinity which is the answer the sun gave. Also
scanf on the sun does not recognize the string Infinity when told to read
it with a %f or %lf.

As an aside did you know that the sun and the vax store shorts in reverse
byte order! Yup, short ints written to tape on an IBM 370 need swab'ing on
the vax and do fine with a bcopy on the sun. If your into transfering longs
between machines you may find the following routine useful:

swap(from,to,num)
register char *from,*to;
register int num;
{
	for( ; num ; num -= 4, from +=4 , to +=4 )
	{
		*(to + 3)	= *from;
		*(to + 2)	= *(from + 1);
		*(to + 1)	= *(from + 2);
		*to		= *(from + 3);
	}
	return;
}

Not my routine, but paid for with goverment (our) money.

seismo!tiberio