Logical Exclusive OR
Organizational graphic tag to help group instructions

Mnemonic

 EOR

Short and Long format of instruction



Description

The contents of the accumulator are exclusive-ORed, bit by bit, with the contents of the addressed core-storage location. The result replaces the contents of the accumulator. Exclusive-ORing occurs only between corresponding bit positions in the accumulator and the core-storage word: bit 0 is exclusive-ORed only with bit 0, bit 1 only with bit 1, and so on. The four possible exclusive-ORing results are:


Bit Values    
From
Core Storage Word
  From
Accumulator
  Result
in Accumulator
0   0   0
0   1   1
1   0   1
1   1   0

Contents of the addressed core-storage word are not changed as a result of the operation. An example of exclusive-ORing is:

    0000 1111 0000 1111    Word in accumulator
EOR 1111 0000 0000 1111    Word from core storage
    1111 1111 0000 0000    Result in accumulator

There are no addressing exceptions for the logical exclusive-OR instruction; all forms of address ing that are described under "Effective-Address Generation" apply to the EOR instruction.

Indicators: The carry and overflow indicators are not affected during the EOR operation.

Programming Note: Typical uses for the exclusive OR instruction are shown below.

  1. Obtaining the complement of a number such as:
     0000 0000 0000 1111 Accumulator = 1510
     1111 1111 1111 1111 Storage mask = -110
     1111 1111 1111 0000 EOR result = -1610
    -1111 1111 1111 1111 Subtract storage mask = -(-110)
     1111 1111 1111 0001 Accumulator value = -1510
  2. Flipping and testing a switch such as:
    LD SWITCH Accumulator = XXXX XXXX XXXX XXXX
    EOR MASK Accumulator = XXXX XXZX XXXX XXXX
    STO SWITCH Location switch = XXXX XXZX XXXX XXXX
    AND MASK Accumulator = 0000 00Z0 0000 0000
    BSC L A, Z Branch to a specified location (A) if bit 6 was 0
    0000 0010 0000 0000 Mask in storage
    XXXX XXXX XXXX XXXX Switch value in storage

Examples

Logical Exclusive OR

Assembler Language Coding Hexadecimal Value Description of Instruction
Label   Operation   F T    
21 25
 
27 30
  32 33   35..40..
    EOR         DISP F0XX EOR contents of CSL at EA (I+DISP) with A
    EOR     1   DISP F1XX EOR contents of CSL at EA (XR1+DISP) with A
    EOR     2   DISP F2XX EOR contents of CSL at EA (XR2+DISP) with A
    EOR     3   DISP F3XX EOR contents of CSL at EA (XR3+DISP) with A
    EOR   L     ADDR F400XXXX EOR contents of CSL at EA (Addr) with A
    EOR   L 1   ADDR F500XXXX EOR contents of CSL at EA (Addr+XR1) with A
    EOR   L 2   ADDR F600XXXX EOR contents of CSL at EA (Addr+XR2) with A
    EOR   L 3   ADDR F700XXXX EOR contents of CSL at EA (Addr+XR3) with A
    EOR   I     ADDR F480XXXX EOR contents of CSL at EA (V in CSL at Addr) with A
    EOR   I 1   ADDR F580XXXX EOR contents of CSL at EA (V in CSL at "Addr+XR1") with A
    EOR   I 2   ADDR F680XXXX EOR contents of CSL at EA (V in CSL at "Addr+XR2") with A
    EOR   I 3   ADDR F780XXXX EOR contents of CSL at EA (V in CSL at "Addr+XR3") with A


But wait, there's MORE...

Valid HTML 4.01 Transitional