12.07.2015 Views

80C186EB/80C188EB Microprocessor User's Manual - CEUNES

80C186EB/80C188EB Microprocessor User's Manual - CEUNES

80C186EB/80C188EB Microprocessor User's Manual - CEUNES

SHOW MORE
SHOW LESS

Create successful ePaper yourself

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

80C186 INSTRUCTION SET ADDITIONS AND EXTENSIONSA.2.2Arithmetic InstructionsIMUL destination, source, dataIMUL (integer immediate multiply, signed) allows a value to be multiplied by an immediate operand.IMUL requires three operands. The first, destination, is the register where the result willbe placed. The second, source, is the effective address of the multiplier. The source may be thesame register as the destination, another register or a memory location. The third, data, is an immediatevalue used as the multiplicand. The data operand may be a byte or word. If data is a byte,it is sign extended to 16 bits. Only the lower 16 bits of the result are saved. The result must beplaced in a general-purpose register.A.2.3Bit Manipulation InstructionsThis section describes the eight enhanced bit-manipulation instructions.A.2.3.1Shift InstructionsSAL destination, countSAL (immediate shift arithmetic left) shifts the destination operand left by an immediate value.SAL has two operands. The first, destination, is the effective address to be shifted. The second,count, is an immediate byte value representing the number of shifts to be made. The CPU willAND count with 1FH before shifting, to allow no more than 32 shifts. Zeros shift in on the right.SHL destination, countSHL (immediate shift logical left) is physically the same instruction as SAL (immediate shiftarithmetic left).SAR destination, countSAR (immediate shift arithmetic right) shifts the destination operand right by an immediate value.SAL has two operands. The first, destination, is the effective address to be shifted. The second,count, is an immediate byte value representing the number of shifts to be made. The CPUwill AND count with 1FH before shifting, to allow no more than 32 shifts. The value of the originalsign bit shifts into the most-significant bit to preserve the initial sign.SHR destination, countSHR (immediate shift logical right) is physically the same instruction as SAR (immediate shiftarithmetic right).A-9

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

Saved successfully!

Ooh no, something went wrong!