• Keine Ergebnisse gefunden

Unimplemented Operations

Im Dokument UPDATE NOTICE (Seite 183-187)

Codes not assigned as specific instructions act as unimplemented opera- tions, wherein the word given as an instruction is trapped, either because it should not be given or because it must be interpreted by a routine included for this purpose by the programmer. Those that are available for interpre- tive use are unimplemented user operations, or UUOs (the several mnemonics mentioned in this discussion are for convenience and mean nothing to the assembler). Codes in the range 001-037 are for the local use (LUUOs) of the user anywhere or the Monitor in section 0. Various other codes are set aside specifically for user communication with the Monitor or for communication between one level of the Monitor and another; in either case these MUUOs are interpreted by the executive. Basic codes (except 000) that are not used for instructions or UUOs, and extended codes not used by EXTEND, are regarded as the “unassigned codes”; 000 is not re- garded as a legal code at all. Let us consider first how an LUUO works.

Local Unimplemented User Operation

001-037 n / x Y

0 8’) I2 13 14 17 IX 35

If the program is running in section 0, store the instruction code, A and the effective address E in bits O-8, 9-12 and 18-35 respectively of location 40;

clear bits 13-17. Execute the instruction contained in location 41. The orig- inal contents of location 40 are lost. Every LUUO in section 0 uses some pair of locations numbered 40 and 41, but which such pair depends upon the circumstances. An LUUO in a user program uses virtual locations 40 and 41 and is thus entirely a part of and under control of the user program.

The locations used in executive mode depend on the processor:

KL10,KSlO 40 and 41 in executive virtual space KIlO 40 and 41 in the executive process table

KAlO Unrelocated 40 and 4137

37 If a single memory serves as memory number 0 for two KAlO processors, the second (with the trap offset) uses unrelocated 140-141 and 160-161 respectively for each instance in which 40-41 and 60-61 are given here. The offset does not apply to user LUUOs as it is assumed the Monitor would relocate these to different physical blocks.

User Operations 2-123

If the program is running in a nonzero section, take one of these two courses of action.

In executive mode perform an MUUO - not because the code is illegal, but because it is actually unassigned rather than an LUUO.

In user mode perform the following operations using a block of four locations beginning at that specified by bits 6-35 of location 420 in the user process table. In the first two locations save the program flags and PC in a flag-PC doubleword; in the rest of the flag word clear bits 13-17 and 31-35, and store the instruction code and A in bits 18-26 and 27-30. In the third location store E in bits 6-35 (clear bits O-5).

FLAGS 00 CODE A 00

00 PC

00 E

L

3 00 NEW PC

0 5 6 1213 1718 26 27 30 31 35

Then load bits 6-35 of the fourth location into PC, and continue performing instructions in normal sequence beginning at the location then addressed by PC. If E is a local AC address, store it in global form (i.e. with a section number of 1).

MUUOs

The actions of MUUOs depend to a considerable degree on the processor, and also on which Monitor is in use. These are the MUUO codes.

TOPS-20 104;040-051, 055-077 in section 0

TOPS-10 except KAlO 040-051, 055-077

KAlO 040-051, 055-100

MUUOs have considerable flexibility in the way they can alter the opera- ting characteristics of the machine (mode, section). But the information that governs the alterations is contained in the user process table, and is therefore assumed to be under sole control of the kernel program.

The unassigned codes, which are listed in Appendix E, are not MUUOs, but the processor reacts to them in the same way in order to turn control over to the Monitor. (In the KAlO there are minor differences as explained below.) The processor also takes the same action if the program gives a JRST with an undefined function, an instruction that is illegal because of the context in which it is given, an extended instruction with incorrectly formatted accumulators, or code 000. The last is so that control returns to the Monitor should a user program wipe itself out or inadver- tently attempt to execute a location that has been cleared.

2-124 User Operations

The rest of this section is devoted to the different ways in which MUUOs are performed. Except in the KAlO, all types use locations in the user process table to store similar information. Figure 2-3 shows what information is stored in which locations for each processor type.

Extended KLlO MUUOs. In locations 424-426 of the user process table, store the same information (as specified above) that is stored in the first three locations of an LUUO block by an LUUO given in a nonzero section, except that when the MUUO is given in executive mode, also save the previous context section in bits 31-35 of location 424. Store the “process context word)P in location 427; this word saves information that partially structions in normal sequence beginning at the location then addressed by PC. (Note that the MUUO can change PC from any section to any other.) continue performing instructions in normal sequence beginning at the loca- tion then addressed by PC. The PC word list occupies the same area as the

Figure 2.3: User Process Table MUUO Configurations 424

425 426

427 0 56 12 I3 17 10 26 27 30 31 35

EXTENDED KLlO OR TOPS-20 KS10

425 426 427

0 8 9 I2 1.1 17 In 35

SINGLE SECTION KLlO WITH TOPS-20

424 CODE 1 A 00 E

425 FLAGS 00 PC

426 PROCESS CONTEXT WORD

0 8 v 12 I3 I7 I8 JS

SINGLE SECTION KLlO OR KS10 WITH TOPS-10

424 1 CODE 1 A 1 00 1 E 1

425 FLAGS I 00 I PC 1

0 u v I2 I3 I7 I8 3s

KIlO

KS10 MUUOs. For the KS10 the PC or PC-word list contains only four entries for executive and user modes, in the locations corresponding to the kernel and concealed modes as given above - the supervisor and public locations are not used. The process context word for the KS10 is that read by an RDUBR ($4.5). Otherwise, with TOPS-20 an MUUO is performed in the same way as in an extended KLlO, and with TOPS-10 it is performed in the same way as in a single-section KLlO running under TOPS-lo.

KIlO MUUOs. An MUUO is performed in exactly the same way as on a single-section KLlO with the TOPS-10 Monitor, except that it does not store a process context word (only two words of information are stored in locations 424 and 425). Note that the trap locations in the PC-word table are used for either overflow or a page failure.

2-126 User Operations June 1982

KAlO MUUOs. MUUOs and unassigned codes,38 regardless of mode, perform exactly the operations given above for an LUUO with the excep- tion that MUUOs use unrelocated 40-41 and unassigned codes use unrelo- cated 60-61 (140-141 and 160-161 for a second processor). Note that in executive mode, LUUOs and MUUOs act identically.

The important point is that an MUUO or unassigned code results in executing an instruction in an unrelocated location, i.e. an instruction un- der the control of the Monitor. This would most likely be a jump that leaves user mode, saves the PC word and enters a routine to interpret the MUUO configuration. In the instruction descriptions, any reference to events re- sulting from execution by an MUUO should be taken to include the unas- signed and illegal codes as well.

Im Dokument UPDATE NOTICE (Seite 183-187)