Re: A92: Questions about some instructions
[Prev][Next][Index][Thread]
Re: A92: Questions about some instructions
Hugo Bernabé schrieb:
>
> >For example if you have:
> > tst.w d0
> > seq variable
> > (...)
> >
> >variable dc.b 0
> >
> >It means: "if d0.w=0, variable = $FF, else variable = $00"
>
>
> *tst* is the instruction test for NEGATIVE OR ZERO.
>
> *tst.w d0* means
> *If d0.w <= 0, variable = $FF, else variable=$00*
>
Oh,oh, You seem to have mixed tas and tst in your answer. "tst" tests the operand
if it is positive, negative and zero, nonzero. The result can be seen from the
flags Z and N, C,V are cleared and X is unchanged. "tas" tests a byte in memory
and shows the result in the flags and always sets bit7 of the byte-operand.
A.K.
References: