
2.4 Instruction Details
3-136
2
Chapter 2 Instructions
Example
Coding
• When starting operation, $0018 is written into DM0000 and #00050 into DM0001.
Description
• Values are directly written into data memories, without using the internal register.
Note: The contents of the internal register and the arithmetic flag do not change
even after the DW instruction is executed.
Tips
• The DW instruction can be used to reset the contents of data memories.
Operands
Key operation
Arithmetic flag
2009, 2010, 2011 No change
2012 No change
DW: Data Memory Write Directly writes constant into data memory.
DW
nnnn
DMmmmm
DW
2008 #00050
DM0001
DW
$0018
DM0000
DW
Line No. Instruction Operand
0000 LD 2008
0001 DW $0018 DM0000
0002 CON
0003 DW #00050 DM0001
D15 D14 D13 D12 D11 D10 D9 D8 D7 D6 D5 D4 D3 D2 D1 D0
D15 D14 D13 D12 D11 D10 D9 D8 D7 D6 D5 D4 D3 D2 D1 D0
2008 #00000
DM0001
DW
#00000
DM0000
DW
DW
reraly
First operand
Second operand
ENT
R-SRCH
:
First operand
Second operand
Operand
Data memory
DW
Visual KV KV-300 KV-10/16 KV-24/40/80
nnnn: nnnn nnnn nnnn
#00000 to #65535 #00000 to #65535 #00000 to #65535 #00000 to #65535
$0000 to $FFFF $0000 to $FFFF $0000 to $FFFF $0000 to $FFFF
DM mmmm: DMmmmm DMmmmm DMmmmm
DM0000 to DM1999 DM0000 to DM9999 DM0000 to DM0999 DM0000 to DM1999
KVNKA Chap 02_4cP.p65 08.3.11, 0:02 PM136
Kommentare zu diesen Handbüchern