ST20-C1 STMICROELECTRONICS [STMicroelectronics], ST20-C1 Datasheet - Page 102

no-image

ST20-C1

Manufacturer Part Number
ST20-C1
Description
Instruction Set Reference Manual
Manufacturer
STMICROELECTRONICS [STMicroelectronics]
Datasheet
divstep
Code: 21 F8
Description: Perform a step of an integer division to generate 4 bits of the quotient.
Areg holds the positive divisor. Breg and Creg hold the non-negative dividend or
partial remainder and the partial result. Before the first step, Breg holds the dividend
and Creg must be 0. After performing divstep 8 times, Breg will hold the quotient and
Creg the remainder.
Definition:
Status Register:
Comments:
See also: unsign
102/205
if (Areg
{
}
else
{
}
where
No effect.
Secondary instruction.
Areg must be greater than zero.
Breg and Creg must be not less than zero.
section 4.4.
Breg
Creg
Breg
Creg
0 and Breg
part_div = (Creg << 4)
– the value of part_div is calculated to unlimited precision
(Breg << 4)
part_div rem Areg
undefined
undefined
0 and Creg
(part_div / Areg)
(Breg >> 28)
0 )
divide step

Related parts for ST20-C1