TrietPhan_FinalProject.c
// Update condition code when doing Trap call
Update condition code when doing Trap call
Update condition code when doing Trap call
void update_cc_trap(CPU *cpu){
  cpu -> reg[7] = cpu -> pc;
  Address check_reg = cpu -> reg[7];
  if(check_reg >= 32768){
    cpu -> condition_code = CC_NEGATIVE;
  }
}
void update_cc_trap ( CPU * cpu ) { cpu -> reg [ 7 ] = cpu -> pc ; Address check_reg = cpu -> reg [ 7 ] ; if ( check_reg >= 32768 ) { cpu -> condition_code = CC_NEGATIVE ; } }
Update condition code when doing Trap call
Update condition code when doing Trap call