Guardian Application Conversion Guide

General Considerations
Converting to TNS/R Systems
9–2 096047 Tandem Computers Incorporated
1
2
3
4
Page
00080000 – 00080FFF
00081000 – 00081FFF
00082000 – 00082FFF
00083000 – 000837FF
00083800 – 00083FFF
Addresses (%h)
901
Overflow Results Multiplication and division overflow results are undefined on all Tandem systems.
Furthermore, overflow results of integer multiplication and division instructions
(except LMPY) are incompatible between the TNS and TNS/R systems. The
incompatible instructions are:
IDIV DDIV QDIV LDIV
IMPY DMPY QMPY
Overflow results of addition and subtraction instructions (and LMPY) are compatible
on both systems. The compatible instructions are:
IADD DADD QADD LMPY
ISUB DSUB QSUB
INEG DNEG QNEG
You must test for overflow if your program expects multiplication or division
overflow. Use $OVERFLOW in an IF statement immediately after the operation that
might overflow:
FIXED(0) count, time, result;
CODE (RDE; ANRI %577; SETE); !Disable overflow traps
result := count * time;
IF $OVERFLOW THEN !Test for overflow
result := 0D; !Fix the overflow result