HOME

TheInfoList



OR:

MAC was a
Macro assembler Macro (or MACRO) may refer to: Science and technology * Macroscopic, subjects visible to the eye * Macro photography, a type of close-up photography * Image macro, a picture with text superimposed * Monopole, Astrophysics and Cosmic Ray Observato ...
for computers of the NORD-1,
NORD-10 Nord-10 was a medium-sized general-purpose 16-bit computing, 16-bit minicomputer designed for multilingual time-sharing applications and for real-time computing, real-time multi-program systems, produced by Norsk Data. It was introduced in 1973. T ...
, and
ND-100 The Nord-100 was a 16-bit minicomputer series made by Norsk Data, introduced in 1979. It shipped with the Sintran III operating system, and the architecture was based on, and backward compatible with, the Nord-10 line. The Nord-100 was origina ...
lines from Norsk Data.


Limitations

The assembler had several snags which today would be considered exotic or strange.


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 An identifier is a name that identifies (that is, labels the identity of) either a unique object or a unique ''class'' of objects, where the "object" or class may be an idea, physical countable object (or class thereof), or physical noncountable ...
, ignoring the first part of the name. The reason for keeping the last 5 was so that variables 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 A computer language is a formal language used to communicate with a computer. Types of computer languages include: * Construction language – all forms of communication by which a human can specify an executable problem solution to a comput ...
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 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 This generational list of Intel processors attempts to present all of Intel's processors from the pioneering 4-bit 4004 (1971) to the present high-end offerings. Concise technical data is given for each product. Latest 13th generation Core ...
. 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 (a portmanteau of SINTEF and Fortran; stylized as SINTRAN) is a range of operating systems (OS) for Norsk Data's line of minicomputers. The original version of Sintran, was written in the programming language Fortran, released in 1968, ...
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.


References

{{Norsk Data Assemblers Norsk Data software