Skip to main content
Addressing modes of microprocessor 8086



8086



The way of specifying data to be operated by an instruction is known as addressing modes. This specifies that the given data is an immediate data or an address. It also specifies whether the given operand is register or register pair.
Types of addressing modes:

  1. Register mode – In this type of addressing mode both the operands are registers.
    Example:
    MOV AX, BX
    XOR AX, DX
    ADD AL, BL
  2. Immediate mode – In this type of addressing mode the source operand is a 8 bit or 16 bit data. Destination operand can never be immediate data.
    Example:
    MOV AX, 2000
    MOV CL, 0A
    ADD AL, 45
    AND AX, 0000
    Note that to initialize the value of segment register an register is required.
    MOV AX, 2000
    MOV CS, AX 
  3. Displacement or direct mode – In this type of addressing mode the effective address is directly given in the instruction as displacement.
    Example:
    MOV AX, [DISP]
    MOV AX, [0500]
  4. Register indirect mode – In this addressing mode the effective address is in SI, DI or BX.
    Example:
    MOV AX, [DI]
    ADD AL, [BX]
    MOV AX, [SI] 
  5. Based indexed mode – In this the effective address is sum of base register and index register.
    Base register: BX, BP
    Index register: SI, DI 
    The physical memory address is calculated according to the base register.
    Example:
    MOV AL, [BP+SI]
    MOV AX, [BX+DI]
  6. Indexed mode – In this type of addressing mode the effective address is sum of index register and displacement.
    Example:
    MOV AX, [SI+2000]
    MOV AL, [DI+3000]
  7. Based mode – In this the effective address is the sum of base register and displacement.
    Example:
    MOV AL, [BP+ 0100]
  8. Based indexed displacement mode –In this type of addressing mode the effective address is the sum of index register, base register and displacement.
    Example:
    MOV AL, [SI+BP+2000] 
  9. String mode – This addressing mode is related to string instructions. In this the value of SI and DI are auto incremented and decremented depending upon the value of directional flag.
    Example:
    MOVS B
    MOVS W 
  10. Input/Output mode – This addressing mode is related with input output operations.
    Example:
    IN A, 45
    OUT A, 50 
  11. Relative mode –
    In this the effective address is calculated with reference to instruction pointer.
    Example:
    JNZ 8 bit address
    IP=IP+8 bit address 

Comments

Popular posts from this blog

    METACHAR ACTER   UNIX  shell  अनेक मेटाचारेक्टर प्रोवाइड करता है जो किसी भी शैल स्कफ्रिप्त में उनका उसे करते टाइम विषेस माइनिंग रखते और जब तक काशी सोवळे नहीं हो जाते तब काट किसी वर्ड का एंडिंग का कारन बनते है।                                                     ex:--     एक directory में फिलो को लिस्टिंग करते टाइम एक सिंगल चैरेक्टर में रखा जाता है और * एक से अधिक वर्ड को मैचेस करता है यह शैल के अधिकांश पत्रों को लिस्ट दी गयी है जिन्हे metacharacter बोला  जाता है.   * ? [ ] " ' \    /    $ : ; ( ) | ^ < >  \.   नई लाइन स्पेस तब   #!/bin/sh  echo hello; word  #!/bin/sh  echo "I have \$1200" 1. <  single quotes : all special charecters between these quotes lose their special.  ex. --...
Until loop  The  until  loop is very similar to the  while  loop, except that the loop executes until the  TEST-COMMAND  executes successfully. As long as this command fails, the loop continues. The syntax is the same as for the  while  loop: until TEST-COMMAND; do CONSEQUENT-COMMANDS; done The return status is the exit status of the last command executed in the  CONSEQUENT-COMMANDS  list, or zero if none was executed. TEST-COMMAND  can, again, be any command that can exit with a success or failure status, and  CONSEQUENT-COMMANDS  can be any UNIX command, script or shell construct. Example :--            Write a shell script to display first ten positive numbers using until loop.                                     Program num=1 until [ $num –gt 10 ]; do echo num ...