Detecting end or completion of microprogram