beautypg.com

Instructions fun 180 abs absolute value – Toshiba 6F3B0253 User Manual

Page 233

background image

6F3B0253

Basic Hardware and Function

231

7. Instructions

FUN 180

ABS

Absolute value

Expression

Input

[ A ABS B ]

Output

Function

When the input is ON, this instruction finds the absolute value of operand A, and stores it in B.

Execution condition

Input

Operation

Output

OFF

No execution

OFF

ON

Execution

ON

Operand

Name

Device

Register

Constant Index

X

Y

R

S

T.

C. XW YW RW SW T

C

D

I

J

K

A Source

B Destination

Example

When X006 is ON, the absolute value of RW38 is stored in D0121.
For example, if RW38 is -12000, the absolute value 12000 is stored in D0121.

Note

The data range of A is -32768 to 32767. If the data of A is -32768, 32767 is stored in B.

32767

12000

0

32767

-12000

-32767

D0121

RW38