i program a 877 and it works, then i change the headers and add the lines for sut down the analog comparators, and it works on sim. but
You are doing 2 simultaneous edits a time.
Try one by one , i.e. , first only changing header and so.
Double check the definition files for each device , 877 and 877A in your programmer software,.... headers, I am willing to expect only a software error. ( fuses ? )
As far as I know , there is NO functional difference between this 2 devices but Enhanced Flash Memory ( hence the " A " )
What are tose "lines" you are adding ? what do they instruct ?
Maybe you should listen to Amhad_k/Rego and share the code....
Good luck !
Greetings
Francisco