mmwife
Super Moderator
Joined: 30 May 2003 Posts: 1592
|
|
|
|
Hi KS,
1) COMP-3 stores the sign inthe low order half byte of the field. Ex. -123 is strored as X'123D'; +123 as X'123C'; 123 as X'123F'.
COMP stores the sign in the hi order non-significant bits of the field. Ex. +1 is stored as B'00000001'. As you see the sign is zero; -1 is stored as
B'11111111', the sign is 1.
If you take the pos COMP +1 and "flip" each bit, you get B'11111110' then add B'1'. You get B'11111111' or X'FF'. That's how you change a pos COMP field to a neg field.
That's why you see a lot of move -1 to switches and such from IBM. It's really a way to set it to X'FF'.
2) SYNC aligns a COMP field on half or full word boundary.
3) +ve, good; -ve, bad.
4) OPT... the compiler makes your code more efficient. TEST - not sure. |
|