Previous Topic: KEY StatementNext Topic: BRANCH Statement


ADD and COMPARE Statements

The following ADD statement increments the accumulator A1 each time the loop is executed. The following COMPARE statement then compares the values of the accumulators A1 and A2.

ADD A1,1 
COMPARE A1,A2

When a COMPARE statement compares two values, it produces a condition code representing the relationship between them. In this program, a condition code of LT (less than) indicates that A1 is still less than A2. The condition code is then examined by the BRANCH statement.