Differences

This shows you the differences between two versions of the page.

Link to this comparison view

instructions:iad [2011/07/21 15:55] (current)
scott created
Line 1: Line 1:
 +===== Integer Add (IAD)/OP=50 =====
 +
 +==== Format ====
 +
 +^  OP  ^  A Syllable  ^  
 +
 +''OP = 50''
 +
 +**A** is the address of the addend field and can be indexed, indirect, or extended. The data type of the final address controller is ignored and is always treated as SN.
 +
 +==== Function ====
 +
 +IAD adds the integer stored in memory location (A) to the integer
 +stored in the accumulator and then stores the sum in the accumulator.
 +
 +The signs of both the accumulator and the addend are considered as
 +part of the addition and the mantissa sign field is set positive or
 +negative based on the result.
 +
 +The signed exponent field of the accumulator is set to +08 by this
 +instruction even in the case of overflow.
 +
 +If the operand data contains undigits other than in the sign digit, an
 +Invalid arithmetic data fault occurs (see [[compatibility_notes:a16|Compatibility Notes A.16]]).
 +
 +See [[arithmetic:fixed_point|Arithmetic - Fixed Point]] for further details.
 +
 +==== Overlap ====
 +
 +There are no overlap restrictions for this instruction.
 +
 +==== Comparison Flags ====
 +
 +If the addition produces a result greater than seven digits:
 +  - Set the overflow flag, and the [[processor_state:comparison_flags|comparison flags]] to **HIGH**.
 +  - If trap faults are enabled, cause a [[procedures:hcl_procedure|Hardware Call]] procedure.
 +  - The final contents of the accumulator are unspecified.
 +
 +If there is no overflow condition:
 +  - the comparison flags are set **HIGH** when the result is positive, **EQUAL** when the result is zero, or **LOW** when the result is negative.
 +
 +==== Examples ====
 +
 +=== Example (1) Add integer to accumulator ===
 +
 +^  OP  ^  A Syllable  ^  
 +|  50  |  A field **SN**  |  
 +
 +
 +                      BEFORE                   AFTER
 +    A FIELD           +1111111               unchanged
 +    ACCUMULATOR     +08+01234567           +08+02345678
 +    COMPARISON          nn                     HIGH
 +    OVERFLOW            nn                   unchanged
  
instructions/iad.txt ยท Last modified: 2011/07/21 15:55 by scott
 
Except where otherwise noted, content on this wiki is licensed under the following license: CC Attribution-Noncommercial-Share Alike 3.0 Unported
Recent changes RSS feed Donate Powered by PHP Valid XHTML 1.0 Valid CSS Driven by DokuWiki