.TITLE FLOT2 FLOT2:: TST (R5)+ ; IGNORE PARAM COUNT CLR R3 ; Will hold sign bit MOV #32.,R2 ; Total shift count MOV (R5)+,R0 ; Number address MOV (R0)+,R1 ; Low order bits MOV (R0)+,R0 ; Hi order bits BGT 10$ ; Positive number BEQ 5$ ; Short cut 1 word integer MOV #100000,R3 ; sign bit COM R1 ; Complement Lo COM R0 ; Complement Hi ADD #1,R1 ; Turn it to 2's complement ADC R0 ; And the hi order too BNE 10$ ; 2 word conversionn 5$: MOV R1,R0 ; Move low to high BEQ 40$ ; Totally zero word 6$: MOV #16.,R2 ; current shift count CLR R1 ; No low bits 10$: ASHC #1,R0 ; Shift out 1 bit BCS 20$ ; Found high order bit? SOB R2,10$ ; Continue till done 20$: ADD #200,R2 ; Complete exponent ASH #7,R2 ; Shift exponent to proper place ASHC #-9.,R0 ; Shift mantissa to proper place BIC #177600,R0 ; Clear extra bits in mantissa ADD R2,R0 ; Combine exponent, mantissa ADD R3,R0 ; Combine Sign bit 40$: MOV (R5)+,R2 ; Get output address MOV R0,(R2)+ ; Transfer hi order MOV R1,(R2)+ ; Lo order RETURN .END