Assembler

An assembler is a program that takes basic computer instructions and converts them into a pattern of bits that the computer’s processor can use to perform its basic operations. Some people call these instructions assembler language and others use the term assembly language.

एक असेंबलर एक ऐसा प्रोग्राम है जो कंप्यूटर के बुनियादी निर्देशों को लेता है और उन्हें बिट्स के एक पैटर्न में परिवर्तित करता है जिसका उपयोग कंप्यूटर का प्रोसेसर अपने बुनियादी कार्यों को करने के लिए कर सकता है। कुछ लोग इन निर्देशों को असेंबलर भाषा कहते हैं और अन्य असेंबली भाषा का उपयोग करते हैं।

  • Assemblers need to – असेम्बलर्स की जरूरत है

  • translate assembly instructions and pseudo-instructions into machine instructions

मशीन निर्देशों में असेंबली निर्देशों और छद्म निर्देशों का अनुवाद करें

  • Convert decimal numbers, etc. specified by programmer into binary

दशमलव संख्या आदि को प्रोग्रामर द्वारा बाइनरी में निर्दिष्ट करें

Typically, assemblers make two passes over the assembly file

आमतौर पर, असेंबलर असेंबली फाइल पर दो पास बनाते हैं

  • First pass: reads each line and records labels in a symbol table

पहला पासः प्रत्येक पंक्ति को पढ़ता है और एक प्रतीक तालिका में लेबल रिकॉर्ड करता है

  • Second pass: use info in symbol table to produce actual machine code for each line

दूसरा पासः प्रत्येक पंक्ति के लिए वास्तविक मशीन कोड बनाने के लिए प्रतीक तालिका में जानकारी का उपयोग करें

Compiler- कपाइलर

A compiler is a special program that processes statements written in a particular programming language and turns them into machine language or “code” that a computer’s processor uses. Typically, a programmer writes language statements in a language such as Pascal or C one line at a time using an editor. The file that is created contains what are called the source statements. The programmer then runs the appropriate language compiler, specifying the name of the file that contains the source statements.

एक कंपाइलर एक विशेष प्रोग्राम है जो एक विशेष प्रोग्रामिंग भाषा में लिखे गए बयानों को संसाधित करता है और उन्हें मशीन भाषा या ‘कोड’ में बदल देता है जो कंप्यूटर के प्रोसेसर का उपयोग करता है। आमतौर पर, एक प्रोग्रामर एक एडीटर का उपयोग करते हुए एक समय में पास्कल या C एक पंक्ति जैसी भाषा में भाषा के बयान लिखता है। जो फाइल बनाई जाती है, उसमें सोर्स स्टेटमेंट कहा जाता है। प्रोग्रामर तब उपयुक्त भाषा कंपाइलर चलाता है, उस फाइल का नाम निर्दिष्ट करता है जिसमें सोर्स स्टेटमेंट होते हैं।

When executing (running), the compiler first analyzes all of the language statements syntactically one after the other, like Syntax errors, Range issues and some else and in case if any error exists then it informs about the error to rectify first. After fixing the error you need to recompile the program and then it allows executing if there is no more error remained in the program. Traditionally, the output of the compilation has been called object code or sometimes an object module. (Note that the term “object” here is not related to object-oriented programming) The object code is machine code that the processor can process or “execute” one instruction at a time.

निष्पादित करते समय (चल रहा है), कंपाइलर पहले सभी लैंग्वेज स्टेटमेंट्स का एक-के-बाद एक, सिंटैक्स एरर, श्रेणी के मुद्दों और कुछ अन्य के रूप में क्रमबद्ध रूप से विश्लेषण करता है और यदि कोई त्रुटि मौजूद है तो वह पहले सुधारने के लिए त्रुटि की जानकारी देता है। त्रुटि को ठीक करने के बाद आपको प्रोग्राम को फिर से संकलित करने की आवश्यकता है और फिर यह निष्पादित करने की अनुमति देता है कि कार्यक्रम में कोई और त्रुटि नहीं रह गई है। परंपरागत रूप से, संकलन के आउटपुट को ऑब्जेक्ट कोड या कभी-कभी ऑब्जेक्ट मॉड्यूल कहा जाता है। (ध्यान दें कि यहां “ऑब्जेक्ट” शब्द ऑब्जेक्ट-ओरिएंटेड प्रोग्रामिंग से संबंधित नहीं है) ऑब्जेक्ट कोड मशीन कोड है जो प्रोसेसर एक समय में एक निर्देश को संसाधित या “निष्पादित” कर सकता है।

Interpreter – इंटरप्रेटर

Interpreter is another kind of program translator which is used to convert the high level. language into machine level information. Interpreter is used in mostly fourth generation languages (4GL) like Visual basic, Web driven applications etc. Unlike Compiler an Interpreter interprets the program code into machine code line by line not whole at once. Whereas A compiler compiles a program source code but whole at once and if there is any error it fetches and informs you to rectify that but in case of Interpreter if interprets one line and send it for execution if there is no error in that and further wise if found any error it then informs you about the error and prompt you to break the program execution flow.

इंटरप्रेटर एक अन्य प्रकार का प्रोग्राम ट्रांसलेटर है जिसका उपयोग हाई लेवल लैंग्वेज को मशीन लेवल की जानकारी में परिवर्तित करने के लिए किया जाता है। इंटरप्रेटर का उपयोग ज्यादातर चौथी पीढ़ी की भाषाओं (4GL) में किया जाता है जैसे विजुअल बेसिक, वेब संचालित एप्लिकेशन आदि। कंपाइलर के विपरीत एक इंटरप्रेटर प्रोग्राम कोड को मशीन कोड लाइन में एक बार में पूरे नहीं रेखा पर व्याख्या करता है। जबकि एक कंपाइलर एक प्रोग्राम सोर्स कोड कोसंकलित करता है, लेकिन एक ही बार में और यदि कोई त्रुटि होती है, तो उसे ठीक करने के लिए आपको सूचित करता है और सूचित करता है, लेकिन यदि इंटरप्रेटर एक पंक्ति की व्याख्या करता है और उसे निष्पादन के लिए भेजता है, तो उसमें कोई त्रुटि नहीं है और आगे की समझदारी से यदि यह कोई त्रुटि पाया जाता है तो आपको त्रुटि के बारें में सूचित करता है और आपको प्रोग्राम निष्पादन प्रवाह को तोड़ने के लिए संकेत देता है।

  • Interpreter Takes Single instruction as input.

इंटरप्रेटर इनपुट के रूप में एकल निर्देश लेता है।

  • No Intermediate Object Code is Generated

कोई मध्यवर्ती ऑब्जेक्ट कोड उत्पन्न नहीं होता है।

  • Conditional Control Statements Are Executes slower

कंडीशनल कंट्रोल स्टेटमेंट निष्पादन योग्य हैं।

  • Memory Requirement is Less

मेमोरी की आवश्यकता कम है।

Every time higher level program is converted into lower level program हर बार हाई लेवल के प्रोग्राम को लो-लेवल के प्रोग्राम में बदल दिया जाता है।

  • Errors are displayed for every instruction interpreted (if any)

व्याख्या किए गए प्रत्येक निर्देश के लिए त्रुटियां प्रदर्शित की जाती हैं (यदि कोई हो)

  • The interpreter can immediately execute high-level programs, thus interpreters are sometimes used during the development of a program, when a programmer wants to add small sections at a time and test them quickly.

इंटरप्रेटर हाई-लेवल प्रोग्रामों को तुरंत निष्पादित कर सकता है, इस प्रकार इंटरप्रेटर को कभी-कभी एक प्रोग्राम के विकास के दौरान उपयोग किया जाता है, जब एक प्रोग्रामर एक बार में छोटे वर्गों को जोड़ना और उन्हें जल्दी से परीक्षण करना चाहता है।

  • In addition, interpreters are often used in education because they allow students to program interactively.

इसके अलावा, इंटरप्रेटरों का उपयोग अक्सर शिक्षा में किया जाता है क्योंकि वे छात्रों को अंतःक्रियात्मक रूप से प्रोग्राम करने की अनुमति देते हैं।

Runtime errors: All syntax errors and some of the semantic errors (the static semantic errors) are detected by the compiler, which generates a message indicating the type of error and the position in the source file where the error occurred (notice that the actual error could have occurred before the position signaled by the compiler). Other semantic errors (the dynamic semantic errors) and the logical errors cannot be detected by the compiler, and hence they are detected only when the program is executed.

रनटाइम एरर: सभी सिंटैक्स एरर और कुछ सिमेंटिक एरर (स्टैटिक सिमेंटिक एरर) को कंपाइलर द्वारा पता लगाया जाता है, जो एक संदेश उत्पन्न करता है जिसमें एरर का प्रकार और सोर्स फाइल में स्थिति जहाँ त्रुटि हुई (नोटिस) वास्तविक त्रुटि संकलक द्वारा संकेतित स्थिति से पहले हो सकती है। अन्य सिमेंटिक एरर (डायनेमिक सिमेंटिक एरर)और लॉजिकल एरर को कंपाइलर द्वारा पता नहीं लगाया जा सकता है, और इसलिए उन्हें प्रोग्राम के निष्पादित होने पर ही पता चलता है।

Chapter wise Model Paper Link