13.07.2015 Views

[Instruction] Contents

[Instruction] Contents

[Instruction] Contents

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.

Advanced Function <strong>Instruction</strong>FUN 51 D PSHFLSHIFT LEFTFUN 51 D PSHFLShift controlENLadder symbol51DP.SHFLD :OTBShift-out bitD : Register to be shiftedN : Number of bits to be shiftedN :N, D may combine with V, Z, P0~P9 to serveindirect address applicationShift in bitINBERRN value errorOperandRangeWX WY WM WS TMR CTR HR IR OR SR ROR DR K XRWX0∣WX240WY0∣WY240WM0∣WM1896WS0∣WS984T0∣T255C0∣C255R0∣R3839R3840∣R3903R3904∣R3967R3968∣R4167R5000∣R8071D0∣D40951 1∣ or ∣16 32P0~P9D ○ ○ ○ ○ ○ ○ ○ ○* ○* ○ ○N ○ ○ ○ ○ ○ ○ ○ ○ ○ ○ ○ ○ ○ ○V、Z• When shift control "EN" = 1 or "EN↑" ( P instruction) has a transition from 0 to 1, will shift the data of the Dregister towards the left by N successive bits (in ascending order). After the lowest bit B0 has been shiftedleft, its position will be replaced by shift-in bit INB, while the status of shift-out bits B15 or B31 ( D instruction)will appear at shift-out bit "OTB".• If the operand is 16 bit, the effective range of N is 1~16. For 32 bits ( D instruction) operand, it is 1~32.Beyond this range, will set the N value error flag "ERR" to 1, and do not carry out this instruction.X0EN51P.SHFLD : R 0OTBY0• The instruction at left shifts the data in register R0towards the left by 4 successive bits. The results areshown below.INBN :4ERRY0 B15 R0 B0 INB← 0 0 1 1 0 0 1 0 1 1 1 1 0 0 0 0 ← 1* △ X0=Y0 B15 R0 B0 INB1 0 0 1 0 1 1 1 1 0 0 0 0 1 1 1 1 1* △ △ △ △ △7-26

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

Saved successfully!

Ooh no, something went wrong!