Omron CJ - REFERENCE MANUAL 10-2009 Reference Manual page 54

Table of Contents

Advertisement

1. Basic Understanding of Instructions
Data
Operand
16-bit
All binary data or a
constant
limited range of binary
data
All BCD data or a lim-
ited range of BCD
data
32-bit
All binary data or a
constant
limited range of binary
data
All BCD data or a lim-
ited range of BCD
data
16
Data form
Symbol
Unsigned binary
#
Signed decimal
Unsigned decimal
&
BCD
#
Unsigned binary
#
Signed binary
+
Unsigned
&
decimal
BCD
#
Range
Application example
#0000 to #FFFF
MOV #0100 D0
Stores #0100 hex (&256 decimal)
in D0.
+#0009 #0001 D1
Stores #000A hex (&10 decimal)
in D1.
32768 to +32767 MOV .100 D0
Stores .100 decimal (#FF9C hex)
in D0.
+ 9 1 D1
Stores 10 decimal (#FFF6 hex)
in D1.
&0 to &65535
MOV &256 D0
Stores 256 decimal (#0100 hex)
in D0.
+&9 &1 D1
Stores 10 decimal (#000A hex)
in D1.
#0000 to #9999
MOV #0100 D0
Stores #0100 (BCD) in D0.
+B #0009 #0001 D1
Stores #0010 (BCD) in D1.
#00000000 to
MOVL #12345678 D0
#FFFFFFFF
Stores #12345678 hex in D0 and
D1.
D1
1234
2147483648 to
MOVL 12345678 D0
+2147483647
Stores 12345678 decimal in D0
and D1.
&0 to
MOVL &12345678 D0
&4294967295
Stores &12345678 decimal in D0
and D1.
#00000000 to
MOVL #12345678 D0
#99999999
Stores #12345678 (BCD) in D0
and D1.
CS/CJ/NSJ Series Instructions Reference Manual (W474)
D0
5678

Advertisement

Table of Contents
loading

Table of Contents