docs/DSP: Elaborate on SBSET and SBCLR
This commit is contained in:
parent
bb1ecd2a81
commit
13051ee291
|
@ -2921,11 +2921,11 @@ There are two pairs of conditions that work similarly: \texttt{EQ}/\texttt{NE} a
|
||||||
\end{DSPOpcodeFormat}
|
\end{DSPOpcodeFormat}
|
||||||
|
|
||||||
\begin{DSPOpcodeDescription}
|
\begin{DSPOpcodeDescription}
|
||||||
\item Set bit of status register \Register{\$sr}. Bit number is calculated by adding 6 to immediate value \Value{I}.
|
\item Set bit of status register \Register{\$sr}. Bit number is calculated by adding 6 to immediate value \Value{I}; thus, bits 6 through 13 (\texttt{LZ} through \texttt{AM}) can be set with this instruction.
|
||||||
\end{DSPOpcodeDescription}
|
\end{DSPOpcodeDescription}
|
||||||
|
|
||||||
\begin{DSPOpcodeOperation}
|
\begin{DSPOpcodeOperation}
|
||||||
$sr |= (I + 6)
|
$sr |= 1 << (I + 6)
|
||||||
$pc++
|
$pc++
|
||||||
\end{DSPOpcodeOperation}
|
\end{DSPOpcodeOperation}
|
||||||
\end{DSPOpcode}
|
\end{DSPOpcode}
|
||||||
|
@ -2940,11 +2940,11 @@ There are two pairs of conditions that work similarly: \texttt{EQ}/\texttt{NE} a
|
||||||
\end{DSPOpcodeFormat}
|
\end{DSPOpcodeFormat}
|
||||||
|
|
||||||
\begin{DSPOpcodeDescription}
|
\begin{DSPOpcodeDescription}
|
||||||
\item Clear bit of status register \Register{\$sr}. Bit number is calculated by adding 6 to immediate value \Value{I}.
|
\item Clear bit of status register \Register{\$sr}. Bit number is calculated by adding 6 to immediate value \Value{I}; thus, bits 6 through 13 (\texttt{LZ} through \texttt{AM}) can be cleared with this instruction.
|
||||||
\end{DSPOpcodeDescription}
|
\end{DSPOpcodeDescription}
|
||||||
|
|
||||||
\begin{DSPOpcodeOperation}
|
\begin{DSPOpcodeOperation}
|
||||||
$sr &= ~(I + 6)
|
$sr &= ~(1 << (I + 6))
|
||||||
$pc++
|
$pc++
|
||||||
\end{DSPOpcodeOperation}
|
\end{DSPOpcodeOperation}
|
||||||
\end{DSPOpcode}
|
\end{DSPOpcode}
|
||||||
|
|
Loading…
Reference in New Issue