Design and implementation of a flexible and interactive microprogram simulator