5-75
5 Understanding Programming
CJ2 CPU Unit Software User’s Manual
5-6 Instructions
5
5-6-2 Specifying Operands
Data Operand Data form Symbol Range Application example
16-bit
constant
All binary
data or a lim-
ited range of
binary data
Unsigned
binary
# #0000 to #FFFF MOV #0100 D0
Stores #0100 hex (&256 decimal) in D0.
+#0009 #0001 D1
Stores #000A hex (&10 decimal) in D1.
Signed
decimal
±−32768 to +32767 MOV −100 D0
Stores −100 decimal (#FF9C hex) in D0.
+−9 -1 D1
Stores −10 decimal (#FFF6 hex) in D1.
Unsigned
decimal
& &0 to &65535 MOV &256 D0
Stores −256 decimal (#0100 hex) in D0.
+&9 &1 D1
Stores −10 decimal (#000A hex) in D1.
All BCD data
or a limited
range of BCD
data
BCD # #0000 to #9999 MOV #0100 D0
Stores #0100 (BCD) in D0.
+B #0009 #0001 D1
Stores #0010 (BCD) in D1.
32-bit
constant
All binary
data or a lim-
ited range of
binary data
Unsigned
binary
# #00000000 to
#FFFFFFFF
MOVL #12345678 D0
Stores #12345678 hex in D0 and D1.
Signed
binary
+ −2147483648 to
+2147483647
MOVL −12345678 D0
Stores −12345678 decimal in D0 and D1.
Unsigned
decimal
&&0 to
&4294967295
MOVL &12345678 D0
Stores &12345678 decimal in D0 and D1.
All BCD data
or a limited
range of BCD
data
BCD # #00000000 to
#99999999
MOVL #12345678 D0
Stores #12345678 (BCD) in D0 and D1
D1 D0
1234
5678