[1903] in Athena Bugs

home help back first fref pref prev next nref lref last post

LSHIFT function, hf77

daemon@ATHENA.MIT.EDU (ellis@ATHENA.MIT.EDU)
Wed Mar 15 14:16:06 1989

From: <ellis@ATHENA.MIT.EDU>
To: bugs@ATHENA.MIT.EDU
Date: Wed, 15 Mar 89 14:15:32 EST

The lshift function causes an assembler error when the number of bits to
shift is > 15, and a constant is used. For example, the following does not
compile:
c
c  lshift bug program
c
	i = 1
        write(6,*) lshift(i,15)
        write(6,*) lshift(i,16)
	stop
	end

The following error results:

"/tmp/F7724049.s", line 57: Immediate operand greater than 15, operand 2
Compiler error in file test.o: assembler error

But the following example does compile and execute:

	i = 1
        j = 15
	k = 16
        write(6,*) lshift(i,j)
        write(6,*) lshift(i,k)
	stop
	end

home help back first fref pref prev next nref lref last post