CP Programming
Integer Arithmetic
I n t e g e r d i v i d e packs the i n t e g e r s i n t o floating-point
format, using t h e pack
i n s t r u c t i o n with a zero-exponent value.
I n i n t e g e r m u l t i p l i c a t i o n , a 48-bit product can be formed by using t h e
double-precision multiply i n s t r u c t i o n .
Both operands must have an exponent
value of
+0,
and t h e c o e f f i c i e n t s cannot both be normalized.
The
r e s u l t i s
sign-extended t o 60 b i t s and s e n t t o an X r e g i s t e r .
I n i n t e g e r d i v i s i o n , the d i v i s o r must be normalized, but t h e dividend does n o t
have t o be normalized.
The r e s u l t i n g q u o t i e n t must be unpacked and the
c o e f f i c i e n t must be s h i f t e d by t h e amount of the unpacked exponent using the
l e f t - s h i f t (22) i n s t r u c t i o n t o o b t a i n t h e i n t e g e r q u o t i e n t .
Compare/Move Arithmetic
The compare/move a r i t h m e t i c provides multiple-character manipulation.
The
c h a r a c t e r s a r e 6 b i t s long.
Characters can be moved from one CM l o c a t i o n t o
a n o t h e r , and f i e l d s of c h a r a c t e r s can be compared e i t h e r d i r e c t l y o r through a
c o l l a t e t a b l e .
The
moae
d i r e c t i n s t r u c t i o n
moves-
a f i e l d of up t o 127 c h a r a c t e r s from one
l o c a t i o n t o another l o c a t i o n as s p e c i f i e d i n t h e i n s t r u c t i o n .
The move
i n d i r e c t i n s t r u c t i o n performs t h e same kind of move, b u t a CM r e f e r e n c e
i s
used
t o
o b t a i n t h e parameters.
The move i n d i r e c t i n s t r u c t i o n moves a f i e l d of up t o
8181 c h a r a c t e r s .
The compare c o l l a t e d i n s t r u c t i o n compares two f i e l d s of up t o 127 c h a r a c t e r s .
When two c h a r a c t e r s a r e unequal, t h e c h a r a c t e r s a r e referenced
i n
a c o l l a t e
t a b l e , and t h e values a r e compared.
I f those values a r e unequal, t h e f i e l d
with t h e l a r g e r c h a r a c t e r i s i n d i c a t e d .
The compare uncollated i n s t r u c t i o n
compares
two
f i e l d s of up t o 127 c h a r a c t e r s and i n d i c a t e s the l a r g e r o f t h e
f i r s t c h a r a c t e r p a i r t h a t i s found t o be unequal.
CMU
i n s t r u c t i o n s a r e provided f o r c o m p a t i b i l i t y with previous systems.
For
b e t t e r performance, recompile jobs t o avoid use of CMU i n s t r u c t i o n s .
Need help?
Do you have a question about the Cyber 170 State and is the answer not in the manual?
Questions and answers