Luigi Rizzo writes: > Two students of mine have written a 16C84 simulator, in C++. It > simulates correctly all peripherals (timer, interrupts, io ports, > EEPROM writes), and CPU instructions (including the delay slots > after every modification to the PC -- something that the Microchip > simulator does not do). Do you mean that the Microchip simulator only counts one cycle for instructions that write to PCL? Are they really that inept? Of course, the Microchip documentation erroneously states If an instruction causes the program counter to change (e.g. GOTO) then two cycles are required to complete the instruction This would imply that the goto in the sequence goto next next: or the addwf in the sequence movlw 0 addwf pcl should only take one cycle, since the program counter isn't changed. What they really should have said is that instructions that *may* change the program counter always take two cycles. While we're on the subject, has anyone tested the behavior (on real parts, not a simulator) of writing to the PCL *indirectly*? I.e., movlw pcl movwf fsr movlw label movwf ind ; should take two cycles incf foo ; should not execute ... label: incf bar ; should continue here It wouldn't surprise me one bit if the part didn't notice that the indirect write affected pcl, and actually executed the incf foo. Cheers, Eric