OP = 30
AFBF is a Function Address consisting of the low order four digits of an address that is relative to the specified Task's MCP Data Area. The high order digits are equal to zero. Indirect field lengths may be specified.
The Branch Communicate instruction is used to allow a user program to enter a function in the MCP environment. It stores processor state and registers in Hyper Call Stack Frame format on the stack of the called environment and passes control to the specified function.
Its function is similar to the function of the Hyper Call instruction except for the selection of the function entry and the inability to directly pass parameters.
The following operations are performed by this instruction:
Resolve the Environment Number, contained in the Function Entry, to point to the selected Environment Table Entry. However, retain the Active Environment Number so that it may be stored on the stack.
Resolve entry #0 of the Memory Area Table for the new environment from memory and maintain addressability along with base #0 of the current environment.
The top of stack pointer, located at address 40 (relative to the new environment's base #0), is used as the starting address, relative to the new environment's base #0, to store the Hyper Call Stack Frame.
The sum of the stack pointer and the size of the hyper call frame (96 digits) and the size of the hardware call stack frame area (500 digits) is compared to Limit #0. If the sum is equal to or greater than Limit #0, cause a Stack Overflow fault and terminate the instruction with no further action. Otherwise store the Hyper Call Stack Frame.
See Compatibility Notes A.56 for the accumulator format.
Store the new address of the next available stack location (relative to the new environment's Base #0), into memory location 40 (relative to the new environment's base #0).
Set the two most significant digits of IX3 to C0 and set the six least significant digits of IX3 to the initial address specified in memory location 40 (relative to the new environment's base #0) plus 80.
IX3 will now point to the Next Instruction Address in the Hyper Call Stack Frame.
Set the machine state as follows:
Set the Name field of the Measurement Register (most significant two digits of register) as follows:
|6||Set if Privileged Enable set (from task enable toggles of function entry)|
|5 - 0||Unchanged|
Set the MOPOK line to “zero” while the Measurement register is being changed and set it to a “one” at all other times.
If Soft Fault is now enabled, examine the soft fault pending field specified by the Reinstate List Entry pointer plus 8. If it is not equal to zero, execute a Hardware Call Procedure that will store the address of the next instruction to be executed.
Perform the Load Memory Area Table procedure passing the active environment number in the function table as parameter and setting the type of MA fault parameter to Soft.
Using the new Base/Limit information, resolve the next instruction address, relative to base #1, and execute an unconditional branch to that address.