Question:
Which of the following is the purpose of the ORIGIN directive?
निम्न में से कौन सा ORIGIN डाइरेक्टिव का उद्देेश्य है?
Options:
- It is to indicate the starting position in memory where the program block is to be stored.
- It is to indicate the beginning of the computation code.
- It is to indicate the purpose of the code.
- It lists the locations of all registers used.
- यह स्मृति में प्राारंभिक स्थिति को इंगित करने के लिए है, जहां प्रोोग्रााम ब्लॉक को संग्रहीत किया जाना है।
- यह गणना कोड के प्राारंभ का संकेत देने के लिए है।
- यह कोड का उद्देेश्य दर्शाने के लिए है।
- यह उपयोग किए गए सभी रजिस्टरों के स्थानों की सूची बनाता है।
Correct Answer: a)
Explanation:
Detailed Explanation:
The correct answer is a) It indicates the starting position in memory where the program block is to be stored (यह स्मृति में प्रारंभिक स्थिति को इंगित करने के लिए है, जहां प्रोग्राम ब्लॉक को संग्रहीत किया जाना है।).
In assembly language programming, ORIGIN (frequently abbreviated as ORG) is an assembler directive (pseudo-instruction):
- It instructs the assembler to reset or set its internal Location Counter (LC) to the specified address.
- As a result, all subsequent instructions and data declarations are assigned contiguous memory locations beginning precisely at that specified address.
- Example:
ORIGIN 2000Htells the assembler that the very next machine code byte should be placed at physical memory address2000H.
Because it controls the placement of code and data blocks in memory, option (a) correctly defines its purpose.
विस्तृत व्याख्या:
सही उत्तर a) यह स्मृति में प्रारंभिक स्थिति को इंगित करने के लिए है, जहां प्रोग्राम ब्लॉक को संग्रहीत किया जाना है। है।
असेंबली भाषा प्रोग्रामिंग में ORIGIN (या ORG) एक एसेम्बलर डायरेक्टिव (Assembler Directive / Pseudo-op) है:
- इसका मुख्य उद्देश्य एसेम्बलर के लोकेशन काउंटर (Location Counter) को एक विशिष्ट मेमोरी पते पर सेट करना होता है।
- इसके बाद आने वाले सभी निर्देशों और डेटा को मेमोरी में उसी निर्दिष्ट प्रारंभिक पते से संग्रहीत (load) किया जाता है।
- उदाहरण के लिए, यदि कोड में
ORIGIN 1000लिखा है, तो इसके बाद के निर्देश मेमोरी एड्रेस 1000 से शुरू होंगे।
अतः यह मेमोरी में प्रोग्राम ब्लॉक के प्रारंभिक स्थान को निर्धारित करता है।