当前位置:高等教育资讯网  >  中国高校课件下载中心  >  大学文库  >  浏览文档

复旦大学:《计算机原理 Computer System》课程PPT课件_Machine-Level Representation of Programs I

资源类别:文库,文档格式:PPT,文档页数:43,文件大小:570.5KB,团购合买
• Compiler drivers • History of the Intel IA-32 architecture • Assembly code and object code • Memory and Registers • Addressing Mode • Data Formats • Suggested reading
点击下载完整版文档(PPT)

Machine-Level Representation of Programs I

1 Machine-Level Representation of Programs I

Outline Compiler drivers History of the intel IA-32 architecture Assembly code and object code Memory and Registers Addressing Mode Data Formats Suggested reading -chap1.2,1.4.1.1.7.3.3.1,3.2,3.3,3.4.1

2 Outline • Compiler drivers • History of the Intel IA-32 architecture • Assembly code and object code • Memory and Registers • Addressing Mode • Data Formats • Suggested reading – Chap 1.2, 1.4.1, 1.7.3, 3.1, 3.2, 3.3, 3.4.1

The hello program It begins life as a high-level C program Can be read and understand by human beings The individual c statements must be translated by compiler drivers So that the hello program can run on a computer system Compiler:编译器

3 The Hello Program • It begins life as a high-level C program – Can be read and understand by human beings • The individual C statements must be translated by compiler drivers – So that the hello program can run on a computer system – Compiler:编译器

The hello program The C programs are translated into A sequence of low-level machine-language instructions These instructions are then packaged in a form called an object program Object program are stored as a binary disk file Also referred to as executable object files

4 The Hello Program • The C programs are translated into – A sequence of low-level machine-language instructions • These instructions are then packaged in a form – called an object program • Object program are stored as a binary disk file – Also referred to as executable object files

The Context of a Compiler (gcc)Figure 1.3P5 hello.c Source program(text) Preprocessor(cpp hello. i Modified source program(text) Compiler(cc1) hello.s Assembly program(text) Assembler(as) hello. o Relocatable object program(binary Linker(Id) Compiler:编译器 hello Executable object program(binary) Assembler:汇编器 Linker:连接器

5 The Context of a Compiler (gcc) hello.c Source program (text) Preprocessor (cpp) hello.i Modified source program (text) Assembly program (text) Compiler (cc1) hello.s Assembler (as) hello.o Relocatable object program (binary) Linker (ld) hello Executable object program (binary) Figure 1.3 P5 Compiler:编译器 Assembler:汇编器 Linker:连接器

Characteristics of the high level programming languages Abstraction Productive reliable Type checking As efficient as hand written code Can be compiled and executed on a number of different machines, whereas assembly code is highly machine specific Productive:多产的 Reliab|e:可靠的

6 Characteristics of the high level programming languages • Abstraction – Productive – reliable • Type checking • As efficient as hand written code • Can be compiled and executed on a number of different machines, whereas assembly code is highly machine specific Productive:多产的 Reliable: 可靠的

Characteristics of the assembly programming languages Managing memory Low level instructions to carry out the computation Highly machine specif ic

7 Characteristics of the assembly programming languages • Managing memory • Low level instructions to carry out the computation • Highly machine specific

Why should we understand the assembly code Understand the optimization capabilities of the compiler Analyze the underlying inefficiencies in the code Sometimes the run-time behavior of a program is needed

8 Why should we understand the assembly code • Understand the optimization capabilities of the compiler • Analyze the underlying inefficiencies in the code • Sometimes the run-time behavior of a program is needed

From writing assembly code to understand assembly code Different set of skills Transformations Relation between source code and assembly code Reverse engineering Trying to understand the process by which a system was created By studying the system and By working backward Backward:回溯

9 From writing assembly code to understand assembly code • Different set of skills – Transformations – Relation between source code and assembly code • Reverse engineering – Trying to understand the process by which a system was created • By studying the system and • By working backward Backward:回溯

A Historical Perspective Long evolutionary development Started from rather primitive 16-bit processors Added more features Take the advantage of the technology improvements Satisfy the demands for higher performance and for supporting more advanced operating systems Laden with features providing backward compatibility that are obsolete | aden with:承载 compatibility;:兼容性 大 obsolete:陈旧的

10 A Historical Perspective • Long evolutionary development – Started from rather primitive 16-bit processors – Added more features • Take the advantage of the technology improvements • Satisfy the demands for higher performance and for supporting more advanced operating systems – Laden with features providing backward compatibility that are obsolete * laden with:承载 * compatibility: 兼容性 * obsolete:陈旧的

点击下载完整版文档(PPT)VIP每日下载上限内不扣除下载券和下载次数;
按次数下载不扣除下载券;
24小时内重复下载只扣除一次;
顺序:VIP每日次数-->可用次数-->下载券;
共43页,可试读15页,点击继续阅读 ↓↓
相关文档

关于我们|帮助中心|下载说明|相关软件|意见反馈|联系我们

Copyright © 2008-现在 cucdc.com 高等教育资讯网 版权所有