[Coco] "Reading" non-readable bytes with PEEK vs ZBUG
Darren A.
darccml at hotmail.com
Tue Jan 22 13:31:13 EST 2008
>
> On 22 Jan 2008 at 8:17, Darren A. wrote:
>
>> Changing the JMP instruction at $B754 to an equivalent LBRA will cause
>> PEEK to return a different value for address $FFA0.
>
> has this been verified?
>
> I can't verify a mechanism as to why the ACCB would change inside the
> 6809 just because the next opcode byte changes. There has to be another
> reason or mechanism. If this were true then it should happen in other places
> in the code and would result in erronious exection.
>
--
I can reproduce this reliably on my 128K CoCo3. So far, nobody else has reported their results.
In all my tests, when a LDB ,X instruction is executed with $FFA0 in X, bits 6-7 of the value loaded into B match bits 6-7 of the next instruction opcode.
I am no hardware expert, but it seems to me that this would infer that the next instruction opcode is appearing on the data bus prior to the read of $FFA0. Is it possible that the 6809 does a "look ahead" when executing an indexed instruction with a zero-displacement postbye? Something like:
Cycle 1: Fetch LDB opcode
Cycle 2: Fetch Indexing postbyte
Cycle 3: Peek at the next instruction byte
Cycle 4: Read data from [X]
Darren
_________________________________________________________________
Climb to the top of the charts! Play the word scramble challenge with star power.
http://club.live.com/star_shuffle.aspx?icid=starshuffle_wlmailtextlink_jan
More information about the Coco
mailing list