Skip to main content

  • Addressing modes of microprocessor 8085



The way of specifying data to be operated by an instruction is called addressing
Types of addressing modes –
In 8085 microprocessor there are 5 types of addressing modes:

  1. Immediate Addressing Mode –
    In immediate addressing mode the source operand is always data. If the data is 8-bit, then the instruction will be of 2 bytes, if the data is of 16-bit then the instruction will be of 3 bytes.
    Examples:
    MVI B 45 (move the data 45H immediately to register B)
    LXI H 3050 (load the H-L pair with the operand 3050H immediately)
    JMP address (jump to the operand address immediately).


  1. Register Addressing Mode –
    In register addressing mode, the data to be operated is available inside the register(s) and register(s) is(are) operands. Therefore the operation is performed within various registers of the microprocessor.
    Examples:
    MOV A, B (move the contents of register B to register A)
    ADD B (add contents of registers A and B and store the result in register A)
    INR A (increment the contents of register A by one)
  2. Direct Addressing Mode –
    In direct addressing mode, the data to be operated is available inside a memory location and that memory location is directly specified as an operand. The operand is directly available in the instruction itself.
    Examples:
    LDA 2050 (load the contents of memory location into accumulator A)
    LHLD address (load contents of 16-bit memory location into H-L register pair)
    IN 35 (read the data from port whose address is 01)
  3. Register Indirect Addressing Mode –
    IN register indirect addressing mode, the data to be operated is available inside a memory location and that memory location is indirectly specified b a register pair.
    Examples:
    MOV A, M (move the contents of the memory location pointed by the H-L pair to the accumulator)
    LDAX B (move contains of B-C register to the accumulator)
    LXIH 9570 (load immediate the H-L pair with the address of the location 9570)
  4. Implied/Implicit Addressing Mode –
    In implied/implicit addressing mode the operand is hidden and the data to be operated is available in the instruction itself.
    Examples:
    CMA (finds and stores the 1’s complement of the contains of accumultor A in A)
    RRC (rotate accumulator A right by one bit)
    RLC (rotate accumulator A left by one bit)

Interrupts in 8085

Interrupts are the signals generated by the external devices to request the microprocessor to perform a task. There are 5 interrupt signals, i.e. TRAP, RST 7.5, RST 6.5, RST 5.5, and INTR.
Interrupt are classified into following groups based on their parameter −
  • Vector interrupt − In this type of interrupt, the interrupt address is known to the processor. For example: RST7.5, RST6.5, RST5.5, TRAP.
  • Non-Vector interrupt − In this type of interrupt, the interrupt address is not known to the processor so, the interrupt address needs to be sent externally by the device to perform interrupts. For example: INTR.
  • Maskable interrupt − In this type of interrupt, we can disable the interrupt by writing some instructions into the program. For example: RST7.5, RST6.5, RST5.5.
  • Non-Maskable interrupt − In this type of interrupt, we cannot disable the interrupt by writing some instructions into the program. For example: TRAP.
  • Software interrupt − In this type of interrupt, the programmer has to add the instructions into the program to execute the interrupt. There are 8 software interrupts in 8085, i.e. RST0, RST1, RST2, RST3, RST4, RST5, RST6, and RST7.
  • Hardware interrupt − There are 5 interrupt pins in 8085 used as hardware interrupts, i.e. TRAP, RST7.5, RST6.5, RST5.5, INTA.
Note − NTA is not an interrupt, it is used by the microprocessor for sending acknowledgement. TRAP has the highest priority, then RST7.5 and so on.

Interrupt Service Routine (ISR)

A small program or a routine that when executed, services the corresponding interrupting source is called an ISR.

TRAP

It is a non-maskable interrupt, having the highest priority among all interrupts. Bydefault, it is enabled until it gets acknowledged. In case of failure, it executes as ISR and sends the data to backup memory. This interrupt transfers the control to the location 0024H.

RST7.5

It is a maskable interrupt, having the second highest priority among all interrupts. When this interrupt is executed, the processor saves the content of the PC register into the stack and branches to 003CH address.

RST 6.5

It is a maskable interrupt, having the third highest priority among all interrupts. When this interrupt is executed, the processor saves the content of the PC register into the stack and branches to 0034H address.

RST 5.5

It is a maskable interrupt. When this interrupt is executed, the processor saves the content of the PC register into the stack and branches to 002CH address.

INTR

It is a maskable interrupt, having the lowest priority among all interrupts. It can be disabled by resetting the microprocessor.
When INTR signal goes high, the following events can occur −
  • The microprocessor checks the status of INTR signal during the execution of each instruction.
  • When the INTR signal is high, then the microprocessor completes its current instruction and sends active low interrupt acknowledge signal.
  • When instructions are received, then the microprocessor saves the address of the next instruction on stack and executes the received instruction.

Comments

Popular posts from this blog

Java Inheritance Introduction to Java Inheritance  Inheritance का ऐसा Machanisam है जिसमे एक old class से new class create किया जाता हे इस के द्वारा old class की properties को new class में प्रयोग किया जाता हे old class की properties को new class में प्रयोग करने के लिए old class की inherit करना होता है| और class को inherit करने के लिए derivation public, private and protected का प्रयोग किया जाता है|  inheritance में old class को base class या parent class or super class कहा जाता है, जिस class की property ली जाती है| और नई class को child class या derive class या sub class कहा जाता है, जिस class के द्वारा property ली जाती है| ऐसा करने के लिए जो class methods को access करना चाहती है उसे दूसरी class की sub class बनना होगा। Sub class बनने के लिए आपकी class को उस दूसरी class को extend करना होगा। इसे ही inheritance कहते है।  Inheritance से आप एक ही code को बार बार लिखने की उलझन से बच जाते है। Inheritance की इस खूबी को re-usability कहते है। यान...
Java Applets  Introduction to Java Applets  Applet एक java program होता है जो browser में run होता है। ये एक ऐसा प्रोग्राम होता है जो HTML के साथ काम कर सकता है। इसे HTML code में ही include कर लिया जाता है। Java program की file और HTML program की files अलग अलग होती है। HTML में java program को load करने के लिए आप <applet> tag यूज़ करते है। जब कोई भी यूज़र इस HTML पेज को browser पर देखता है तो HTML के साथ java program भी load हो जाता है। लेकिन इसके लिए आपको applet (java program) को और HTML file को एक ही server पर save करना पड़ता है।  Applet ऐसा java program होता है जो Applet class को extend करता है। Applet program को .class extension से save किया जाता है। जब कोई यूज़र browser में applet को देखता है तो applet का code उस user की machine में download हो जाता है। पहले applet का code user की machine में download होता है फिर applet browser में रन होता है। इसलिए आप कह सकते है की applets client side applications होती है।Applets को run होने के लिए...
Introduction to C Arrays  मान लीजिये आप एक ऐसा प्रोग्राम बना रहे है जो employees का नाम computer में store करता है। अब मान लीजिये आपकी company में 200 employees है। आप इन 200 employees के नाम किस तरह से store करेंगे। यदि आप सोच रहे है की आप 200 variables create करेंगे तो ये एक बहुत ही complex approach होगी।  इसमें आपको program बनाने में बहुत समय लग जायेगा और program भी हद से ज्यादा बड़ा हो जायेगा। ये आपके time और computer memory space दोनों का wastage है। और साथ ही आप इतने सारे variables के नाम सोच भी नहीं सकते है और यदि सोच भी लेंगे तो program में यूज़ करने के लिए उन्हें याद तो definitely नहीं रख सकते है।   मेरे पास आपके लिए इससे भी better approach है और उस approach को C language में array कहते है। Array similar type की values का collection होता है। Similar type से यँहा मेरा मतलब एक ही तरह के data type जैसे की int, float, char आदि की values से है।   C आपको arrays के द्वारा ऐसी facility provide करती है की...