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

You also want an ePaper? Increase the reach of your titles

YUMPU automatically turns print PDFs into web optimized ePapers that Google loves.

INSTRUCTION SET DESCRIPTIONSTable C-4. Instruction Set (Continued)Name Description OperationCMPCMPSNOTE:Compare:CMP dest, srcSubtracts the source from the destination,which may be bytes or words,but does not return the result. Theoperands are unchanged, but the flagsare updated and can be tested by asubsequent conditional jumpinstruction. The comparison reflectedin the flags is that of the destination tothe source. If a CMP instruction isfollowed by a JG (jump if greater)instruction, for example, the jump istaken if the destination operand isgreater than the source operand.Instruction Operands:CMP reg, regCMP reg, memCMP mem, regCMP reg, immedCMP mem, immedCMP accum, immedCompare String:CMPS dest-string, src-stringSubtracts the destination byte or wordfrom the source byte or word. Thedestination byte or word is addressedby the destination index (DI) registerand the source byte or word isaddresses by the source index (SI)register. CMPS updates the flags toreflect the relationship of thedestination element to the sourceelement but does not alter eitheroperand and updates SI and DI topoint to the next string element.Instruction Operands:CMP dest-string, src-stringCMP (repeat) dest-string, src-string(dest) – (src)(dest-string) – (src-string)if(DF) = 0then(SI) ← (SI) + DELTA(DI) ← (DI) + DELTAelse(SI) ← (SI) – DELTA(DI) ← (DI) – DELTAThe three symbols used in the Flags Affected column are defined as follows:– the contents of the flag remain unchanged after the instruction is executed? the contents of the flag is undefined after the instruction is executedüthe flag is updated after the instruction is executedFlagsAffectedAF üCF üDF –IF –OF üPF üSF üTF –ZF üAF üCF üDF –IF –OF üPF üSF üTF –ZF üC-10

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

Saved successfully!

Ooh no, something went wrong!