17.03.2014 Views

DVP-ES2-EX2-SS2-SA2-SX2-Operation Manual

DVP-ES2-EX2-SS2-SA2-SX2-Operation Manual

DVP-ES2-EX2-SS2-SA2-SX2-Operation Manual

SHOW MORE
SHOW LESS

You also want an ePaper? Increase the reach of your titles

YUMPU automatically turns print PDFs into web optimized ePapers that Google loves.

3. Instruction Set<br />

1. X, Y, M, and S are defined as bit devices which indicate ON/OFF status.<br />

2. 16-bit (or 32-bit) devices T, C, D, and registers E, F are defined as word devices.<br />

3. “Kn” can be placed before bit devices X, Y, M and S to make it a word device for performing<br />

word-device operations. (n = 1 refers to 4 bits. For 16-bit instruction, n = K1 ~ K4; for 32-bit<br />

instruction, n = K1 ~ K8). For example, K2M0 refers to 8 bits, M0 ~ M7.<br />

X0<br />

MOV<br />

K2M0<br />

D10<br />

When X0 = ON, the contents in M0 ~ M7 will be<br />

moved to b0 ~b7 in D10 and b8 ~b15 will be<br />

set to “0”.<br />

Kn values<br />

16-bit instruction<br />

32-bit instruction<br />

Designated value: K-32,768 ~ K32,767<br />

Designated value: K-2,147,483,648 ~<br />

K2,147,483,647<br />

16-bit instruction: (K1~K4)<br />

32-bit instruction: (K1~K8)<br />

K1 (4 bits) 0~15 K1 (4 bits) 0~15<br />

K2 (8 bits) 0~255 K2 (8 bits) 0~255<br />

K3 (12 bits) 0~4,095 K3 (12 bits) 0~4,095<br />

K4 (16 bits) -32,768~+32,767 K4 (16 bits) 0~65,535<br />

K5 (20 bits) 0~1,048,575<br />

K6 (24 bits) 0~167,772,165<br />

K7 (28 bits) 0~268,435,455<br />

K8 (32 bits) -2,147,483,648~+2,147,483,647<br />

Flags<br />

1. General Flags<br />

The flags listed below are used for indicating the operation result of the application<br />

instruction:<br />

M1020: Zero flag<br />

M1021: Borrow flag<br />

M1022: Carry flag<br />

M1029: Execution of instruction is completed<br />

All flags will turn ON or OFF according to the operation result of an instruction. For example,<br />

the execution result of instructions ADD/SUB/MUL/DVI will affect the status of M1020 ~<br />

M1022. When the instruction is not executed, the ON/OFF status of the flag will be held. The<br />

status of the four flags relates to many instructions. See relevant instructions for more<br />

details.<br />

3-17

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!