atari email archive

a collection of messages sent at Atari from 1983 to 1992.

DCL

(1 / 3)


Dave,

	Please try the following:

	WRITE SYS$OUTPUT %XFF439EB1/%X10000
	WRITE SYS$OUTPUT %XFFFFFF43

		Jed

DCL

(2 / 3)


So?

%XFF439EB2 = -12345678.
%X10000 = 65536.
-12345678/65536 = -188.38 in either Hex or Decimal
%XFFFFFF43 = -189.00 in either radix.
Conclusion: %XFF430000 is not equal to %XFF439EB2.

Dividing is not the same as and will not produce the same result as shifting
right. It looks as though you wanted to (-12345678. & -65536.)/65536. which is
the only way you can make sure a shift and divide will produce the same result. 

If, on the other hand, you wanted a result in Hex, you should have used FAO:

	write sys$output fao("!XL",%XFF439EB2/%X10000)

ds

RE: DCL

(3 / 3)


Aha.  Thank you.

	Jed
Message 1 of 3

Feb 04, 1987