1 / 32

The Assembly Language Level

The Assembly Language Level. Chapter 7. Why Use Assembly Language?. Comparison of assembly language and high-level language programming, with and without tuning. Format of an Assembly Language Statement (1). Computation of N = I + J . (a) Pentium 4.

teness
Télécharger la présentation

The Assembly Language Level

An Image/Link below is provided (as is) to download presentation Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author. Content is provided to you AS IS for your information and personal use only. Download presentation by click this link. While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server. During download, if you can't get a presentation, the file might be deleted by the publisher.

E N D

Presentation Transcript


  1. The Assembly Language Level Chapter 7 Tanenbaum, Structured Computer Organization, Fifth Edition, (c) 2006 Pearson Education, Inc. All rights reserved. 0-13-148521-0

  2. Why Use Assembly Language? Comparison of assembly language and high-level language programming, with and without tuning. Tanenbaum, Structured Computer Organization, Fifth Edition, (c) 2006 Pearson Education, Inc. All rights reserved. 0-13-148521-0

  3. Format of an Assembly Language Statement (1) Computation of N = I + J. (a) Pentium 4. Tanenbaum, Structured Computer Organization, Fifth Edition, (c) 2006 Pearson Education, Inc. All rights reserved. 0-13-148521-0

  4. Format of an Assembly Language Statement (2) Computation of N = I + J. (b) Motorola 680x0. Tanenbaum, Structured Computer Organization, Fifth Edition, (c) 2006 Pearson Education, Inc. All rights reserved. 0-13-148521-0

  5. Format of an Assembly Language Statement (3) Computation of N = I + J. (c) SPARC. Tanenbaum, Structured Computer Organization, Fifth Edition, (c) 2006 Pearson Education, Inc. All rights reserved. 0-13-148521-0

  6. Pseudoinstructions (1) Some of the pseudoinstructions available in the Pentium 4 assembler (MASM). Tanenbaum, Structured Computer Organization, Fifth Edition, (c) 2006 Pearson Education, Inc. All rights reserved. 0-13-148521-0

  7. Pseudoinstructions (2) Some of the pseudoinstructions available in the Pentium 4 assembler (MASM). Tanenbaum, Structured Computer Organization, Fifth Edition, (c) 2006 Pearson Education, Inc. All rights reserved. 0-13-148521-0

  8. Macro Definition, Call, Expansion (1) Assembly language code for interchanging P and Q twice. (a) Without a macro. (b) With a macro. Tanenbaum, Structured Computer Organization, Fifth Edition, (c) 2006 Pearson Education, Inc. All rights reserved. 0-13-148521-0

  9. Macro Definition, Call, Expansion (2) Comparison of macro calls with procedure calls. Tanenbaum, Structured Computer Organization, Fifth Edition, (c) 2006 Pearson Education, Inc. All rights reserved. 0-13-148521-0

  10. Macros with Parameters Nearly identical sequences of statements. (a) Without a macro. (b) With a macro. Tanenbaum, Structured Computer Organization, Fifth Edition, (c) 2006 Pearson Education, Inc. All rights reserved. 0-13-148521-0

  11. Two Pass Assemblers (1) The instruction location counter (ILC) keeps track of the address where the instructions will be loaded in memory. In this example, the statements prior to MARIA occupy 100 bytes. Tanenbaum, Structured Computer Organization, Fifth Edition, (c) 2006 Pearson Education, Inc. All rights reserved. 0-13-148521-0

  12. Two Pass Assemblers (2) A symbol table for the program of Fig. 7-7. Tanenbaum, Structured Computer Organization, Fifth Edition, (c) 2006 Pearson Education, Inc. All rights reserved. 0-13-148521-0

  13. Two Pass Assemblers (3) A few excerpts from the opcode table for a Pentium 4 assembler. Tanenbaum, Structured Computer Organization, Fifth Edition, (c) 2006 Pearson Education, Inc. All rights reserved. 0-13-148521-0

  14. Pass One (1) . . . Pass one of a simple assembler. Tanenbaum, Structured Computer Organization, Fifth Edition, (c) 2006 Pearson Education, Inc. All rights reserved. 0-13-148521-0

  15. Pass One (2) . . . . . . Pass one of a simple assembler. Tanenbaum, Structured Computer Organization, Fifth Edition, (c) 2006 Pearson Education, Inc. All rights reserved. 0-13-148521-0

  16. Pass One (3) . . . Pass one of a simple assembler. Tanenbaum, Structured Computer Organization, Fifth Edition, (c) 2006 Pearson Education, Inc. All rights reserved. 0-13-148521-0

  17. Pass Two (1) . . . Pass two of a simple assembler. Tanenbaum, Structured Computer Organization, Fifth Edition, (c) 2006 Pearson Education, Inc. All rights reserved. 0-13-148521-0

  18. Pass Two (2) . . . Pass two of a simple assembler. Tanenbaum, Structured Computer Organization, Fifth Edition, (c) 2006 Pearson Education, Inc. All rights reserved. 0-13-148521-0

  19. The Symbol Table (1) Hash coding. (a) Symbols, values, and the hash codes derived from the symbols. Tanenbaum, Structured Computer Organization, Fifth Edition, (c) 2006 Pearson Education, Inc. All rights reserved. 0-13-148521-0

  20. The Symbol Table (2) Hash coding. (b) Eight-entry hash table with linked lists of symbols and values. Tanenbaum, Structured Computer Organization, Fifth Edition, (c) 2006 Pearson Education, Inc. All rights reserved. 0-13-148521-0

  21. Linking and Loading Generation of an executable binary program from a collection of independently translated source procedures requires using a linker. Tanenbaum, Structured Computer Organization, Fifth Edition, (c) 2006 Pearson Education, Inc. All rights reserved. 0-13-148521-0

  22. Tasks Performed by the Linker (1) Each module has its own address space, starting at 0. Tanenbaum, Structured Computer Organization, Fifth Edition, (c) 2006 Pearson Education, Inc. All rights reserved. 0-13-148521-0

  23. Tasks Performed by the Linker (2) Each module has its own address space, starting at 0. Tanenbaum, Structured Computer Organization, Fifth Edition, (c) 2006 Pearson Education, Inc. All rights reserved. 0-13-148521-0

  24. Tasks Performed by the Linker (3) Each module has its own address space, starting at 0. Tanenbaum, Structured Computer Organization, Fifth Edition, (c) 2006 Pearson Education, Inc. All rights reserved. 0-13-148521-0

  25. Tasks Performed by the Linker (4) Each module has its own address space, starting at 0. Tanenbaum, Structured Computer Organization, Fifth Edition, (c) 2006 Pearson Education, Inc. All rights reserved. 0-13-148521-0

  26. Tasks Performed by the Linker (5) The object modules of Fig. 7-14 after being positioned in the binary image but before being relocated and linked. Tanenbaum, Structured Computer Organization, Fifth Edition, (c) 2006 Pearson Education, Inc. All rights reserved. 0-13-148521-0

  27. Tasks Performed by the Linker (6) The same object modules after linking and after relocation has been performed. Together they form an executable binary program, ready to run Tanenbaum, Structured Computer Organization, Fifth Edition, (c) 2006 Pearson Education, Inc. All rights reserved. 0-13-148521-0

  28. Structure of an Object Module The internal structure of an object module produced by a translator. Tanenbaum, Structured Computer Organization, Fifth Edition, (c) 2006 Pearson Education, Inc. All rights reserved. 0-13-148521-0

  29. Binding Time and Dynamic Relocation The relocated binary program of Fig. 7-15(b) moved up 300 addresses. Many instructions now refer to an incorrect memory address. Tanenbaum, Structured Computer Organization, Fifth Edition, (c) 2006 Pearson Education, Inc. All rights reserved. 0-13-148521-0

  30. Dynamic Linking in MULTICS (1) Before EARTH is called. Tanenbaum, Structured Computer Organization, Fifth Edition, (c) 2006 Pearson Education, Inc. All rights reserved. 0-13-148521-0

  31. Dynamic Linking in MULTICS (2) After EARTH has been called and linked. Tanenbaum, Structured Computer Organization, Fifth Edition, (c) 2006 Pearson Education, Inc. All rights reserved. 0-13-148521-0

  32. Dynamic Linking in Windows Use of a DLL file by two processes. Tanenbaum, Structured Computer Organization, Fifth Edition, (c) 2006 Pearson Education, Inc. All rights reserved. 0-13-148521-0

More Related