Advanced Function Instruction
7-7
FUN 28 D P
ABS
ABSOLUTE
(Take the absolute value)
FUN 28 D P
ABS
D : Register to be taken absolute value
D may combine with V, Z, P0~P9 to serve indirect address
application
WY WM WS TMR CTR HR OR SR ROR DR XR
Range
Ope-
rand
WY0
∣
WY240
WM0
∣
WM1896
WS0
∣
WS984
T0
∣
T255
C0
∣
C255
R0
∣
R3839
R3904
∣
R3967
R3968
∣
R4167
R5000
∣
R8071
D0
∣
D4095
V、Z
P0~P9
D ○ ○ ○ ○ ○ ○ ○ ○* ○* ○ ○
z When operation control "EN" = 1 or "EN↑" ( P instruction) from 0 to 1, calculate the absolute value of the
content of the register specified by D, and write it back into the original D register.
R 0
X0
EN
28DP
ABS
z The instruction at left calculates the absolute value of
the R0 register, and stores it back in R0.
D R1 R0 −12345 )CFC7H
Ø
X0=
D R1 R0 12345 )3039H