





































Study with the several resources on Docsity
Earn points by helping other students or get them with a premium plan
This page cannot be seen from the preview
Don't miss anything!






































(Microprocessor)
ļ (^) Src operand can be register, memory location or immediate operand. ļ (^) Des can be register or memory operand. ļ (^) Both Src and Des cannot be memory location at the same time. ļ (^) E.g.: ļ (^) MOV CX, 037A H // move 037Ah into CX ļ (^) MOV AL, BL // move BL to AL ļ (^) MOV BX, [0301 H] // Move content of [0301h] into
ļ (^) This instruction exchanges Src with Des. ļ (^) It is not supported to exchange two memory location. ļ (^) E.g.: XCHG DX, AX
ļ (^) It transfers the operand from specified port to accumulator register. ļ (^) E.g.: IN AX, 0028 H // input a word from port 0028H to AX
ļ (^) It transfers the operand from accumulator to specified port. ļ (^) E.g.: OUT 0028 H, AX //copy the content of AX to 0028H ļ (^) OUT 2CH, AX // Copy the contents of the AX to port 2Ch
ļ (^) LES Des, Src: ļ (^) It loads 32-bit pointer from memory source to destination register and ES. ļ (^) The offset is placed in the destination register and the segment is placed in ES. ļ (^) This instruction is very similar to LDS except that it initializes ES instead of DS. ļ (^) E.g.: LES BX, [0301 H]
ļ (^) This LAHF instruction was provided to make conversion of assembly language programs written for 8080 and 8085 to 8086 easier.
ļ (^) It copies the contents of AH to lower byte of flag register.
ļ (^) Pushes flag register to top of stack.
ļ (^) Pops the stack top to flag register.
ļ (^) ADC Des, Src:
ļ§ (^) It increments the byte or word by one. ļ§ (^) The operand can be a register or memory location. ļ§ (^) It affects AF, OF, PF, SF, ZF flags. ļ§ (^) CF is not affected.
ļ§ (^) It decrements the byte or word by one. ļ§ (^) The operand can be a register or memory location. ļ§ (^) It affects AF, OF, PF, SF, ZF flags. ļ§ (^) CF is not affected. ļ§ (^) E.g.: DEC AX
ļ (^) Other ASCII Instructions: ļ (^) AAS (ASCII Adjust after Subtraction) ļ (^) AAM (ASCII Adjust after Multiplication) ļ (^) AAD (ASCII Adjust Before Division)
ļ (^) AAS (ASCII Adjust after Subtraction)
ļ (^) SUB AL, 9; Minus 9 ļ ļ (^) AAM (ASCII Adjust after Multiplication) ļ (^) converts the result of the multiplication of two valid unpacked BCD digits into a valid 2-digit unpacked BCD number and takes AX as an implicit operand. The operand must be range in 0-
ļ (^) AAM unpacks the result by dividing AX by 10, placing the quotient (MSD) in AH and the remainder (LSD) in AL. ļ (^) Example: MOV AL, 5; MOV BL, 7 =MUL BL; Multiply AL by BL, result in AX ļ (^) AAM; After AAM, AX =0305h (BCD 35)
ļ (^) SUB Des, Src:
ļ (^) Subtracting unsigned number ļ (^) CL = 10011100 = 156 decimal, BH = 00110111 = 55 decimal ļ (^) SUB CL, BH; CL = 01100101 = 101 decimal ļCF, AF, SF, ZF = 0, PF = 1 ļ (^) Subtracting signed number ļ (^) CL = 00101110 = + 46 decimal, BH = 01001010= + 74 decimal ļ (^) SUB CL, BH; CL = 11100100 = - 28 decimal ļCF = 1, AF, ZF =0, SF = 1 result negative
ļ (^) It subtracts the two operands and also the borrow from the result. i.e. carry flag is set to 1. ļ (^) It affects AF, CF, OF, PF, SF, ZF flags. ļ (^) E.g.: ļ (^) SBB AL, 74H //AL-74h- ļ (^) SBB DX, AX ļ (^) SBB AX, [BX]