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 14 D P(/)SymbolDIVISION(Performs division of the data specified at Sa and Sb and stores the result in D)FUN 14 D P(/)OperandSa: DividendSb: DivisorD : Destination register to store the resultsof the division.Sa, Sb, D may combine with V, Z, P0~P9to serve indirect addressingRangeOperandWX 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/32-bit+/− numberSa ○ ○ ○ ○ ○ ○ ○ ○ ○ ○ ○ ○ ○ ○Sb ○ ○ ○ ○ ○ ○ ○ ○ ○ ○ ○ ○ ○ ○D ○ ○ ○ ○ ○ ○ ○ ○* ○* ○ ○V、ZP0~P9Description●Performs the division of the data specified at Sa and Sb and writes the quotient and remainder to registersspecified by register D when the division control input "EN" =1 or "EN↑" ( P instruction) from 0 to 1. If thequotient of division is equal to 0 then set FO0 to 1. If the divisor Sb=0 then set the error flag FO1 to 1 withoutexecuting the instruction.Example 116-bit divisionLadder Diagram Key Operations Mnemonic CodesX0ENU/S14P.(/)Sa: RSb: RD : R012D=0ERRORG ORG X 0FUN 14Sa: R 0Sb: R 1D: R 2Sa÷ SbR0256R112DividendDivisorDR3R24 21Remainder Quotient6-30

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

Saved successfully!

Ooh no, something went wrong!