.enabl lc .title $CONVF .ident /bmdfix/ ; This routine contains the necessary patch to the RCI$ ; module to enable reading blanks as a "-0.0". It must ; be run through the PAT program on an object file containing ; RCI$ from $CONVF, extracted from $SYSLIB (V2.1 or later) .psect ots$i .enabl gbl rci$=. .=rci$+24 ;old "1$: jsr pc,rget" jmp skipb ret1: nop .=rci$+274 rget: .=rci$+312 ;offset to scale scale: mov r1,r3 bis r4,r3 ;check for all zeros bis r5,r3 jmp scale2 ;rest of change at scale2 ret2: .=rci$+530 store: .psect rcimod .enabl gbl skipb: bis #100000,r0 ;set negative sign (all blank=-0.0) 1$: jsr pc,rget ;old code beq 1$ ;" clr r0 ;not all blank, so clear r0 jmp ret1 ;can't use jsr - stack must be untouched scale2: bne 1$ ;r1,r4,r5 not all zero tst r0 ;r1,r4,r5=0; is this all blanks? beq 2$ ;no, but result is zero cmp #100000,r0 ;is this the -0.0 flag beq 2$ ;yes, so return result as -0.0 1$: jmp ret2 ;can't use jsr - stack must be untouched 2$: jmp store ;output the result. .end