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.

Basic Function <strong>Instruction</strong>FUN 18 D PANDLOGICAL ANDFUN 18 D PANDOperandSa: The register to be ANDedSb: The register to be ANDedD : The register to store the result of ANDThe Sa, Sb, D may combine with V, Z, P0~P9 toserve indirect addressing applicationRangeOperandWX WY WM WS TMR CTR HR IR OR HR HSCR RTCR SR ROR DR KWX0∣WX240WY0∣WY240WM0∣WM1896WS0∣WS984T0∣T255C0∣C255R0∣R3839R3804∣R3903R3904∣R3919R3920∣R4047R4096∣R4127R4128∣R4135R4136∣R4167R5000∣R8071D0∣D409516/32 bit+/-numberSa ○ ○ ○ ○ ○ ○ ○ ○ ○ ○ ○ ○ ○ ○ ○ ○Sb ○ ○ ○ ○ ○ ○ ○ ○ ○ ○ ○ ○ ○ ○ ○ ○D ○ ○ ○ ○ ○ ○ ○ ○ ○ ○ ○* ○* ○●Performs logical AND operation for the data of Sa and Sb when the operation control input "EN" =1 or "EN↑"( P instruction) from 0 to 1. This operation compares the corresponding bits of Sa and Sb (B0~B15 orB0~B31). The bit in the D is set to 1 if both of the corresponding bits data of Sa and Sb is 1. The bit in the D isset to 0 if one of the corresponding bits is 0.ExampleOperation of 16-bit logical ANDLadder diagram Key operations Mnemonic codeORG ORG X 0X018P.ANDEN Sa :Sb :RR01D=0FUN 18PSa : R 0D :R2Sb : R 1D : R 2B15B0↓↓Sa 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=B15B0↓↓D R2 1 0 1 0 1 0 1 0 0 0 1 0 0 1 0 06-35

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

Saved successfully!

Ooh no, something went wrong!