
/COPYRIGHT 1969, DIGITAL EQUIPMENT CORP., MAYNARD, MASS.
/LMUL
/DESCIPTION:THIS SUBROUTINE FORMS A 36-BIT LOGICAL PRODUCT
/	FROM AN 18-BIT LOGICAL MULTIPLIER AND MULTIPLIAND
/
/CALLING SEQUENCE:LAC MULTIPLIER
/	JMS LMUL
/	LAC MULTIPLICAND
/	NEXT INSTR	RETURN IS MADE HERE
/
/RESULTS:	C(AC) = LOW-ORDER PRODUCT, C(%LMHY) = HIGH-ORDER PRODUCT.
/
LMUL	0
	DZM	%LMHY		/CLEAR PRODUCT AREA
	SNA			/IF MULTIPLIER 0?
	JMP	%LMPZ		/YES...EXIT
	DAC	%LMP1		/MULTIPLIER
	XCT*	LMUL		/FETCH MULTIPLICAND
	SNA!CLL			/IS MULTIPLICAND 0?
	JMP	%LMPZ		/YES...EXIT
	DAC	%LMP2		/STORE MULTIPLICAND
	LAW	-22		/SET LOOP COUNTER FOR
	DAC	%LMP3		/18 PASSED IN ADD LOOP
%LMP4	LAC	%LMP1		/SHIFT LOW-ORDER
	RAR			/BIT INTO THE LINK
	DAC	%LMP1
/THE HIGH-ORDER PARTIAL PRODUCT (%LMHY) IS LOADED.
/IF THE LINK IS 1 THE MULPLICAND IS ADDED TO IT
/AND THEN ROTATED RIGHT.  IF THE LINK IS 0, NO ADDITION
/OCCURS, BUT THE ACCUMULATOR IS STILL SHIFTED RIGHT.
/THE PROGRAM LOOPS TO REPEAT THIS PROCESS
/
	LAC	%LMHY		/FETCH PARTIAL PRODUCT
	SPL!CLL			/IS LINK BIT ON?
	TAD	%LMP2		/YES...ADD MULTIPLICAND
	RAR			/ROTATE AND
	DAC	%LMHY		/SAVE PARTIAL SUM
	ISZ	%LMP3		/FINISHED?
	JMP	%LMP4		/NO...LOOP AGAIN
	LAC	%LMP1
	RAR			/PICK-UP LAST BIT
%LMPZ	ISZ	LMUL
	JMP*	 LMUL
%LMP1	0
%LMP2	0
%LMP3	0
%LMHY	0
	.EOT
