Assembly Lecture3

5
Lecture 3 Chapter 5- Assembling , Linking, and Executing Programs 1

description

Computer is an interesting language

Transcript of Assembly Lecture3

Lecture 3Chapter 5- Assembling , Linking, and Executing Programs11Lecture Outline Creating and Running a Program Step1: Creating the Source Program File Step2: Assembling & Linking the Program Step: Running the ProgramReading: !nl" Lecture #otes2Creating and Running a Program$ditor%AS& 'ileAssembler%!() 'ileLinker%$*$ 'ileA te+t editor or ,ord processor is used to create a source program 'ile%An assembleris used to translate the source 'ile into a machine language ob-ect 'ile%A linker is used to link one or more ob-ect 'iles to create a run 'ile%.Assembling: translate source program /,ritten in assembl" language0 into machine code /ob-ect code0 Linking: complete machine code 'or the ob-ect program1 generate an e+ecutable moduleCreating and Running a Program2tep !" Assembling # Linking the program A'ter printing the cop"right in'ormation1 the assembler ,ill check the source 'ile 'or s"nta+ errors: 3' one or more errors ,ere 'ound: 4he assembler ,ill displa" the line number o' each error and a short description% 3' no errors ,ere 'ound: 4he assembler ,ill translate the assembl" language code into the assembl" machine language ob-ect 'ile /%ob- 'ile0% 4he linker ,ill take one or more ob-ect 'iles1 'ills an" missing addresses1 and combines the ob-ect 'iles into a single e+ecutable 'ile /%e+e 'ile0%