;++ ; ----------------------------------------------------------------------------- ; PP&L KWH System <> Standard Library Routine ; ------------------------------------------- ; ; Convert from IBM single-precision floating point format into the ; compatible DEC format ; ; CALL CVT_IBM_DEC_F (number of values {I*4}, values {R*4(*)}) ; ; Yuichi Inasawa <> 12/02/81 ; M. Latshaw <> 07/01/86 ; ------------------------------------------------------------------------------ ;-- .TITLE CVT_IBM_DEC_F COUNT = 4 DATA = 8 .PSECT $CODE,PIC,CON,REL,LCL,SHR,EXE,RD,NOWRT,LONG .ENTRY CVT_IBM_DEC_F, ^M MOVL #1, R0 CMPB #2, (AP) BNEQ 1$ MOVL @COUNT(AP), R0 BLEQ RETURN 1$: MOVL DATA(AP), R1 NEXT: ; +---+---+---+---+ MOVB 0(R1), -(SP) ; | 0 | 1 | 2 | 3 | MOVB 1(R1), -(SP) ; +---+---+---+---+ MOVB 2(R1), -(SP) ; MOVB 3(R1), -(SP) ; +---+---+---+---+ MOVL (SP)+, R2 ; | 3 | 2 | 1 | 0 | ; +---+---+---+---+ EXTZV #24, #7, R2, R3 SUBL2 #^X40, R3 ASHL #2, R3, R3 BICL3 #^XFF000000, R2, R4 BNEQ 1$ CLRL R3 BRB MOV 1$: BBS #23, R4, 2$ ASHL #1, R4, R4 DECL R3 BRB 1$ 2$: ADDL2 #^X80, R3 ASHL #7, R3, R3 INSV R4, #16, #16, R3 ASHL #-16, R4, R4 INSV R4, #0, #7, R3 BBC #31, R2, MOV BISL #^X8000, R3 MOV: MOVL R3, (R1)+ SOBGTR R0, NEXT RETURN: RET .END