Hello Guys,
Thank you for your time!
Daniel,
You are right! Actually I missed the store operation! I am working on a PIC18 project and I got used with the ADDWF x,F notation!
The ADD opr8a stores the result in A and I'll really need a store operation to place the result in my destination variable.
My point here was that most instructions using DIR addressing mode are faster than INC and DEC (and others as MAC also stated).
But considering that INC and DEC are R-M-W instructions and modify directly the destination address (without the need of a store operation) and that ADD, AND, etc. only modify the accumulator (A). That explains the need for additional BUSCLK cycles.
As I said, I really missed the store operation needed for the ADD comparison!
Peg,
I am aware of that AN, I also questioned FS (some time ago) about the increased cycles of some instructions (compared to the same ones on HC08). Their answer was that the faster clock speed and the two-byte instruction queue made it difficult to route some signals (within the CPU) as they were on the HC08. That ended up with a new design on the instruction decoder and on the micro-operation sequence.
Mac,
Yes, that makes sense. Also, as far as I know, the p cycles are actually fetch cycles and they are used to fill the two-byte instruction queue.
Thank you guys! For some reason(s) I missed the store operation and that ended up with a wrong interpretation on the operation flow of INC and the LDA/ADD/STA comparison.
Best regards,