Re: A89: Re: FYI: added info to J89hw.txt


[Prev][Next][Index][Thread]

Re: A89: Re: FYI: added info to J89hw.txt




On Tue, Aug 08, 2000 at 05:30:51PM +0200, Olle Hedman wrote:
> Jeremie Knusel wrote:
> >  nop                    ; Execute three NOPs to make SURE it's actually
> >  nop                    ;  three read accesses from within $21xxxx
> >  nop
> >  move.w #$2700,sr ; "make sure nobody's trying to do stupid things"
> >  move.w d0,(a0)     ; Do the $1Cxxxx write (any value in D0 will do)
> >
> > where are the three reads from 20xxxx or 21xxxx that should be done just
> > before
> > move.w d0,(a0)   ?
>
> The three nops. The code is run from somewhere in 20xxxx to 21xxxx and the
> reads are the instruction fetches.


The bus activity when executing the code fragment above is:

   fetch NOP instruction
   fetch NOP instruction
   fetch NOP instruction
   fetch MOVE #xxx,SR instruction
-> fetch immediate data to MOVE instruction ("$2700")
-> fetch MOVE D0,(A0) instruction
-> fetch instruction following the MOVE
-> write to $1Cxxxx (execute the MOVE instruction)
   fetch next instruction etc...

The four lines with "->" are the important ones. As you can see, the NOPs
are not necessary! Note that the write is "delayed" -- the 68000 has a
one-word prefetch queue. (Who said you never learn anything useful at
school?!? :-) )


/Johan  "100 bytes is enough."



Follow-Ups: References: