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.

2. Programming Concepts<br />

2.14 E, F Index Registers<br />

Index registers are used as modifiers to indicate a specified device (word, double word) by defining<br />

an offset. Devices can be modified includes byte device (KnX, KnY, KnM, KnS, T, C, D) and bit<br />

device (X, Y, M, S). E, F registers cannot be used for modifying constant (K, H) Index registers not<br />

used as a modifier can be used as general purpose register.<br />

Index register [E], [F]<br />

Index registers are 16-bit registers which can be read and written. There are 16 points indicated as<br />

E0~E7 and F0~F7. If you need a 32-bit register, you have to designate E. In this case, F will be<br />

covered up by E and cannot be used. It is recommended to use instruction DMOVP K0 E to reset E<br />

(including F) at power-on.<br />

16-bit<br />

F0<br />

16-bit<br />

E0<br />

32-bit<br />

F0<br />

High word<br />

E0<br />

Low word<br />

The combinations of E and F when designating a 32-bit register are:<br />

(E0, F0) , (E1, F1) (E2, F2) (E3, F3) (E4, F4) , (E5, F5) (E6, F6) (E7, F7)<br />

Example:<br />

When X0 = ON and E0 = 8, F0 = 14, D5E0 = D(5+8) = D13, D10F0 = D(10+14) = D24, the content<br />

in D13 will be moved to D24.<br />

X0<br />

MOV<br />

K8<br />

E0<br />

MOV<br />

K14<br />

F0<br />

MOV<br />

D5E0<br />

D10F0<br />

2.15 Nest Level Pointer[N], Pointer[P], Interrupt Pointer [I]<br />

N Master control nested N0~N7, 8 points<br />

The control point of<br />

master control nested<br />

Pointer<br />

P For CJ, CALL instructions P0~P255, 256 points<br />

The location point of CJ,<br />

CALL<br />

2-51

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

Saved successfully!

Ooh no, something went wrong!