Nova Assembly Language

Note: This area is still under construction.

Nova assembly is actually fairly easy to understand. Unfortunately, most of the docs written to describe the language were written by hardware engineers, and they tend to provide an extensive education in machine code and hardware design at the same time as the assembler syntax, which can be overwhelming at times. This will be an attempt to describe the language with as little hardware info as necessary (some info is required, since assembler code is a direct representation of the physical bits, bytes, and words residing in memory).

Minimal Hardware Basics

  • Everything is in octal.
  • CPU has 200000 words of memory (65536, dec). Other configurations are possible, but no one ever uses them.
  • Each word of memory is 16 bits (dec). Since each octal digit represent 3 bits, the largest unsigned binary value that can be stored in a word is represented by 177777 (which is 65535 decimal, or 2^16-1).  See Diagram.
  • Words in memory are always referenced by their memory address, which ranges from 0 to 177777.
  • A word in memory can be data or an instruction to be executed.
  • All execution takes place in the lower half of memory (0-77777). The upper half (100000-177777) is for data only. Of course, a lot of data items are in the lower half as well.
  • The first 400 words of memory (0-377) are called Page Zero. They are special, because they are always available to every executing routine.
  • Page zero as used by  IRIS :
    • most of locations 0-77 are used to hold commonly needed constants, like 377 (for masking 8-bit bytes), 215 (carriage return), and 400 (block size).
    • most of 100-177 contain pointers to system subroutines that do basic tasks such get a byte, store a byte, start output, start input, etc.
    • 200-377 are left for runnable programs to use as desired. All processes such as RUN, BASIC, LIBR, COPY, FORMAT, etc, all decide how they want to use this half of page zero.
  • In addition to memory there are also 4 registers, 16 dec bits each, usually called accumulators (abbreviated AC in the docs) and numbered 0-3. Most of the work in the machine is done with the ACs. In docs they are often referred to as AC0, AC1, AC2, AC3.
  • There is also a one-bit register called ‘Carry’ which is only used by arithmetic instructions.
  • There are four types of instructions understood by the CPU.
    • Memory reference: Four sub-types include (a) move a single word from memory to an AC or from an AC to memory; (b) increment or decrement a word in memory; (c)  Jump to a different address during execution.
    • Arithmetic: examples include, Add one AC to another;  Subtract one AC from another; Increment an AC.
    • Input/Output: Three sub-types include (a) Data transfer between an AC and a device, either direction; (b) test device status; (c) send one of three control signals to a device.
    • Special CPU commands: examples include: Read front panel switches; enable interrupts; halt execution.

Preliminary Notes on Assembler Syntax

  • Each line of code translates into a single 16-bit (dec) word which is a machine code instruction.
  • All instructions are represented by a base 3-character mnemonic, such as LDA, ADD, DOA, followed by optional qualifiers, a space, and additional parameters for the instruction.
  • Additional qualifiers which can be directly appended to the initial 3 characters provide special functions in the resulting machine instruction For example, ADDZL# or DOAP.
  • Comments begin with a semi-colon, and can occur anywhere in the text. Anything on the line after the semi-colon is ignored by the assembler.
  • There are also a few special commands that tell the assembler how to handle the process, such as the address where to begin assembly, or how to include ASCII characters in the code.

How to use the IRIS Assembler program.

Leave a Reply