VMS Help
MACRO, VAX MACRO Assembler, Instructions, CHMx

 *Conan The Librarian (sorry for the slow response - running on an old VAX)

    Purpose:        Request the services of more privileged software
                    by changing the process mode
    Format:         opcode code.rw
    Operation:      tmp1 = {mode selected by opcode (K = 0, E = 1,
                    S = 2, U = 3)}; tmp2 = MINU(tmp1,PSL<CUR_MOD>);
                    {maximize privilege}; tmp3 = SEXT(code); if
                    {PSL<IS> EQLU 1} then HALT; PSL<CUR_MOD>_SP = SP
                    tmp4 = tmp2_sp; PROBEW (from tmp4 - 1 to tmp4 - 12
                    with mode = tmp2); if {access violation} then
                    {initiate access violation fault}; if {translation
                    not valid} then {initiate translation not valid};
                    {initiate CHMx exception with new_mode = tmp2
                    and parameter = tmp3 using 40 + tmp1*4 as SCB offset
                    using tmp4 as the new SP and not storing SP again}
    C. Codes:       N = 0, Z = 0, V = 0, C = 0
    Exceptions:     Halt
    Opcodes:        BC    CHMK     Change mode to kernel
                    BD    CHME     Change mode to executive
                    BE    CHMS     Change mode to supervisor
                    BF    CHMU     Change mode to user
    Description:    Change mode instructions allow processes to change
                    their access mode in a controlled manner. The
                    instructions only increase privilege. A change in
                    mode also results in a change of stack pointers;
                    the old pointer is saved, the new pointer is loaded.
                    The PSL, PC and any code passed by the instruction
                    are pushed on the new stack. The code is sign
                    extended. The destination mode selected by the
                    opcode is used to select a vector from the System
                    Control Block. Software convention reserves the
                    negative code values to customers, positive
                    code values to Digital.
  Close     HLB-list     TLB-list     Help  

[legal] [privacy] [GNU] [policy] [netiquette] [sponsors] [FAQ]
Tweet
Polarhome, production since 1999.
Member of Polarhome portal.