Enter (NTR)/OP=31



OP = 31

AFBF is the length, in bytes of the Parameter field. The maximum number of bytes moved is 9,999. A value of 0000 will move no data. AF or BF may specify indirect field length. A literal flag will cause an Invalid Instruction (**IEX = 21**) fault (see Compatibility Notes A.19.1).

A is the branch address. The address may be indexed, indirect or extended. When not extended, the final address controller bits specify the most significa nt digit of the address. This permits branching to any address up to and includ ing 299,998, relative to Base #1, without indexing or extenion. When the addre ss is indexed, the final Base Indicant should resolve to a value of 1. The processor will always treat the resolved addres as being relative to Base #1. T he processor will not check for improper memory assignments. When indexed by IX 3, the initial contents of IX3 are used.

PARAMETERS is the data field to be stored in the stack and consists of the next AFBF bytes following the A operand in the instruction stream.

Note: To allow reentrant calls to local functions it is recommended to use the VEN instruction in place of NTR. The NTR instruction should be considered deprecated in new code.


The Enter instruction stores control information and parameters into a stack loc ated in memory and executes an unconditional branch to the instruction at the A address.

A six-digit address containing the stack location, relative to Base #0, is speci fied in memory location 40 relative to Base #0.

The Enter Stack Frame is stored in the following seqeunce:

Information Digits
Old TOS ⇒ Next Instruction Address 00-05
Saved IX3 Value 06-13
Reserved 14
COM and OVF flags 15
Stack Parameters (0 to 9,999 bytes) 16-xx
New TOS ⇒

Set the two most significant digits of IX3 to C0. Set the contents of IX3 to the initial address specified in memory location 40 relative to Base #0.

Store the new value of the next available stack location, relative to Base #0, into memory location 40 relative to Base #0.

If the address to be stored in location 40 exceeds six digits, cause an Invalid Instruction (**IEX = 04**) fault. See Compatibility Notes A.19.2.

Comparison Flags

The Comparison Flags and Overflow Flag are set to NULL and No Overflow for the called function.


Undefined results will be produced if the stack area overlaps with the instruction or it's parameters.


Example (1) Enter

Address OP AFBF A Syllable Parameters
003016 31 0003 020166 203010
                    BEFORE         AFTER
       NI           003016        020166
      IX3         +0000010      +0001024
   000040           001024        001046    Top Of Stack
   001024           nnnnnn        003034    NI After parameters
                                +0000010    IX3 Value
                                       0    Zero Digit
                                       5    COM & OVF flags
                                  203010    Parameters
  COMPARISON         HIGH           NULL
  OVERFLOW            nn             OFF
instructions/ntr.txt · Last modified: 2013/01/26 15:35 by scott
Except where otherwise noted, content on this wiki is licensed under the following license: CC Attribution-Noncommercial-Share Alike 3.0 Unported
Recent changes RSS feed Donate Powered by PHP Valid XHTML 1.0 Valid CSS Driven by DokuWiki