13.07.2015 Views

[Instruction] Contents

[Instruction] Contents

[Instruction] Contents

SHOW MORE
SHOW LESS

Create successful ePaper yourself

Turn your PDF publications into a flip-book with our unique Google optimized e-Paper software.

Advanced Function <strong>Instruction</strong>FUN 35 D PXOREXCLUSIVE ORFUN 35 D PXORSa : Source data a for exclusive or operationSb :Source data b for exclusive or operationD : Register storing XOR resultsSa, Sb, D may combine with V, Z, P0~P9 toserve indirect 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∣D409516/32bit+/-numberP0~P9Sa ○ ○ ○ ○ ○ ○ ○ ○ ○ ○ ○ ○ ○ ○Sb ○ ○ ○ ○ ○ ○ ○ ○ ○ ○ ○ ○ ○ ○D ○ ○ ○ ○ ○ ○ ○ ○* ○* ○ ○V、Z• When operation control "EN" = 1 or "EN↑" ( P instruction) changes from 0 to 1, will perform the logicalXOR (exclusive or) operation of data Sa and Sb. The operation of this function is to compare thecorresponding bits of Sa and Sb (B0~B15 or B0~B31), and if bits at the same position have different status,then set the corresponding bit within D as 1, otherwise as 0.• After the operation, if all the bits in D are all 0, then set the 0 flag "D = 0" to 1.X035P.XOREN Sa :Sb :RR01D=0• The instruction at left makes a logical XOR operationusing the R0 and R1 registers, and stores the resultin R2.D :R 2Sa R0 1 0 1 1 1 0 1 1 0 1 1 0 1 1 0 1Sb R1 1 1 1 0 1 1 1 0 1 0 1 0 0 1 1 0 X0=D R2 0 1 0 1 0 1 0 1 1 1 0 0 1 0 1 17-12

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

Saved successfully!

Ooh no, something went wrong!