Data General NOVA ®
Arithmetic/Logic Instructions

    This page describes the Arithmetic and Logic class of instructions in the Nova set. Other pages describe:


    The ALC (Arithemtical/Logical Class) in the NOVA is used to perform all operations requiring the use of arithmetic or logical manipulation of bit-fields. All instructions in this class involve two accumulators (ACs) and the Carry bit. Memory is never referenced, save for the instruction fetch. All the instructions in this class have a common format:

              Destination            Shift             No
     1        Accumulator           Control           Load
   /   \       /       \           /       \         /    \
   +---+---+---+---+---+---+---+---+---+---+----+----+----+----+----+----+
   | 0 | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 |
   +---+---+---+---+---+---+---+---+---+---+----+----+----+----+----+----+
       \       /       \           /       \         /    \              /
         Source           Function            Carry             Skip        
       Accumulator                           Control           Control

    Beyond the base function, specified by the "Function" bit-field above, the machine may be instructed to perform other operations both before and after the function is executed.

    Bit zero in the Arithmetic/Logic class is always a one. This distunguishes the class from the I/O and MRI classes.

    The two ACs which are to participate in the operation are specified by the "Source AC" and "Destination AC" with the Destination AC being the one which (optionally) receives the result of the operation. The Source and Destination specifiers may refer to the same accumulator.

    The "Function" field specifies the basic operation to be performed; there are eight possible operations, each with their own unique OPcode which will be discussed below.

    Before the operation is executed, the programmer has the option of initialising the Carry bit to some known value, flipping its current state, or leaving it alone. This is specified in the "Carry Control" field by appending "Z", "O", or "C" to the basic OPcode. The default action is to leave Carry untouched. The possibilities are:

    After Function is performed, the programmer may specify that the result be shifted either right or left by one bit- position or that the halves of the word be swapped. These options are specified in the "Shift Control" field by coding a "L", "R", or "S" in the OPcode. The two shift operations function as rotates and involve the Carry bit. The values of the field, and their functions are:

    Optionally, it is possible to discard the results of Function. This is useful if it desireable to merely test the outcome of an operation but the result need not be saved. This is usually used in conjunction with the Skip field, discussed next. Bit 12, the "No-Load" bit, is set by the programmer by adding a "#" to the OPcode.

    Finally, a decision may be made to skip the next instruction in the sequence, or not, based on the result of Function. Skips are coded by the programmer by appending a ",Skip-OP" following the Destination AC. The possible skips are:

    NOTE: In coding for the Nova, it is vitally important that the "No-Load" and "Never Skip" options are never coded together. This bit configuration is used by later Novas and the Eclipse line to implement extended instructions.

    Each of the ALC instructions will now be discussed in turn by their respective functions.


The Instructions


Add (ADD)

Function code bits: 110
Function:
   The ADD instruction arithmetically adds the contents of the Source AC to the Destination AC and places the result in the Destination AC. If a carry is propagated from bit zero the Carry bit is inverted. The original contents of the Destination AC and Carry are lost if the No-Load option is not set. The contents of the Source AC are not altered.

Assembler Syntax:
ADD[O|Z|C][L|R|S][#]    ACS, ACD[, Skip-op]

Example:
Start:    AC0=2, AC1=2, C=0, PC=452
Function: ADD 0, 1, SNR
Finish:   AC0=2, AC1=4, C=0, PC=454


Add Complement (ADC)

Function code bits: 100
Function:
   The ADC instruction arithmetically adds the one's complement of the Source AC to the Destination AC and places the result in the Destination AC. If the addition causes a carry to be propagated from bit zero, or if the contents of the Source AC is less than the contents of the Destination AC, the carry bit is inverted. The original contents of the Destination AC and Carry are lost if the "No-Load" option is not set. The contents of the Source AC are not altered.

Assembler Syntax:
ADC[O|Z|C][L|R|S][#]    ACS, ACD[, Skip-op]

Example:
Start:    AC0=10, AC1=45, C=0, PC=553
Function: ADC 0, 1, SZC
Finish:   AC0=10, AC1=34, C=1, PC=554


Logical AND (AND)

Function code bits: 111
Function:
   The AND instruction performs a logical AND on the contents of the Source AC and the Destination AC and places the result in the Destination AC. Carry does not participate in the operation unless a rotate operation is also specified. The original contents of the Destination AC are lost unless the "No-Load" bit is set. The Source AC is unaffected.

Assembler Syntax:
AND[O|Z|C][L|R|S][#]    ACS, ACD[, Skip-op]

Example:
Start:    AC0=123456 (1010011100101110), AC1=377 (0000000011111111), C=1
Function: ANDZ 0, 1
Finish:   AC0=123456 (1010011100101110), AC1=56  (0000000000101110), C=0


Complement (COM)

Function code bits: 000
Function:
   The COM operation forms the one's complement of the Source AC (by inverting it) and places the result into the Destiantion AC. Carry is unaffected unless a rotation operation is also specified. The original contents of the Destination AC are lost unless the "No-Load" bit is set. The Source AC is unaffected.

Assembler Syntax:
COM[O|Z|C][L|R|S][#]    ACS, ACD[, Skip-op]

Example:
Start:    AC2=10, AC3=20, C=0, PC=1534
Function: COM 2, 3, SKP
Finish:   AC2=10, AC3=177767, C=0, PC=1536


Increment (INC)

Function code bits: 011
Function:
   The INC operation increments the contents of the Source AC by one and places the result into the Destination AC. If a carry is forced from bit zero by the operation, the Carry bit is complemented. The original contents of the Destination AC and Carry are lost unless the "No-Load" bit is set. The Source AC is not altered.

Assembler Syntax:
INC[O|Z|C][L|R|S][#]    ACS, ACD[, Skip-op]

Example:
Start:    AC1=10, AC2=20, C=0, PC=376
Function: INC 2, 1, SEZ
Finish:   AC1=21, AC2=20, C=0, PC=1000


Move (MOV)

Function code bits: 010
Function:
   The MOV operation moves the contents of the Source AC to the Destination AC. The Carry bit does not participate in the operation unless one of the rotate options is set. The original contents of the Destination AC are lost unless the "No-Load" bit is set.

Assembler Syntax:
MOV[O|Z|C][L|R|S][#]    ACS, ACD[, Skip-op]

Example:
Start:    AC0=150, AC3=20, C=0, PC=3021
Function: MOVS 0, 3, SNR
Finish:   AC0=150, AC3=6400, C=0, PC=3023


Negate (NEG)

Function code bits: 001
Function:
   The NEG operation takes the two's complement of the contents of the Source AC and places it in the Destination AC. The original contents of the Destination AC and Carry are lost unless the "No-Load" bit is set. The Source AC is unaffected.

Assembler Syntax:
NEG[O|Z|C][L|R|S][#]    ACS, ACD[, Skip-op]

Example:
Start:    AC2=150, AC1=20, C=0, PC=5571
Function: NEG 2, 1, SZR
Finish:   AC2=150, AC1=177630, C=0, PC=5572


Subtract (SUB)

Function code bits: 101
Function:
   The SUB operation arithmetically subtracts the contents of the Source AC from the contents of the Destination AC and places the result in the Destination AC. Both operands are unsigned. If the value in the Source AC is less than, or equal to, the value in the Destination AC the Carry bit is inverted. The contents of the Destination AC and Carry are lost unless the "No-Load" bit is set.

   The operation "SUBO AC, AC" is useful for zeroing both an AC and carry at the same time.

Assembler Syntax:
SUB[O|Z|C][L|R|S][#]    ACS, ACD[, Skip-op]

Example:
Start:    AC1=725, AC2=1042, C=0, PC=7024
Function: SUB 1, 2, SZC
Finish:   AC1=725, AC2=115, C=1, PC=7025


    This page described the arithemetical and logical instructions of the Data General Nova minicomputer. Other pages describe:



[ Museum Lobby ] [ Museum Catalogue ] [ Carl's Homepage ]


Copyright © 1998 - 2003, Carl R. Friend. All rights reserved.

Comments to: carl.friend@rcsri.org
Last Modified: Sun Sep 13 11:35:43 EDT 1998