        .SPACE  $TEXT$
        .SUBSPA $CODE$
	.EXPORT rd_minf
	.EXPORT rd_pinf
	.EXPORT rd_near
	.EXPORT rd_zero

rd_minf
	.PROC
	.CALLINFO
        .ENTRY
	STW 2,-20(0,30)
	LDO 32(30),30
	LDO -40(30),23
	FSTWS %fr0L,0(0,23)
	LDW 0(0,23),19
        LDI 	0x600,%r20 	; positionnement du masque dans %r20
        OR 	%r19,%r20,%r19 	; mise a 1 des bits 21 et 22 de %fr0L
	STW 19,0(0,23)
        FLDWS 0(0,23),%fr0L
	LDO -32(30),30
	STW 2,-20(0,30)
        BV 	%r0(%r2) 	; offset 0x18
          .EXIT
        LDWS -8(0,23),28
         .PROCEND

rd_pinf
	.PROC
	.CALLINFO
        .ENTRY
	STW 2,-20(0,30)
	LDO 32(30),30
	LDO -40(30),23
	FSTWS %fr0L,0(0,23)
	LDW 0(0,23),19
        LDI 	0x600,%r20
        OR 	%r19,%r20,%r19
        LDI 	0x200,%r20
        XOR 	%r19,%r20,%r19
	STW 19,0(0,23)
        FLDWS 0(0,23),%fr0L
	LDO -32(30),30
	STW 2,-20(0,30)
        BV 	%r0(%r2) 	; offset 0x18
          .EXIT
        LDWS -8(0,23),28
         .PROCEND
         
rd_near
	.PROC
	.CALLINFO
        .ENTRY
	STW 2,-20(0,30)
	LDO 32(30),30
	LDO -40(30),23
	FSTWS %fr0L,0(0,23)
	LDW 0(0,23),19
        LDI 	0x600,%r20
        OR 	%r19,%r20,%r19
        LDI 	0x600,%r20
        XOR 	%r19,%r20,%r19
	STW 19,0(0,23)
        FLDWS 0(0,23),%fr0L
	LDO -32(30),30
	STW 2,-20(0,30)
        BV 	%r0(%r2) 	; offset 0x18
          .EXIT
        LDWS -8(0,23),28
         .PROCEND
         
rd_zero
	.PROC
	.CALLINFO
        .ENTRY
	STW 2,-20(0,30)
	LDO 32(30),30
	LDO -40(30),23
	FSTWS %fr0L,0(0,23)
	LDW 0(0,23),19
        LDI 	0x600,%r20
        OR 	%r19,%r20,%r19
        LDI 	0x400,%r20
        XOR 	%r19,%r20,%r19
	STW 19,0(0,23)
        FLDWS 0(0,23),%fr0L
	LDO -32(30),30
	STW 2,-20(0,30)
        BV 	%r0(%r2) 	; offset 0x18
          .EXIT
        LDWS -8(0,23),28
         .PROCEND
         
        .END
