src/dps8/dps8_cpu.c
//
// is_priv_mode()
//
// Report whether or or not the CPU is in privileged mode.
// True if in absolute mode or if priv bit is on in segment TPR.TSR
// The processor executes instructions in privileged mode when forming
// addresses in absolute mode or when forming addresses in append mode and the
// segment descriptor word (SDW) for the segment in execution specifies a
// privileged procedure and the execution ring is equal to zero.
//
// PPR.P A flag controlling execution of privileged instructions.
//
// Its value is 1 (permitting execution of privileged instructions) if PPR.PRR
// is 0 and the privileged bit in the segment descriptor word (SDW.P) for the
// procedure is 1; otherwise, its value is 0.
//
is_priv_mode()
Report whether or or not the CPU is in privileged mode.
True if in absolute mode or if priv bit is on in segment TPR.TSR
The processor executes instructions in privileged mode when forming
addresses in absolute mode or when forming addresses in append mode and the
segment descriptor word (SDW) for the segment in execution specifies a
privileged procedure and the execution ring is equal to zero.

PPR.P A flag controlling execution of privileged instructions.

Its value is 1 (permitting execution of privileged instructions) if PPR.PRR
is 0 and the privileged bit in the segment descriptor word (SDW.P) for the
procedure is 1; otherwise, its value is 0.
is_priv_mode () Report whether or or not the CPU is in privileged mode . True if in absolute mode or if priv bit is on in segment TPR . TSR The processor executes instructions in privileged mode when forming addresses in absolute mode or when forming addresses in append mode and the segment descriptor word ( SDW ) for the segment in execution specifies a privileged procedure and the execution ring is equal to zero . PPR . P A flag controlling execution of privileged instructions . Its value is 1 ( permitting execution of privileged instructions ) if PPR . PRR is 0 and the privileged bit in the segment descriptor word ( SDW . P ) for the procedure is 1 ; otherwise its value is 0 .
int is_priv_mode(void)
  {
sim_debug (DBG_TRACE, & cpu_dev, "is_priv_mode P %u get_addr_mode %d get_bar_mode %d IR %06o\n", cpu.PPR.P, get_addr_mode (), get_bar_mode (), cpu.cu.IR);
    if (TST_I_NBAR && cpu.PPR.P)
      return 1;
    if (get_addr_mode () == ABSOLUTE_mode && ! get_bar_mode ())
      return 1;
    return 0;
  }
int is_priv_mode ( void ) { sim_debug ( DBG_TRACE , & cpu_dev , " \n " , cpu . PPR . P , get_addr_mode ( ) , get_bar_mode ( ) , cpu . cu . IR ) ; if ( TST_I_NBAR && cpu . PPR . P ) return 1 ; if ( get_addr_mode ( ) == ABSOLUTE_mode && ! get_bar_mode ( ) ) return 1 ; return 0 ; }
is_priv_mode()
Report whether or or not the CPU is in privileged mode.
is_priv_mode () Report whether or or not the CPU is in privileged mode .
// Back when it was ABS/APP/BAR, this test was right; now that // it is ABS/APP,BAR/NBAR, check bar mode. // Fixes ISOLTS 890 05a.