0% found this document useful (0 votes)
73 views

Chapter 5-Assembling, Linking, and Executing Programs

The document discusses the process of creating and running a program which involves 3 steps - creating the source program file, assembling and linking the program, and running the program. It explains that assembling translates the source code into machine code objects and linking combines the objects into an executable file.
Copyright
© © All Rights Reserved
Available Formats
Download as PPT, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
73 views

Chapter 5-Assembling, Linking, and Executing Programs

The document discusses the process of creating and running a program which involves 3 steps - creating the source program file, assembling and linking the program, and running the program. It explains that assembling translates the source code into machine code objects and linking combines the objects into an executable file.
Copyright
© © All Rights Reserved
Available Formats
Download as PPT, PDF, TXT or read online on Scribd
You are on page 1/ 5

Lecture 3

Chapter 5- Assembling , Linking,


and Executing Programs

Lecture Outline
Creating and Running a Program
Step1: Creating the Source Program File
Step2: Assembling & Linking the Program
Step3: Running the Program
Reading: Only Lecture Notes

Creating and Running a Program


Editor

A text editor or word processor is used to create a


source program file.

.ASM file
Assembler

An assembler is used to translate the source file


into a machine language object file.

.OBJ file
Linker

A linker is used to link one or more object files


to create a run file.

.EXE file
2

Creating and Running a Program

Assembling: translate source program (written in assembly


language) into machine code (object code)
Linking: complete machine code for the object program,
generate an executable module

Step 2: Assembling & Linking the program


After printing the copyright information, the assembler will check
the source file for syntax errors:
If one or more errors were found:
The assembler will display the line number of each error and
a short description.
If no errors were found:
The assembler will translate the assembly language code into
the assembly machine language object file (.obj file).
The linker will take one or more object files, fills any
missing addresses, and combines the object files into a
single executable file (.exe file).

You might also like