src/dps8/dps8_cpu.c
/*
 * instruction decoder .....
 *
 * if dst is not NULL place results into dst, if dst is NULL plae results into global currentInstruction
 */
instruction decoder
if dst is not NULL place results into dst, if dst is NULL plae results into global currentInstruction
instruction decoder if dst is not NULL place results into dst if dst is NULL plae results into global currentInstruction
void decodeInstruction (word36 inst, DCDstruct * p)
{
    CPT (cpt1L, 17); 
    p->opcode  = GET_OP(inst);  
    p->opcodeX = GET_OPX(inst); 
    p->address = GET_ADDR(inst);
    p->b29     = GET_A(inst);   
    p->i       = GET_I(inst);   
    p->tag     = GET_TAG(inst); 
    p->info = getIWBInfo(p);     
    if (p->info->flags & IGN_B29)
        p->b29 = 0;   
    if (p->info->ndes > 0)
    {
        p->b29 = 0;
        p->tag = 0;
        if (p->info->ndes > 1)
        {
            memset (& cpu.currentEISinstruction, 0, sizeof (cpu.currentEISinstruction)); 
        }
    }
    p -> restart = cpu.cu.rfi != 0;
    cpu.cu.rfi = 0;
    if (p -> restart)
      {
        sim_debug (DBG_TRACE, & cpu_dev, "restart\n");
      }
}
void decodeInstruction ( word36 inst , DCDstruct * p ) { CPT ( cpt1L , 17 ) ; p -> opcode = GET_OP ( inst ) ; p -> opcodeX = GET_OPX ( inst ) ; p -> address = GET_ADDR ( inst ) ; p -> b29 = GET_A ( inst ) ; p -> i = GET_I ( inst ) ; p -> tag = GET_TAG ( inst ) ; p -> info = getIWBInfo ( p ) ; if ( p -> info -> flags & IGN_B29 ) p -> b29 = 0 ; if ( p -> info -> ndes > 0 ) { p -> b29 = 0 ; p -> tag = 0 ; if ( p -> info -> ndes > 1 ) { memset ( & cpu . currentEISinstruction , 0 , sizeof ( cpu . currentEISinstruction ) ) ; } } p -> restart = cpu . cu . rfi != 0 ; cpu . cu . rfi = 0 ; if ( p -> restart ) { sim_debug ( DBG_TRACE , & cpu_dev , " \n " ) ; } }
instruction decoder .....
 if dst is not NULL place results into dst, if dst is NULL plae results into global currentInstruction
instruction decoder ..... if dst is not NULL place results into dst if dst is NULL plae results into global currentInstruction
// instruction decoder // get opcode // opcode extension // address field from instruction // "A" - the indirect via pointer register flag // "I" - inhibit interrupt flag // instruction tag // get info for IWB instruction // HWR 18 June 2013  //p->info->opcode = p->opcode; //p->IWB = inst; // HWR 21 Dec 2013 // make certain 'a' bit is valid always // Save the RFI