• Keine Ergebnisse gefunden

COMPARE INSTRUCTIONS .1 Comparative AND (34)

Im Dokument instruction book (Seite 50-54)

operation repertoire

4.4 COMPARE INSTRUCTIONS .1 Comparative AND (34)

The logical product (AND) of the content of the effective address (m) and the content of the accumulator specified in the M field is formed. If A or B is the specified accumulator, all 32 bits of the word specified by

4-20 Revised 30 June 1970

operation repertoire

the effective address participate in the operation. If D is the specified accumulator, all 64 bits of the double-word specified by the effective address participate in the operation. The result of the AND operation (r) is compared to the content of the effective address. If equality is not found, r is compared to zero. The results of these comparisons are reflected in the condition indicator settings as described below:

RESULT OF

AND OPERATION RELATION

CONDITION INDICATOR SETTING

r =m 1

r = 0 but t= m 2

r = any other value 3

The content of the specified accumulator is not altered by the instruction.

The M field is set as follows:

01 - accumulator A 10 - accumulator B 11 - accumulator D

The C field must be set to one; otherwise the instruction is treated as a no operation.

All addressing modes are applicable. All combinations of values of the I, L, and X fields are permitted. In the instance where L equals one, the leftmost bit of the address field is propagated to the left to form a 32-bit or 64-bit operand.,

4.4.2 Compare Logical Accumulator (17)

The content of the specified accumulator is compared to the content of the memory location specified by the effective address. The condition indicator reflects the result of the comparison. The logical compare operation treats both operands as unsigned binary integers; that is, the leftmost bit is not treated as a sign bit. The specified accumulator and memory remain unaltered after the comparison.

The M field specifies the accumulator involved in the operation (A, B, or D) and thus determines the size of the operand (word or double-word). The M field is set as follows:

01- accumulator A 10 - accumulator B 11- accumulator D

For comparison operations, the C field must be set to one; otherwise the instruction is treated as a no operation.

The possible condition indicator values for this instruction are as follows:

1 - accumulator content less than memory 2 - accumulator content equal to memory 3 - accumulator content greater than memory

All addressing modes are applicable. In the instance where that L equals one, the 18 bits of the address field, prefixed with bits equal to the leftmost bit of the address field, form the 32-bit or 64-bit operand.

Revised 30 June 1970 4-21

operation repertoire

4.4.3 Compare Logical Half-Word (10)

The half of accumulator A specified in the M field is compared to the half-word specified by the effective address. The condition indicators reflect the result of the operation. The logical comparison operation treats both operands as unsigned binary integers. The specified accumulator and memory remain unaltered by the comparison.

The M field is set as follows:

01 - left half 10 - right half

For comparison operations, the C field must be set to one; otherwise the instruction is treated as a no operation.

The possible condition indicator vaiues for this instruction are as follows:

1 - accumulator half-word less than memory 2 - accumulator half-word equal.to memory 3 - accumulator half-word greater than memory

Note that only the specified half-word of the accumulator is considered in the comparison.

All addressing modes are applicable. In the instance where L equals one, the rightmost 16 bits of the address field form the operand .

. 4.4.4 Compare Logical Byte (OB)

The byte in accumulator A specified in the M field is compared to the byte specified by the effective address. The condition indicator reflects the result of the operation. The logical comparison operation treats both operands as unsigned binary integers. The specified accumulator and memory remain unaltered by the comparison.

The M field is set as follows:

00 - byte 1 (leftmost byte) 01- byte 2

10 - byte 3 II-byte 4

For comparison operations, the C field must be set to one; otherwise the instruction is treated as a no operation.

The possible condition indicator values for the instruction are as follows:

1 - accumulator byte less than memory 2 - accumulator byte equal to memory 3 - accumulator byte greater than memory

Note that only the specified byte in the accumulator is considered in the comparison.

All addressing modes are applicable. In the instance where L equals one, the rightmost 8 bits of the address field form the operand.

4-22 Revised 30 June 1970

operation repertoire

4.4.5 Compare to Zero (15)

The content of either the specified accumulator or the effective address is algebraically compared to zero.

The condition indicator reflects the result. Algebraic comparison considers the operands as signed integers.

The specified accumulator and memory remain unaltered by the comparison.

The M field indicates that either the accumulator (A, B, or D) or memory is to be compared to zero. In the latter instance, the content of the effective address (a word) is algebraically compared to zero.

The M field is set as follows:

00 - memory 01 - accumulator A 10 - accumulator B 11 - accumulator D

For comparison operations, the C field must be set to one; otherwise the instruction is treated as a no operation.

The possible condition indicator values for this instruction are as follows:

1 - accumulator (or memory) content less than zero 2 - accumulator (or memory) content equal to zero 3 - accumulator (or memory) content greater than zero.

If the M field specifies that a memory word is to be compared, direct addressing, indirect addressing, and indexing are applicable. The L field is ignored. If the M field specifies A, B, or D, the I, X and address fields are ignored.

4.4.6 Compare Index (16)

The content of the index register specified in the M field is logically compared to the memory word specified by the effective address. The condition code reflects the result of the operation. Logical comparison treats both operands as unsigned binary integers. The index register and memory remain unaltered by the comparison.

The M field is set as follows:

01 - index register 1 10 - index register 2 11 - index register 3

For comparison operations, the C field must be set to one; otherwise the instruction will be treated as a no operation.

The possible condition indicator values for this instruction are as follows:

1 - index register content less than memory 2 - index register content equal to memory 3 - index register content greater than memory

All addressing modes are permitted. In the instance where L equals one, the entire address field forms the operand.

Revised 30 June 1970 4-23

I

I

operation repertoire

I

4.4.7 Compare Selective (35)

Each bit of accumulator A is compared with the corresponding bit of the word specified by the effective address, provided the corresponding bit of accumulator B is one. That is, if the nth bit of accumulator B is one, then the nth bit of the memory word and the nth bit of accumulator A are compared. Bits of accumulator A and the memory word corresponding to zero bits of accumulator B are not compared. Thus, the content of accumulator B form a mask, which controls the comparison.

The M field is ignored for this operation.

For comparison operations, the C field must be set to one. Otherwise the instruction is treated as a no operation.

The possible condition indicator values for this instruction are as follows:

1 - none of the bits compared are equal 2 - all the bits compared are equal

3 - some but not all of the bits compared are equal

All addressing modes are applicable. In the instance where L equals one, the leftmost bit of the IS-bit address field is propagated to the left to form a 32-bit operand.

I

4.4.8 Compare Algebraic (14)

The content of the accumulator specified in the M field is algebraically compared to the content of the memory location specified by the effective address. The condition indicator reflects the result of the comparison. Algebraic comparison treats both the accumulator content and the memory content as signed binary integers. The specified accumulator and memory remain unaltered by the comparison.

The M field is set as follows:

01 - accumulator A 10 - accumulator B 11 - accumulator D

For comparison operations, the C field must be set to one. Otherwise the instruction will be considered a no operation.

The possible condition indicator values for this instruction are as follows:

1 - accumulator content less than memory 2 - accumulator content equal to memory 3 - accumulator content greater than memory

All addressing modes are applicable. In the instance where L equals one, the sign (leftmost) bit of the IS-bit address field is propagated to the left to form a 32-bit or 64-bit operand.

4.5 ARITHMETIC INSTRUCTIONS

Im Dokument instruction book (Seite 50-54)