Re: A92: Just a little problem


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

Re: A92: Just a little problem




Hugo Bernabé schrieb:
>
> > > I store a string in 'wfichier', I store a number
> > > to 'cpt', I store a char in 'd0': my problem is to
> > > store the char 'd0' in the string 'wfichier' at
> > > the character number 'cpt',and I didn't found how
> > > to: could anybody help me?
> > > Thanks!
> > > @+
>
> lea     wfichier(pc),a0
> move.w  cpt(pc),d1
> move.b  d0,0(a0,d1.w)
>
> 12 bytes in memory, 8+12+14=34 cycles
>
> And what about:
> lea	wfichier(pc),a0
> add.l	cpt,a0
> move.b	d0,(a0)
>
> 12 bytes in memory,  8+8+8=24 cycles and d1 is not used!
	According to my list it's 8+12+8=28, then see below
>
> hugo
1) you won't need the variable cpt if you keep it in d1( or better d7, indeed)
2) speed of both seems to be the same according to my list, but you got to take 
	into account the time to adjust cpt or d1:
	add.w	#n,d1 :	12 cycles
	add.w	#n,cpt: 32 cycles,	that's the point	
	so we got 34+12=46 cycles versus 28+32=60 cycles	
	and if you used d7 instead of d1 you probably won't even have to store 	
	it anywhere		A.K.
>
>



References: