
/SHIFT RIGHT SHIFT LEFT SUBROUTINES
/SINGLE AND DOUBLE PRECISION
/SHIFTS ARE ARITHMETIC RATHER THAN LOGICAL
/BITS SHIFTED OUT OF REGISTER ARE LOST
/DURING LEFT SHIFTS ZEROS ENTER LEAST SIG. BIT
/DURING POSITIVE RIGHT SHIFTS ZEROS ENTER MOST SIG. BIT
/DURING NEGATIVE RIGHT SHIFTS SIGN IS PROPAGATED
/ENTER WITH -N IN AC
/CALLING SEQUENCE:	JMS SPSL OR SPSR OR DPSL OR DPSR
/			ADDRESS OF DATA
/			RETURN, RESULT IN AC FOR SINGLE
/			        RESULT (MSB) IN AC FOR DOUBLE
/			        RESULT (LSB) IN LSH FOR DOUBLE
*600
SPSL,	0
	DCA CNTR		/SINGLE PRECISION SHIFT LEFT
	TAD I SPSL
	DCA ADDR
	TAD I ADDR
	ISZ SPSL
	CLL RAL
	ISZ CNTR
	JMP .-2
	JMP I SPSL
SPSR,	0
	DCA CNTR		/SINGLE PRECISION SHIFT RIGHT
	TAD I SPSR
	DCA ADDR
	TAD I ADDR
	ISZ SPSR
	CLL
	SPA
	CML
	RAR
	ISZ CNTR
	JMP .-5
	JMP I SPSR
DPSL,	0
	DCA CNTR		/DOUBLE PRECISION SHIFT LEFT
	TAD I DPSL
	DCA ADDR
	TAD I ADDR
	DCA MSH		/MOST SIGNIFICANT HALF
	ISZ ADDR
	TAD I ADDR
	DCA LSH		/LEAST SIGNIFICANT HALF
	ISZ DPSL
	TAD LSH		/SHIFT LEFT
	CLL RAL
	DCA LSH
	TAD MSH
	RAL
	DCA MSH
	ISZ CNTR
	JMP .-7
	TAD MSH
	JMP I DPSL

DPSR,	0
	DCA CNTR		/DOUBLE PRECISION SHIFT RIGHT
	TAD I DPSR
	DCA ADDR
	TAD I ADDR
	DCA MSH		/MOST SIGNIFICANT HALF
	ISZ ADDR
	TAD I ADDR
	DCA LSH		/LEAST SIGNIFICANT HALF
	ISZ DPSR
	TAD MSH		/SHIFT RIGHT
	CLL
	SPA
	CML
	RAR
	DCA MSH
	TAD LSH
	RAR
	DCA LSH
	ISZ CNTR
	JMP .-12
	TAD MSH
	JMP I DPSR
CNTR,	0
ADDR,	0
MSH,	0
LSH,	0

$
*U*92 