EasyManua.ls Logo

Renesas SuperH SH-4A

Renesas SuperH SH-4A
472 pages
To Next Page IconTo Next Page
To Next Page IconTo Next Page
To Previous Page IconTo Previous Page
To Previous Page IconTo Previous Page
Loading...
Rev. 1.50, 10/04, page 228 of 448
10.1.15 DIV0S (Divide (Step 0) as Signed): Arithmetic Instruction
Format Operation Instruction Code Cycle T Bit
DIV0S Rm,Rn MSB of Rn Q,
MSB of Rm M,
M^Q T
0010nnnnmmmm0111 1 Result of
calculation
Description: This instruction performs initial settings for signed division. This instruction is
followed by a DIV1 instruction that executes 1-digit division, for example, and repeated divisions
are executed to find the quotient. See the description of the DIV1 instruction for details.
Notes: None
Operation:
DIV0S(long m, long n) /* DIV0S Rm,Rn */
{
if ((R[n] & 0x80000000)==0) Q = 0;
else Q = 1;
if ((R[m] & 0x80000000)==0) M = 0;
else M = 1;
T = !(M==Q);
PC += 2;
}
Example:
See the examples for the DIV1 instruction.

Table of Contents

Related product manuals