The first 16C5X PIC devices would generally do an extraneous read of
the memory at whatever address the least significant 5 bits pointed
to. This saved transistors and on devices without a lot of
peripherals was safe to do.
On the '74, as peripherals were added, this became more involved and
location 000D was overlooked.
On all new devices such as '74A, the instruction decoder PLA treats
literal and control instructions as special cases and shuts off the
read logic.
BTW, the NOP reading the FSR was never a problem as the PLA always
accounted for that. The NOP is actually MOVWF 0,W which will only
move W to W and a read of FSR is disabled. That PLA term that
disables the read is now generalized to disable all inadvertent reads.
Rgds, Brian.
______________________________ Reply Separator _________________________________
Subject: Re: Instruction encodings (was: Code error)
Author: Wolfram Liebchen <.....liebchenKILLspam
@spam@FFO.FGAN.DE> at Internet_Exchange
Date: 2/24/97 10:04 AM
At 18:42 21.02.97 -0600, you wrote:
>> > Right. What happens if FSR happens to be pointing at a register which
would
{Quote hidden}>> > be affected by the read?
>>
>> Even though movwf 0,w would be the obvious interpretation of opcode 0x0000
>> surely it would never be executed as such so we never have to worry about
>> where FSR points. Or have I got that wrong?
>
>Well, on the 16C74, a RETURN instruction (0x000D) does a read to port D (at
>address 0x000D) which will clear the incoming byte flag if that port is used
>in parallel-slave mode. Draw your own conclusions (I would not rely on that
>behavior, because Microchip may fix it, but AFAIK current silicon works that
>way. Fortunately, on the PIC very few things are affected by reads.
>
I can't believe, that PICs behave the way you say.
It should be easy, to decode special instructions in a way that they don't
have theses side effects you mentioned.
The data sheets _SHOULD_ also mention them?!?
regards
Wolfram
+-----------------------------------------------------+
| Wolfram Liebchen |
| Forschungsinstitut für Optik, Tübingen, Deutschland |
| liebchen
KILLspamffo.fgan.de |
+-----------------------------------------------------+