Google
 

Trailing-Edge - PDP-10 Archives - decuslib10-01 - 43,50161/mnorm.mp
There are no other files named mnorm.mp in the archive.
	TITLE MNORM
	ENTRY MNORM
	EXTERN MSHIFT
MNORM:	Z
	MOVEM 17,STORE+17	;SAVE
	MOVEI 17,STORE		;THE
	BLT 17,STORE+16		;AC'S
	MOVE 0,@1(16)	;AC0=PRECISION
	MOVE 1,(16)	;AC1=ADDR OF CHARACTERISTIC WORD
	MOVE 15,1(1)	;IF ALREADY NORMALIZED FORM,
	TLNE 15,200000	;NO SHIFTING NECESSARY
	JRST RETS
	MOVE 10,(1)
	JUMPG 10,.+3
	MOVN 11,10
	JRST .+2
	MOVE 11,10	;AC11=ABS VALUE OF CHARACTERISTIC WORD
	MOVE 6,1
	SETZ 4,0
	MOVE 5,0
LOOP1:	AOJ 6,0
	MOVE 2,(6)	;AC2=FIRST WORD OF FRACTION
	JFFO 2,.+4	;IF WORD =0'S, ADD 35
	ADDI 4,43	;TO BIT COUNTER
	SOJG 5,LOOP1	;LOOP UNTIL FIND A WORD NOT =0'S
	JRST RETS	;IF FRACTION=0,  TAKE RETURN
	SOJ 3,0
	ADD 4,3		;AC4=TOTAL NO. OF LEADING ZERO BITS
	SUB 11,4	;DECREASE CHARACTERISTIC OF WORD
	JUMPG 10,.+2
	MOVN 11,11
	MOVEM 11,(1)
	MOVEM 4,LOOP2+3	;MAKE THE NO. OF BITS AND THE DIRECTION
	MOVEM 1,LOOP2+1	;ACCESSIBLE TO THE SHIFT ROUTINE
LOOP2:	JSA 16,MSHIFT
	EXP 0,0,0
RETS:	HRLZI 17,STORE
	BLT 17,17	;RESTORE AC'S
	JRA 16,2(16)
STORE:	BLOCK 20
	END