Bulletin number: 331 Products affected: D505A D605A D705B Description: Problem with REAL32REM and T8 Component: library Date: Wed Jul 11 12:29:16 BST 1990 ----- The REAL32REM call does not work for T8 type processors. The processor crashes and debug shows that the workspace pointer is corrupt. The following is an example that fails: #INCLUDE "hostio.inc" PROC test (CHAN OF SP fs, ts, []INT memory) #USE "hostio.lib" REAL32 a : SEQ a := REAL32REM.fix ( 2.0 (REAL32), 1.5 (REAL32) ) so.write.real32 ( fs, ts, a, 9, 9 ) so.write.nl ( fs, ts ) so.exit ( fs, ts, sps.success ) : There are two possible workarounds. If division by zero and NaN is not a problem use REM. Otherwise use the inserted piece of code shown below: #INCLUDE "hostio.inc" PROC test (CHAN OF SP fs, ts, []INT memory) REAL32 FUNCTION REAL32REM.fix (VAL REAL32 Y, Z) REAL32 result : VALOF GUY LDLP Y FPLDNLSN LDLP Z FPLDNLSN FPREMFIRST EQC 0 CJ .next :loop FPREMSTEP CJ .loop :next FPUCLRERR LDLP result FPSTNLSN RESULT result : #USE "hostio.lib" REAL32 a : SEQ a := REAL32REM.fix ( 2.0 (REAL32), 1.5 (REAL32) ) so.write.real32 ( fs, ts, a, 9, 9 ) so.write.nl ( fs, ts ) so.exit ( fs, ts, sps.success ) : Because GUY code is used it must be compiled using the G option. The problem has been fixed in the TCOFF release Dx205A.