EasyManuals Logo

Renesas SuperH SH-4A User Manual

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
Page #248 background imageLoading...
Page #248 background image
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

Questions and Answers:

Question and Answer IconNeed help?

Do you have a question about the Renesas SuperH SH-4A and is the answer not in the manual?

Renesas SuperH SH-4A Specifications

General IconGeneral
BrandRenesas
ModelSuperH SH-4A
CategoryComputer Hardware
LanguageEnglish

Related product manuals