
 ** 㬥஢  PDP-11 (KERNEL / USER / SUPERVISOR modes) **

      1 ᯮ㥬   뢠 뢠 10
 (१ࢭ ).

-----------------------------------------------------------------------------
SPL          00023N     MR-11567

Set proirity level

Operation:              PS bits <07:05> <-- priority (priority = N)

Condition codes:        N:\
                        Z:  unaffected
                        V:
                        C:/

Descriptiion:           In kernel mode, the least significant three bits of
                        the instruction are loaded into the processor status
                        word (PS) bits <07:05>, causing a changed priority.
                        The old priority is lost.In user or supervisor modes,
                        SPL executes as a NOP.

                        Assembler syntax is: SPL N

Remarks:                Rarely used
-----------------------------------------------------------------------------
CSM          0070dst    MR-11568

Call to SUPERVISOR mode

Operation:              If MMR3 bit 3 = 1 and current mode = kernel then
                        supervisor SP <-- current mode SP
                        temp <15:04> <-- PS <15:04>
                        temp <03:00> <-- 0
                        PS<13:12> <-- PS<15:14>
                        PS<15:14> <-- 01
                        PS 4 <-- 0
                        -(SP) <-- temp
                        -(SP) <-- PC
                        -(SP) <-- (dst)
                        PC <-- (10)
                        othervise, traps to 10 in kernel mode

Conditions codes:       N:\
                        Z:  unaffected
                        V:
                        C:/

Description:            CSM may be executed in user or supervisor mode,
                        but is an illegal instruction in kernel mode. CSM
                        copies the current stack pointer (SP) to the
                        supervisor mode, switches to supervisor mode, stacks
                        three words on the supervisor stack (the PS with the
                        condition codes cleared, the PC,and the argument word
                        addressed by the operand), and sets the PC to the
                        contents of location 10 (in supervisor space). The
                        called program in supervisor space may return to the
                        calling program by popping the argument word from the
                        stack and executing RTI.On return,the condition codes
                        are determined by the PS word on the stack.Hence, the
                        called program in supervisor space may control the
                        condition code values following return.
-----------------------------------------------------------------------------
TSTSET       0072dst    MR-11499

Test destination and set low bit

Operation:              (R0) <- (dst), (dst) <- (dst) \/ 000001 (octal)

Condition Codes         N: set if R0 < 0
                        Z: set if R0 = 0
                        V: cleared
                        C: gets contents of destination bit 0

Description:            Read/Locks destination word and stores it
                        in R0. Writes/Unlocks (R0) \/ 1 into destination. 
-----------------------------------------------------------------------------
WRTLCK       0073dst    MR-11498

Read/lock destination
Write/unlock R0 into destination

Operation:              (dst) <-- (R0)

Condition codes:        N: set if R0 < 0
                        Z: set if R0 = 0
                        V: cleared
                        C: unchanged

Description:            Writes contents of R0 unto destination using bus lock
                        If mode is 0 -> trap to 10 (command must be executed
                        from one of the priviledged modes)
-----------------------------------------------------------------------------

