MICROPROCESSORS

The microprocessor contains all, or most of, the central processing unit (CPU) functions and is the "engine" that goes into motion when you turn your computer on. A microprocessor is designed to perform arithmetic and logic operations that make use of small number-holding areas called registers.

Friday 20 May 2016

INSTRUCTION SET OF 8086/8088 processor

Data Copy/Transfer Instructions
               This type of instructions is used to transfer data from source operand to destination operand. All the store, move, load, exchange, input and output instructions belong to this category.1. MOV (Move): This data transfer instruction transfers data from one register/memory location to another register/memory location. The source may be any one of the segment registers or other general or special purpose registers or memory location or immediate data. The destination may register or memory location. However, in case of immediate addressing mode, a segment registercannot be a destination register. Note that both operands cannot be both memory locations. No flags are affected.
Ex. MOV AX, 5000H; Immediate AM
MOV AX, BX; Register AM
MOV AX, [SI]; Indirect AM
MOV AX, [2000H]; Direct AM
MOV AX, 5OH [BX]; Based relative, 50H Displacement
2. PUSH (Push to Stack): This instruction pushes the contents of the specified register/memory location onto the stack. The push operation decrements SP by two and then stores the contents of the operand onto the stack. The higher byte is pushed first and then the lower byte.
Ex. PUSH AX PUSH DS PUSH [5000H]; content of location 5000H and 5001H in DS are pushed onto the stack. 3. POP (Pop from Stack): This instruction when executed, loads the specified register/memory location with the contents of the memory location of which the address is formed using the current stack segment and stack pointer as usual. The stack pointer is incremented by 2. The POP instruction serves exactly opposite to the PUSH instruction. Ex. POP AX POP DS4. XCHG (Exchange): This instruction exchanges the contents of the specified source and destination operands, which may be registers or one of them may be a memory location. EX. XCHG [5000H], AX; exchanges data between AX and a memory location [5000H]5. IN (Input the port): This instruction is used for reading an input port. The address of the input port may be specified in the instruction directly or indirectly. AL and AX are the allowed destinations for 8 and 16-bit input operations. DX is the only register (implicit) which is allowed to carry the port address.EX. IN AL, 0300H; reads data from an 8-bit port whose address is 0300H and stores it in AL. IN AX, DX; reads data from a 16-bit port whose address is in DX and stores it in AX. 6. OUT (Output to the Port): This instruction is used for writing to an output port. The address of the output port may be specified in the instruction directly or implicitly in DX. Contents of AX or AL are transferred to a directly or indirectly addressed port after execution of this instruction.EX. OUT 0300H, AL; this sends data available in AL to a port whose address is 0300H.OUT DX, AX; this sends data in AX to a port whose address is specified implicitly in DX.7. LEA (Load Effective Address): This instruction loads the offset of an operand in the specified register. Ex. LEA BX, ADR; loads the offset of the label ADR in BX.8. LDS/LES (Load Pointer to DS/ES): The instruction, Load DS/ES with pointer, loads the DS or ES register and the specified destination register in the instruction with the content of memory location specified as source in the instruction.
"""A leader is one who knows the way, goes the way, and shows the way""".  
 @John C. Maxwell

1 comment: