Data General Nova
Extended Instructions

    Certain late- model Novas, and the MicroNOVA class machines have certain features that distinguish them from the earlier machines. Most notably these include stack instructions, hardware multiply/ divide, and, in the Nova 4, byte manipulation and trap capabilities. Late model Novas also have additional dedicated memory locations above and beyond earlier systems.

    These extended abilities were implemented using I/O instructions pointing to device number one - the Multiply/ Divide device in the early Novas. Hence, all the instructions presented here will use the standard I/O form of:

       0 1 1             Transfer           /----- Device Code --------\
   /           \       /          \        /                            \
   | 0 | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 |
               \      /            \       /
                  AC                Control

    I'm not going to detail all the possible bit positions using the above diagram, but am going to describe the instructions using the assembler format. Refer to the basic I/O instruction document for bit coding of the individual options.

Nova Multiply/Divide

    First, let's have a look at the multiply/ divide instructions. These were optional on most of the early Nova- class machines but became standard on the MicroNOVAs.


MUL - MULtiply (MUL)
The multiply instruction takes two 16 bit operands, stored in AC1 and AC2, and multiplies them together forming a 32 bit result in AC0 and AC1; AC2 remains untouched. The assembler trnaslates the MUL opcode into a DOCP 2,MDV operation. (MDV is the symbolic definition of device 1 - the multiply/ divide option.)

AC0 is special in this case, as the instruction takes the 16 high- order bits of the multiplication result and adds them into AC0.

DIV - DIVide (DIV)
The divide instruction, obviously enough, performs the reverse of the multiply operation in that it takes a 32- bit dividend in AC0 and AC1 (high- order bits in AC0) and divides this quantity by the contents of AC2. The 16- bit quotient is placed into AC1 and the remainder is placed in AC0. AC2 remains unchanged. The DIV mnemonic is translated to a DOCS 2,MDV by the assembler.

Nova Stack Instructions

    Machines commencing with the Nova 3 sport hardware stacks, as do the members of the MicroNOVA family. These facilities greatly ease the handling of subroutines and facilitate the writing of re-entrant code. Basic capabilities like Push and POP are supported as well as some more advanced features. I'll discuss each in turn.

    All the stack instructions are, in fact, translated into I/O instructions by the assembler. The device number for all of them is 1 - the same as for the optional hardware multiply/ divide.


MTSP - Move To Stack Pointer (MTSP AC)
This instruction moves the specified AC to the Nova's stack pointer, thereby initialising the stack for operation. This must be done before using the stack! This instruction is translated into a DOA AC,1 by the assembler.

MFSP - Move From Stack Pointer (MFSP AC)
This instruction transfers the 15-bit quantity in the stack pointer and places it into the specified AC. This instruction equates to a DOAC AC,1 in the assembler.

MTFP - Move To Frame Pointer (MTFP AC)
Initialises the 15- bit Frame Pointer with the contents of the specified AC. This step must be taken before the Frame Pointer is used. The assembler converts the MTSP AC to a NIO AC,1 I/O instruction.

MFFP - Move From Frame Pointer (MFFP AC)
Copies the current 15- bit contents of the Frame Pointer to the specified AC. The assembler converts the MFFP AC to a NIOC AC,1 I/O instruction.

PSHA - PuSH an Ac to the stack (PSHA AC)
This increments the stack pointer by one and stores the contents of the specified AC at the resulting location. The PSHA AC notation is translated to a DIB AC,1 by the assembler.

POPA - POP an Ac from the stack (POPA AC)
This operation pops an AC from the stack by loading the specified AC with the contents of the memory location specified by the Stack Pointer then decrementing the Stack Pointer by one. The assember converts the POPA AC notation to a DIBC AC,1 for execution.

SAV - Push a return block onto the stack (SAV)
This instruction pushes a 5 word "return block" onto the stack for later retrieval by a "RET" instruction. The contents of the return block are as follows:
  1. Accumulator 0
  2. Accumulator 1
  3. Accumulator 2
  4. Frame Pointer
  5. Bits 1-15 of AC3 + the carry bit (in bit 0)

        Once the return block is pushed, the machine loads the updated contents of the stack pointer into the Frame pointer and AC3.

    NOTE: The SAVe instruction is intended to be called immediately following the execution of a JSR instruction and entry into a subroutine. At this point in time, AC3 will contain the return address for the subroutine.

    The assembler interprets the SAV as a DIC AC,1 I/O instruction.

RET - Pop a "return block" from the stack (RET)
This instruction pops a "return block" from the stack which was written by the "SAV" instruction. Items popped from the stack are:
  1. Bits 1-15 of the Program Counter and the Carry bit
  2. Accumulator 3
  3. Accumulator 2
  4. Accumulator 1
  5. Accumulator 0

        Once the block is popped, the instruction loads the updated contents of AC3 into the Frame Pointer. Program execution continues from the PC value loaded from the stack.

    The assembler interprets the RET as a DICC AC,1 I/O instruction.

    Memory integrity is protected from runaway stacks by the stack protection mechanism. This facility causes a trap to location 3 in page zero when the stack pointer is incremented (or decremented) across a page boundary.

    When a stack fault occurs, the address of the offending instruction is placed into page zero location 0 and the processor executes an indirect jump through page zero address 3. This is essentially the same as a standard Nova interrupt. Note that interrupts must be enabled for a stack fault to occur.

Byte Manipulation Instructions

    Beginning with the Nova 4, machines began to include byte- pointer instructions thereby lessening the burden on programmers by allowing them to forget about swapping bytes within words (remember that the NOVA is word addressed and accessed, not byte addressed). Like the stack instructions, these resemble I/O instructions addressed to device one.

    The byte pointers used in these instructions are compatible with the the older style ones, which is to say that the pointer is formed by taking the word address, shifting it left one bit position thereby leaving bit 15 to specify which byte is to be manipulated.

    There are two byte manipulation instructions, LDB and STB which will be described here. The instructions appear in memory in this format:

                        001 or 100
       0 1 1            LDB    STB                  0 0 0 0 0 1
   /           \       /          \        /                            \
   | 0 | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 |
               \       /           \       /
                  ACD                 ACS

LDB - LoadD Byte (LDB acs, acd)
The load byte instruction takes the 8-bit byte addressed by the contents of source AC (acs) and places it into the destination AC (acd). Bits 0-7 of the destination AC are set to zero.

The assembler codes the instruction as DIA ACD, and puts the ACS specifier into the Transfer field. See the above diagram.

STB - STore Byte (STB acs, acd)
Functioning in reverse of the LDB instruction, STB takes the right half of the source AC and places it into the memory location addressed by the byte pointer in the Destination AC.

The assembler codes the instruction as DOB ACD, and puts the ACS specifier into the Transfer field. See the above diagram.

The Nova 4 Trap Instruction

    In a bow the Eclipse line, and in recognition that the machine classes were close enough to one another that programs written on the Nova class could execute natively on the Eclipse machines, the Nova 4 included the trap instruction designed to catch Eclipse- specific instructions. Creative programmers could use this facility to emulate lots of the Eclipse instructions on a Nova 4 if they so desired. The instruction appears thusly in memory:

     1            ACD                                      1 0 0 0
   /   \       /       \                             /                  \
   | 0 | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 |
       \       /       \                             /
          ACS                    Trap Number             

    The observent reader should note that this is an ALC instruction with the no-load bit set and the never skip option selected. This is a combination which normally would never occur in general usage as it serves no function, other than as a no-op. It gets coded as follows:

TRAP - Trap to location 47 (TRAP acs, acd, trap_number)
Upon encountering this instruction the Nova 4 will, if running in user mode (mapped machines only), disable the user map, save the address of the trap instruction to location 46(8) in page zero, and jump indirect through location 47(8). Unlike and interrupt, this instruction doesn not change the state of the ION bit.

Magic Memory Locations

    In addition to the standard Nova interrupt locations 0 and 1 in page zero, the extended Novas reserve three other words for trap purposes. These are:

    The first was discussed in the previous section on stack instructions. The second two reflect the direction that the 16- bit DG line was taking at the time and presage the coming of the Eclipse extended instructions.

    In the later Nova processors, if an ALC instruction is encountered that has the "No Load" bit set AND has a "never skip" option coded into it the machine assumes that the instruction is an Eclipse construct and traps, first storing the address of the offending instruction in location 46 then jumping indirectly through location 47.

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

Copyright © 1997 - 2003, Carl R. Friend. All rights reserved.
Webspace design by: Carbon & Silicon Alliance

Comments to:
Last Modified: Sun Jul 5 10:53:50 EDT 1998