Divide instruction

21
Aug
Instruction Divide
Syntax Divide Destination, Source1, Source2[, Overflow-Label]
Constraints Destination, Source1, and Source2 are all of the same type
Process Destination := Source1 / Source2
If Overflow Detected Then Go To Overflow-Label

The Divide instruction is used to add two integer or decimal variables from one another.

The Divide is in all other ways similar to the Add instruction.

This instruction catches the error whenever the divisor (Source2) is zero.


Depending on whether precision is important, bits lost in a division may raise an exception. It is possible to know by checking the remainder. If not zero, a precision error may be raised.

Syndicate content