Differences

This shows you the differences between two versions of the page.

Link to this comparison view

instructions:hcl [2011/07/20 13:21] (current)
scott created
Line 1: Line 1:
 +===== Hypercall (HCL)/OP=62 =====
 +
 +==== Format ====
 +
 +^  OP  ^  AF  ^  BF  ^  A Syllable  ^  B Syllable  ^
 +
 +''OP = 35''
 +
 +**AFBF** Length, in bytes, of the parameter field. The maximum number of bytes moved is 9,999. A value of 0000 moves no data. Indirect field lengths can be specified. An AF literal of B1, B2, or B3 is interpreted as a length of 1, 2, or 3 characters in the A-location. All other literals cause an invalid instruction fault (IEX=22).
 +
 +The //A Syllable// is the address of the parameter data field operand. Address can be indexed, indirect, or extended. The final address controller must equal UA or cause an invalid instruction fault (IEX=03).
 +
 +The //B Syllable// is the address of a four digit function number.  Address can be indexed, indirect or extended.  The final address controller must equal UN or cause an invalid instruction fault (IEX=03) to occur.
 +
 +Each function entry contains the following information:
 +
 +^  Information   ^     Digits  ^
 +| Environment Number          | 00-05  |
 +| Next Instruction Address    | 06-11  |
 +| Protection Field (DD)       | 12-13  |
 +| Reserved                    | 14-15  |
 +| Interrupt Mask              | 16-17  |
 +| Task Enable Toggles         | 18-19  |
 +
 +^ Note: The lowest memory address is 00.^
 +
 +==== Function ====
 +
 +HCL enters a function in the MCP environment. The top of stack limit
 +is checked, and then the processor registers, state, and parameters
 +are stored on the stack of the called environment and control is
 +transferred to the specified function. HCL also does the following:
 +
 +  - Locates the 6-digit address, relative to the task MCP data area, of the hyper call function table at memory address 87, relative to the task MCP data area.
 +  - Uses the 4-digit function number (B) as an array subscript into the hyper call function table.\\  If the function number is not numeric, an address error fault (AEX=34) occurs, and the instruction terminates.\\ \\ If the resultant address exceeds the 6-digit hyper call function limit, located at memory address 94 relative to the task MCP data area, an address error fault (AEX=02) occurs, and the instruction terminates. \\ \\ If the protection field is not DD, an invalid instruction fault (IEX=37) occurs, and the instruction terminates.
 +  - Resolves the environment number, contained in the function entry to point to the selected environment table entry. However, the active environment number is retained so that it can be stored on the stack.
 +  - Resolves entry 0 of the MAT for the new environment and maintains addressability to base 0 of the current environment (see "Resolving a MAT Entry" in Section 1).
 +  - Stores the stack frame.\\ \\ The top of stack pointer (located at memory address 40, relative to base 0 of the new environment) is the starting address relative to base 0 of the new environment, where the hyper call stack frame is stored.\\ \\ The sum of the top of stack pointer, the size of the hyper call stack frame (96), the amount of parameters (2 X AFBF), and the size of the hardware call stack frame area (500) is compared to limit 0.  If the sum is equal to or greater than limit 0, a stack overflow fault occurs, and the instruction terminates. Otherwise, the hyper call stack frame is stored as follows:
 +
 +
 +                           Information                   Digits
 +   Old TOS  ==>       Accumulator                        00-27
 +                      Measurement Register               28-35
 +                      Interrupt Mask                     36-37
 +                      Mobile Index Registers             38-69
 +                      Task Enable Toggles                70-71
 +                      COM & OVF Flags                    72-73
 +                      Active Environment Number          74-79
 +   New IX3 ==>        Next Instruction Address           80-85
 +                      Saved IX3 Value                    86-93
 +                      Stack Frame Indicator (FE)         94-95
 +                      Stack Parameters (0 to 9999
 +                      bytes)
 +   New TOS  ==>
 +
 +
 +  - Moves the parameters, if any, from a location in memory (A) to the hyper call stack frame.
 +  - Stores the new address of the next available stack location, relative to base 0 of the new environment, into memory location 40, relative to base 0 of the new environment.
 +  - Sets the two most significant digits of IX3 to C0 and sets the six least significant digits of IX3 to the initial address specified in memory location 40, relative to the new environments base 0, plus 80. IX3 then points to the next instruction address in the hyper call stack frame.
 +  - Sets the machine state as follows:
 +
 +             Information                       Set To
 +      Next Instruction Address             Function table
 +      Active Environment Number            Function table
 +      Interrupt Mask                       Function table
 +      Task Enable Toggles                  Function table
 +      Measurement Register (user field)    000000
 +      Comparison and Overflow Flags        RESET
 +
 +  - Sets the name field of the measurement register with the most significant two digits of the register as follows:
 +
 +         Bit         State
 +           7  Set
 +           6  Set if privileged enable is set (from
 +              task enable toggles of function table)
 +         5-0  Unchanged
 +
 +    * Sets the MOPOK line to zero while the measurement register is being changed,and sets it to 1 at all other times.
 +    * If soft fault is now enabled, the soft fault pending flag in the reinstate list entry is checked. If the flag is not zero, a hardware call procedure stores the address of the next instruction to execute.
 +    * Loads the MAT pointed to by the active environment number.  
 +    * Uses the new base/limit information to resolve the next instruction address, relative to base 1, and then executes an unconditional branch to that address.
 +
 +^ Note: Do not use the mobile index registers or the accumulator to pass parameters.^
 +
  
instructions/hcl.txt ยท Last modified: 2011/07/20 13:21 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