Complete8086Instructions - Complete 8086 instruction set...

This preview shows page 1 - 6 out of 55 pages.

8086 Instructions Set…. - 1 - Complete 8086 instruction set Quick reference: AAA AAD AAM AAS ADC ADD AND CALL CBW CLC CLD CLI CMC CMP CMPSB CMPSW CWD DAA DAS DEC DIV HLT IDIV IMUL IN INC INT INTO IRET JA JAE JB JBE JC JCXZ JE JG JGE JL JLE JMP JNA JNAE JNB JNBE JNC JNE JNG JNGE JNL JNLE JNO JNP JNS JNZ JO JP JPE JPO JS JZ LAHF LDS LEA LES LODSB LODSW LOOP LOOPE LOOPNE LOOPNZ LOOPZ MOV MOVSB MOVSW MUL NEG NOP NOT OR OUT POP POPA POPF PUSH PUSHA PUSHF RCL RCR REP REPE REPNE REPNZ REPZ RET RETF ROL ROR SAHF SAL SAR SBB SCASB SCASW SHL SHR STC STD STI STOSB STOSW SUB TEST XCHG XLATB XOR Operand types: REG : AX, BX, CX, DX, AH, AL, BL, BH, CH, CL, DH, DL, DI, SI, BP, SP. SREG : DS, ES, SS, and only as second operand: CS. memory : [BX], [BX+SI+7], variable, etc...(see Memory Access ). immediate : 5, -24, 3Fh, 10001101b, etc...
Image of page 1

Subscribe to view the full document.

8086 Instructions Set…. - 2 - Instructions in alphabetical order: Instruction Operands Description AAA No operands ASCII Adjust after Addition. Corrects result in AH and AL after addition when working with BCD values. It works according to the following Algorithm: if low nibble of AL > 9 or AF = 1 then: AL = AL + 6 AH = AH + 1 AF = 1 CF = 1 else AF = 0 CF = 0 in both cases: clear the high nibble of AL. Example: MOV AX, 15 ; AH = 00, AL = 0Fh AAA ; AH = 01, AL = 05 RET C Z S O P A r ? ? ? ? r AAD No operands ASCII Adjust before Division. Prepares two BCD values for division. Algorithm: AL = (AH * 10) + AL AH = 0 Example: MOV AX, 0105h ; AH = 01, AL = 05 AAD ; AH = 00, AL = 0Fh (15)
Image of page 2
8086 Instructions Set…. - 3 - RET C Z S O P A ? r r ? r ? AAM No operands ASCII Adjust after Multiplication. Corrects the result of multiplication of two BCD values. Algorithm: AH = AL / 10 AL = remainder Example: MOV AL, 15 ; AL = 0Fh AAM ; AH = 01, AL = 05 RET C Z S O P A ? r r ? r ? AAS No operands ASCII Adjust after Subtraction. Corrects result in AH and AL after subtraction when working with BCD values. Algorithm: if low nibble of AL > 9 or AF = 1 then: AL = AL - 6 AH = AH - 1 AF = 1 CF = 1 else AF = 0 CF = 0 in both cases: clear the high nibble of AL.
Image of page 3

Subscribe to view the full document.