top of page

ADDRESSING MODES OF 8051(8051 के एड्रेसिंग मोड)

Updated: Mar 8, 2024

The microcontroller 8051 instructions set includes 110 instructions, 49 of which are single byte instructions, 45 are two bytes instructions and 17 are three bytes R instructions.

The instructions format consists of a function mnemonic followed by destination and source field.

माइक्रोकंट्रोलर 8051 निर्देश सेट में 110 निर्देश शामिल हैं, जिनमें से 49 एकल बाइट निर्देश हैं, 45 दो बाइट निर्देश हैं और 17 तीन बाइट आर निर्देश हैं।

निर्देश प्रारूप में गंतव्य और स्रोत फ़ील्ड के बाद एक फ़ंक्शन निमोनिक शामिल होता है।

ADDRESSING MODES OF 8051 : The way in which the data operands are accessed by different instructions is known as the addressing modes. There are various methods of denoting the data operands in the instruction. The 8051 microcontroller supports mainly 5 addressing modes. They are

8051 के एड्रेसिंग मोड(संबोधन मोड): जिस तरह से डेटा ऑपरेंड को विभिन्न निर्देशों द्वारा एक्सेस किया जाता है उसे एड्रेसिंग मोड के रूप में जाना जाता है। निर्देश में डेटा ऑपरेंड को दर्शाने की विभिन्न विधियाँ हैं। 8051 माइक्रोकंट्रोलर मुख्य रूप से 5 एड्रेसिंग मोड का समर्थन करता है। वे हैं

1.Immediate addressing mode(तत्काल एड्रेसिंग मोड)

2.Direct Addressing mode (डायरेक्ट एड्रेसिंग मोड)

3.Register addressing mode(रजिस्टर एड्रेसिंग मोड )

4. Register Indirect addressing mode(रजिस्टर इनडायरेक्ट एड्रेसिंग मोड )

5.Indexed addressing mode(अनुक्रमित एड्रेसिंग मोड)


Immediate addressing mode(तत्काल एड्रेसिंग मोड) : The addressing mode in which the data operand is a constant and it is a part of the instruction itself is known as Immediate addressing mode. Normally the data must be preceded by a # sign. This addressing mode can be used to transfer the data into any of the registers including DPTR.

एड्रेसिंग मोड जिसमें डेटा ऑपरेंड एक स्थिरांक है और यह निर्देश का एक हिस्सा है, उसे तत्काल एड्रेसिंग मोड के रूप में जाना जाता है। आम तौर पर डेटा के पहले # चिह्न होना चाहिए। इस एड्रेसिंग मोड का उपयोग डेटा को DPTR सहित किसी भी रजिस्टर में स्थानांतरित करने के लिए किया जा सकता है।

Example(उदाहरण):

MOV A , # 27 H : The data (constant) 27 is moved to the accumulator register

MOV A , # 27 H : डेटा (स्थिर) 27 को संचायक रजिस्टर में ले जाया जाता है

ADD R1 ,#45 H : Add the constant 45 to the contents of the accumulator

ADD R1 ,#45 H : संचायक की सामग्री में स्थिरांक 45 जोड़ें

MOV DPTR ,# 8245H :Move the data 8245 into the data pointer register.

MOV DPTR ,# 8245H : डेटा 8245 को डेटा पॉइंटर रजिस्टर में ले जाएँ।

Direct addressing mode (डायरेक्ट एड्रेसिंग मोड): The addressing mode in which the data operand is in the RAM location (00 - 7FH) and the address of the data operand is given in the instruction is known as Direct addressing mode. The direct addressing mode uses the lower 128 bytes of Internal RAM and the SFRs

एड्रेसिंग मोड जिसमें डेटा ऑपरेंड रैम लोकेशन (00 - 7FH) में होता है और डेटा ऑपरेंड का पता निर्देश में दिया जाता है, उसे डायरेक्ट एड्रेसिंग मोड के रूप में जाना जाता है। डायरेक्ट एड्रेसिंग मोड आंतरिक रैम और एसएफआर के निचले 128 बाइट्स का उपयोग करता है

MOV R1, 42H : Move the contents of RAM location 42 into R1 register

 MOV R1, 42H :RAM स्थान 42 की सामग्री को R1 रजिस्टर में ले जाएँ

MOV 49H,A : Move the contents of the accumulator into the RAM location 49.

 MOV 49H,A : संचायक की सामग्री को रैम स्थान 49 में ले जाएँ।

ADD A, 56H : Add the contents of the RAM location 56 to the accumulator

ADD A, 56H : RAM स्थान 56 की सामग्री को संचायक में जोड़ें

Register addressing mode(रजिस्टर एड्रेसिंग मोड ) : The addressing mode in which the data operand to be manipulated lies in one of the registers is known as register addressing mode.

वह एड्रेसिंग मोड जिसमें हेरफेर किए जाने वाले डेटा ऑपरेंड को किसी एक रजिस्टर में रखा जाता है, रजिस्टर एड्रेसिंग मोड के रूप में जाना जाता है।

Example(उदाहरण):

MOV A,R0 : Move the contents of the register R0 to the accumulator

MOV A,R0 : रजिस्टर R0 की सामग्री को संचायक में ले जाएँ

ADD A,R6 :Add the contents of R6 register to the accumulator

ADD A,R6 : R6 रजिस्टर की सामग्री को संचायक में जोड़ें

MOV P1, R2 : Move the contents of the R2 register into port 1

MOV P1, R2 : R2 रजिस्टर की सामग्री को पोर्ट 1 में ले जाएँ

MOVR5, R2: This is invalid .The data transfer between the registers is not allowed.

MOVR5, R2: यह अमान्य है। रजिस्टरों के बीच डेटा स्थानांतरण की अनुमति नहीं है।


Register Indirect addressing mode(रजिस्टर इनडायरेक्ट एड्रेसिंग मोड ) : The addressing mode in which a register is used as a pointer to the data memory block is known as Register indirect addressing mode.

एड्रेसिंग मोड जिसमें एक रजिस्टर को डेटा मेमोरी ब्लॉक के पॉइंटर के रूप में उपयोग किया जाता है, रजिस्टर इनडायरेक्ट एड्रेसिंग मोड के रूप में जाना जाता है।

Example(उदाहरण):

MOV A,@ R0 :Move the contents of RAM location whose address is in R0 into A (accumulator)

MOV A,@ R0 : RAM स्थान की सामग्री, जिसका पता R0 में है, को A (संचायक) में ले जाएँ

MOV @ R1 , B : Move the contents of B into RAM location whose address is held by R1

When R0 and R1 are used as pointers, they must be preceded by @ sign,One of the advantages of register indirect addressing mode is that it makes accessing the data more dynamic than static as in the case of direct addressing mode.

MOV @ R1 , B : B की सामग्री को RAM स्थान पर ले जाएँ जिसका पता R1 के पास है

जब R0 और R1 को पॉइंटर्स के रूप में उपयोग किया जाता है, तो उनके पहले @ चिह्न होना चाहिए, रजिस्टर इनडायरेक्ट एड्रेसिंग मोड के फायदों में से एक यह है कि यह डायरेक्ट एड्रेसिंग मोड के मामले में डेटा को स्टैटिक की तुलना में अधिक गतिशील बनाता है।


Indexed addressing mode(अनुक्रमित एड्रेसिंग मोड) : This addressing mode is used in accessing the data elements of lookup table entries located in program ROM space of 8051.

इस एड्रेसिंग मोड का उपयोग 8051 के प्रोग्राम ROM स्पेस में स्थित लुकअप टेबल प्रविष्टियों के डेटा तत्वों तक पहुंचने में किया जाता है।

Example(उदाहरण):

MOVC A,@ A+DPTR :The 16-bit register DPTR and register A are used to form the address of the data element stored in on-chip ROM. Here C denotes code .In this instruction the contents of A are added to the 16-bit DPTR register to form the 16-bit address of the data operand.

MOVC A,@ A+DPTR : 16-बिट रजिस्टर DPTR और रजिस्टर A का उपयोग ऑन-चिप ROM में संग्रहीत डेटा तत्व का पता बनाने के लिए किया जाता है। यहां C कोड को दर्शाता है। इस निर्देश में डेटा ऑपरेंड का 16-बिट पता बनाने के लिए A की सामग्री को 16-बिट DPTR रजिस्टर में जोड़ा जाता है।

 
 
 

Comments


Subscribe to Digibharatam newsletter

Thanks for submitting!

  • Twitter
  • Facebook
  • Linkedin

© 2035 by BrainStorm. Powered and secured by Wix

bottom of page