PROJECT: MAC REPLACEMENT PROJECT DOC. TYPE: TECHNICAL NOTE TITLE: Illegal Instruction Executive Functions and Calling Sequences SUBJECT: GROUP: SYSTEM EXTENSIONS AUTHOR: D.B.Curtis DOC NO.: 70 DATE: 25-JUN-79 15:46 FILE: ILLCODE.RNO MODIFIED: 19 JUL 79 16:58 PAGE 2 1.0 INTRODUCTION This document is a result of document #34. This and document #67 describe the use of hte illegal instruction executive functions. 1.1 Objectives This document describes the functions and calling sequences for the illegal instruction extensions to the RSX-11M executive. This document does not attempt to justify the extensions as this justification exists in the design specification ( document #34). This document describes the executive extensions and calling sequences. 1.2 Discussion The executive has the following additional functions: 1. Large Array Handling A set of functions that allow access to regions without being mapped to that region. 2.0 LARGE ARRAY HANDLING The task must first attach to a region. The region ID will be returned to the task. This region ID must be used in the calling sequence. If this ID is incorrect, the illegal instruction will cause an illegal instruction trap. 2.1 Usage (calling sequences) The instruction that starts the system function has the octal representation 210. The arguments of the instruction are on the stack. There are the following types. 1. TYPE 0 -- transfer word to user 2. TYPE 1 -- transfer word from user PAGE 3 3. TYPE 2 -- transfer block of words to user 4. TYPE 3 -- transfer block of words from user 5. TYPE 4 -- set a block of area to user specified value Each of these types have the following information on the stack at the time of the 210 instruction execution. This information is required for each type. Each type may have other information placed on the stack along with the required information. 10(SP) INDEX HIGH PART 6(SP) INDEX LOW PART 4(SP) REGION ID WORD OBTAINED FROM ATTACH REGION 2(SP) TYPE (SP) RAD50 REPRESENTATION OF "ILL" Where the INDEX is a 24-bit byte index into the region. For type 0: no more needed information For type 1: 12(SP) VALUE TO BE STORED IN THE REGION For type 2: 14(SP) NUMBER OF BYTES TO TRANSFER 12(SP) VIRTUAL ADDRESS TO TRANSFER TO For type 3: 14(SP) NUMBER OF BYTES TO TRANSFER 12(SP) VIRTUAL ADDRESS TO TRANSFER FROM For type 4: 14(SP) NUMBER OF BYTES TO SET 12(SP) VALUE TO SET INTO AREA All cases except type 0 finish the operation with the stack cleared. Type 0 returns the value obtained from the area on the stack. Carry clear implies operation completed successfully. Carry set implies an error, the stack is not cleared. The instruction will produce an illegal instruction AST for the following: 1. The instruction used to cause the trap is an illegal PAGE 4 instruction other than "210". 2. The first word of the user's stack is not the RAD50 representation of "ILL". 3. The TYPE argument is out of range. 4. The region specified does not exist or is not attached to the task. 5. The high part of the index is non-zero. The instruction will return carry set for the following: 1. If the index is odd. 2. If the index points outside the region. 3. If the block transfer/set would attempt access outside the region. 4. If the block transfer/set has a zero byte count. 3.0 GLOSSARY