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 53 D PROTLROTATE LEFTFUN 53 D PROTLD : Register to be rotatedN : Number of bits to be rotatedD, N may combine with V, Z , P0~P9 to serveindirect address applicationOperandRangeWX 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 rotate control "EN" = 1 or "EN↑" ( P instruction) has a transition from 0 to 1, will rotate the data of Dregister towards the left by N successive bits (in ascending order, ie. in a 16-bit instruction, B0→B1, B1→B2, .... , B14→B15, B15→B0. In a 32-bit instruction, B0→B1, B1→B2, .... , B30→B31, B31→B0). At thesame time, the status of the rotated out bits B15 or B31 ( D instruction) will appear at rotate-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.• The instruction at left rotates data from the R0X053P.ROTLEN D : R 0 OTBY0register towards the left 9 successive bits. Theresults are shown below.N : 9ERRR0B01 1 1 1 0 0 0 0 1 0 1 0 1 0 1 0*Y0 X0=B15 R0 B00 1 0 1 0 1 0 1 1 1 1 0 0 0 0 1*1 Y0*7-28

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

Saved successfully!

Ooh no, something went wrong!