Target program

honggarae 03/04/2022 733

Definition

Thetargetprogram(Pinyin:mùbiāochénɡxù,English:ObjectProgram)isalsocalled"purposeprogram".

Itisacollectionofmachinecodethatcanbedirectlyrunbythecomputerafterthesourceprogramiscompiled,andtheextensionis.objonthecomputerfile----bythelanguageprocessingprogram(assembler,compiler,interpreter)Thesourceprogramisprocessed(assembled,compiled,interpreted)intoanequivalentprogramcomposedofmachinecodethatcanberundirectlybythecomputer.Thisprogramiscalledthetargetprogram.

Function

Thetargetprogramhasafunctioninmanyprogrammingtools.

Thecomputercannotdirectlyacceptandexecutethesourceprogramwritteninahigh-levellanguage.Whenthesourceprogramisinputintothecomputer,itistranslatedintoatargetprograminmachinelanguagethrougha"translationprogram"beforethecomputercanrecognizeandexecuteit.Thiskindof"translation"usuallyhastwoways,namelythecompilationmethodandtheinterpretationmethod.Compilationmethodreferstotheuseofapre-compiledmachinelanguageprogramcalledacompiler,whichisstoredinthecomputerassystemsoftware.Whentheuserinputsthesourceprogramwritteninahigh-levellanguageintothecomputer,thecompilertranslatestheentiresourceprogramintoAtargetprogramequivalenttoitexpressedinmachinelanguage,andthenthecomputerexecutesthetargetprogramtocompletetheoperationtobeprocessedbythesourceprogramandobtaintheresult.Interpretationmodemeansthatafterthesourceprogramentersthecomputer,theinterpreterinterpretstheprogramwhilescanning,inputsentencebysentence,sentencebysentence,andthecomputerexecutessentencebysentencewithoutgeneratingthetargetprogram.Forexample,PASCAL,FORTRAN,COBOLandotherhigh-levellanguages​​executecompilationmethods;BASIClanguages​​arebasedonexecutioninterpretationmethods;andPASCALandClanguages​​arehigh-levelprogramminglanguages​​thatcanwritecompilers.

Difference

Compiler,interpreter,andassemblerarethreelanguageprocessingprograms.Themaindifferenceis:Assembler(forlow-levelservice)istotranslateasourceprogramwritteninassemblylanguageintoatargetprogramcomposedofmachineinstructionsandotherinformation.Theinterpreter(foradvancedservices)directlyexecutesthesourceprogramortheinternalformofthesourceprogram.Generally,itreadsasourceprogram,translatesasentence,andexecutesasentencewithoutgeneratingobjectcode,suchasaBASICinterpreter.Compiler(forhigh-levelservice)isatargetprogramthattranslatesasourceprogramwritteninahigh-levellanguageintoanequivalentlow-levellanguage.Oneofthedifferencesbetweenacompilerandaninterpreteristhattheformergeneratesobjectcode,whilethelatterdoesnot;inaddition,theexecutionspeedoftheobjectcodegeneratedbytheformerisfasterthanthatoftheinterpreter;thelatterhasgoodhuman-computerinteractionandissuitableforbeginners.use.Programswritteninlanguages​​suchasCOBOLandFORTRANaregenerallycompiledprogramsconsideringtheexecutionspeed.

Andthebiggestdifferencebetweenthetwois:fortheinterpretationandexecution,thecontroloftheprogramisinthesolverratherthantheuserprogram;fortheeditingandexecution,thecontroloftheruntimeisintheuserprogram.

Relevantconceptdistinction

Program

Inordertomakethecomputerworkaccordingtopeople'swill,itisnecessarytowritethecorrespondingprogramaccordingtotherequirementsoftheproblem.Aprogramisasetofinstructionsthatacomputercanrecognizeandexecute.Eachinstructionmakesthecomputerperformaspecificoperation.

Sourceprogram

Programscanbewritteninhigh-levellanguageorassemblylanguage.Programswritteninhigh-levellanguageorassemblylanguagearecalledsourceprograms.TheextensionofClanguagesourceprogramis".c".Thesourceprogramcannotbeexecuteddirectlyonthecomputer,anda"compiler"needstobeusedtocompilethesourceprogramintobinarycode.

Targetprogram

Thebinarycodeobtainedby"compiler"compilationofthesourceprogramiscalledthetargetprogram.Theextensionofthetargetprogramis".obj".Althoughthetargetcodeisalreadyamachineinstruction,itstillcannotrun,becausethetargetprogramhasnotsolvedthefunctioncallproblem.Itisnecessarytoconnecteachtargetprogramwiththelibraryfunctiontoformacompleteexecutableprogram.

Executableprogram

Thetargetprogramisconnectedwiththelibraryfunctiontoformacompleteprogramthatcanbeexecutedindependentlyundertheoperatingsystemiscalledanexecutableprogram.Theextensionoftheexecutableprogramis".exe"(underdos/windowsenvironment).

Latest: Denver Development Screening Test

Next: Ericsson