been judged to be defective will be judged and copied on the maximum retard angle step s 61 subsequently it is judged whether or not the zero counter flag is 0 step s 62 and if it is 0 the maximum retard angle will be copied on the fail cylinder 39 s retard angle of this cylinder because the knock pulse number has been judged to be in an abnormal state step s 64 subsequently it is judged whether or not a maximum retard angle flag indicating whether or not the fail cylinder 39 s retard angle has already reached the maximum retard angle once has been set step s 63 if it has been set the maximum retard angle will be copied on the fail cylinder 39 s retard angle of this cylinder step s 64 on a cylinder having an abnormally large real retard angle which has been judged to be defective the maximum retard angle will be copied immediately and in order to prevent knock from occurring when the ignition timing is abruptly advanced the fail cylinder 39 s retard angle will be advanced at a predetermined speed step s 65 if the fail cylinder 39 s retard angle reaches the maximum retard angle step s 66 the maximum retard angle will be copied on the fail cylinder 39 s retard angle to set the maximum retard angle flag step s 68 until the fail cylinder 39 s retard angle reaches the maximum retard angle the maximum retard flag will be continuously reset to 0 step s 67 the fail cylinder 39 s retard angle has been set by the use of the.