Nonideal Stability Code for Toroidal Plasmas