Norsk Data Assembler
Encyclopedia
MAC was a Macro assembler for computers of the NORD-1
NORD-1
The NORD-1 was Norsk Data's first minicomputer. It was the first commercially available computer made in Norway.It was a 16-bit system, developed in 1967. The first NORD-1 installed was at the heart of a complete ship system aboard the M/S Taimyr, a Japanese-built cargo liner...

, NORD-10
NORD-10
NORD-10 was a medium-sized general-purpose 16-bit minicomputer designed for multilingual time-sharing applications and for real-time multiprogram systems, produced by Norsk Data. It was introduced in 1973...

, and ND-100 lines from Norsk Data
Norsk Data
Norsk Data was a computer manufacturer located in Oslo, Norway. Existing from 1967 to 1992, it had its most active period in the years from the early 1970s to the late 1980s...

.

Identifier length

Like many assemblers MAC placed a limit on the length of variable names, however, rather than simply disallowing names greater than the maximum length it only kept the last five letters of an identifier
Identifier
An identifier is a name that identifies either a unique object or a unique class of objects, where the "object" or class may be an idea, physical [countable] object , or physical [noncountable] substance...

, ignoring the first part of the name. The reason for keeping the last 5 was so that variables
Variable (programming)
In computer programming, a variable is a symbolic name given to some known or unknown quantity or information, for the purpose of allowing the name to be used independently of the information it represents...

 such as MY_ARRAY1 and MY_ARRAY2 would be distinguishable. The result was that the internal storage of some names was very strange and some times hard to understand as the names would be identical to names such as RRAY1 and RRAY2 respectively. This behavior caused some programmers to adopt the practice of writing only the last five letters of a name in their program code
Source code
In computer science, source code is text written using the format and syntax of the programming language that it is being written in. Such a language is specially designed to facilitate the work of computer programmers, who specify the actions to be performed by a computer mostly by writing source...

 as the assembler would ignore the rest anyway. Because of the difficulty faced by a human reader in understanding what was meant by the name, the code became much more difficult to understand. This resulted in less code reuse on the system.

Translation to machine code

Another peculiarity was that the assembler worked by adding together the "values" of all the symbols in an instruction to form the actual machine code. For example to copy the contents of the X register
Processor register
In computer architecture, a processor register is a small amount of storage available as part of a CPU or other digital processor. Such registers are addressed by mechanisms other than main memory and can be accessed more quickly...

 to the A register you would write:

COPY SX DA

Internally the assembler had a numerical value for "COPY", another value for "SX", and a third value for "DA". Adding them together yielded the actual machine instruction. However, if the programmer made a mistake and typed in (notice that both registers are "source" registers):

COPY SX SA

the machine would not do what was really intended by the programmer, nor would it throw an error. Instead the assembler would accept the program but it would not be translated into a COPY instruction. The SX + SA part would most likely result in either the value of some third register or would overflow so that the operation part of the instruction was modified changing it from copy to some other unintended operation.

Standard call library

Another issue for assembler programmers in general is the list of so-called monitor (MON) calls. The MON instruction is equivalent to the INT instruction found in Intel CPUs. However, while they originally had a nice set of functions to write to a file, read from a file, etc; it quickly devolved into an ad-hoc set of functions. An example being a function originally designed to output 8 bytes stored in 4 of the registers (A, D, T and X). Soon someone, having the bytes in some other registers, made a new function to output from those registers. This left the programmer with a veritable forest of output functions all doing almost the same thing. In the latter days of SINTRAN
SINTRAN
SINTRAN is the name of a range of operating systems for Norsk Data's line of minicomputers. The original version of SINTRAN, released in 1968, was developed by the Department of Engineering Cybernetics at the Norwegian Institute of Technology in cooperation with the affiliated research institute,...

 the problem then was to find available codes for these system calls as all 256 of them had already been taken by several such near identical functions. Thus, the extended multi-function monitor calls entered the scene where one monitor call could do a number of functions with a function code specified in a register designating which of its subroutines would be executed.

See also

  • NPL
    NORD Programming Language
    NPL was a programming language by the Norwegian minicomputer manufacturer Norsk Data. It shipped as a standard component of the operating system SINTRAN III....

  • PLANC
    PLANC
    PLANC is a high level computer programming language. The acronym stands for Programming LAnguage for Nd Computers.Compilers were developed by Norsk Data for several architectures, including the Motorola 68000, 88000, x86, and the Norsk Data NORD-10 minicomputer architecture and ND-500 supermini.The...

  • ND-100 series instruction set
The source of this article is wikipedia, the free encyclopedia.  The text of this article is licensed under the GFDL.
 
x
OK