99
Divide X by Y
store result (register) = get X (register) / get Y (register)
NOTICE !!!
The function operates on integers. The result is truncated to integer.
Crossing the valid range sets an error flag.
Examples:
10 / 3 = 3
-15 / 4 = -3
Multiply X by Y
store result (register) = get X (register) * get Y (register)
Crossing the valid range sets an error flag.
Subtract Y from X
store result (register) = get X (register) - get Y (register)
Crossing the valid range sets an error flag.
Add X to Y
store result (register) = get X (register) + get Y (register)
Crossing the valid range sets an error flag.
Modulo
The function assigns the modulus of the division of X by Y. For proper functioning, it is
required that get X >= 0 and get Y > 0. When any of preconditions are not met, the
function returns an error which sets an error flag.
Examples:
10 / 3 = 1
-15 / 4 = error
15 / 5 = 0
Negation
store result (register) = -get X (register)
CAUTION!!!
Note that all registers store unsigned values. Only DREG registers can hold 32 bit signed
values. Using this function on DREG registers in will in most cases return an error.
Bitwise OR
The function calculates logical sum of corresponding bits in 2 registers.
Example:
decimal hexadecimal binary
get X (register) = 1234 = 04D2 = 0000 0100 1101 0010
get Y (register) = 4991 = 137F = 0001 0011 0111 1111
store result (register) = 6143 = 17FF = 0001 0111 1111 1111
Bitwise AND
The function calculates the product of corresponding bits in 2 registers.
Example:
decimal hexadecimal binary
get X (register) = 1234 = 04D2 = 0000 0100 1101 0010
get Y (register) = 4991 = 137F = 0001 0011 0111 1111
store result (register) = 82 = 0052 = 0000 0000 0101 0010
Bitwise XOR
The function calculates symmetrical difference of corresponding bits in 2 registers.
Example:
decimal hexadecimal binary
Summary of Contents for MT-101
Page 1: ......
Page 129: ...126 11 7 Drawings and dimensions ...