没有合适的资源?快使用搜索试试~ 我知道了~
首页ProgrammingGroundUp-1-0-booksize Linux环境下汇编语言程序设计
"Programming from the Ground Up" The book uses Linux x86 assembly language to take you a step at a time through these concepts: * How the processor views memory * How the processor operates * How programs interact with the operating system * How computers represent data internally * How to do low-level and high-level optimization Printed version: http://www.cafeshops.com/bartlettpublish.8640017 PDF version: http://savannah.nongnu.org/projects/pgubook/ 在下载文件列表中找最新的版本下载。 下载后看了几天。这本书是一本入门读物,重点在于讲解Linux环境下汇编语言程序设计, 同时使用汇编语言讲解计算机工作原理。对于试图学习Linux下汇编的人是很好的教材, 对于熟手也有巩固基础澄清概念的作用。行文风格也很有趣,推荐。
资源详情
资源评论
资源推荐
Programming from the Ground Up
Jonathan Bartlett
Edited by
Dominick Bruno, Jr.
Programming from the Ground Up
by Jonathan Bartlett
Edited by Dominick Bruno, Jr.
Copyright © 2003 by Jonathan Bartlett
Permission is granted to copy, distribute and/or modify this document under the terms of the GNU Free
Documentation License, Version 1.1 or any later version published by the Free Software Foundation;
with no Invariant Sections, with no Front-Cover Texts, and with no Back-Cover Texts. A copy of the
license is included in Appendix H. In addition, you are granted full rights to use the code examples for
any purpose without even having to credit the authors.
All trademarks are property of their respective owners.
This book can be purchased at http://www.bartlettpublishing.com/
This book is not a reference book, it is an introductory book. It is therefore not suitable by itself to
learn how to professionally program in x86 assembly language, as some details have been left out to
make the learning process smoother. The point of the book is to help the student understand how
assembly language and computer programming works, not to be a reference to the subject. Reference
information about a particular processor can be obtained by contacting the company which makes it.
To receive a copy of this book in electronic form, please visit the website
http://savannah.nongnu.org/projects/pgubook/ This site contains the instructions for downloading a
transparent copy of this book as defined by the GNU Free Documentation License.
Table of Contents
1. Introduction........................................................................................................1
Welcome to Programming ...............................................................................1
Your Tools........................................................................................................3
2. Computer Architecture .....................................................................................7
Structure of Computer Memory.......................................................................7
The CPU...........................................................................................................9
Some Terms ...................................................................................................11
Interpreting Memory......................................................................................13
Data Accessing Methods................................................................................14
Review ...........................................................................................................16
3. Your First Programs........................................................................................19
Entering in the Program.................................................................................19
Outline of an Assembly Language Program..................................................22
Planning the Program.....................................................................................28
Finding a Maximum Value.............................................................................31
Addressing Modes .........................................................................................41
Review ...........................................................................................................45
4. All About Functions.........................................................................................49
Dealing with Complexity...............................................................................49
How Functions Work .....................................................................................50
Assembly-Language Functions using the C Calling Convention ..................52
A Function Example ......................................................................................59
Recursive Functions.......................................................................................64
Review ...........................................................................................................71
5. Dealing with Files.............................................................................................75
The UNIX File Concept.................................................................................75
Buffers and .bss ...........................................................................................76
Standard and Special Files.............................................................................78
Using Files in a Program................................................................................79
iii
Review ...........................................................................................................93
6. Reading and Writing Simple Records ...........................................................95
Writing Records...........................................................................................100
Reading Records..........................................................................................104
Modifying the Records ................................................................................111
Review .........................................................................................................114
7. Developing Robust Programs........................................................................117
Where Does the Time Go?...........................................................................117
Some Tips for Developing Robust Programs...............................................118
Handling Errors Effectively.........................................................................121
Making Our Program More Robust.............................................................123
Review .........................................................................................................126
8. Sharing Functions with Code Libraries.......................................................129
Using a Shared Library................................................................................130
How Shared Libraries Work ........................................................................133
Finding Information about Libraries............................................................134
Useful Functions..........................................................................................140
Building a Shared Library............................................................................141
Review .........................................................................................................143
9. Intermediate Memory Topics........................................................................147
How a Computer Views Memory ................................................................147
The Memory Layout of a Linux Program....................................................149
Every Memory Address is a Lie ..................................................................151
Getting More Memory.................................................................................155
A Simple Memory Manager ........................................................................157
Using our Allocator......................................................................................174
More Information.........................................................................................177
Review .........................................................................................................178
iv
10. Counting Like a Computer .........................................................................181
Counting.......................................................................................................181
Truth, Falsehood, and Binary Numbers.......................................................186
The Program Status Register .......................................................................195
Other Numbering Systems...........................................................................196
Octal and Hexadecimal Numbers ................................................................199
Order of Bytes in a Word.............................................................................201
Converting Numbers for Display.................................................................204
Review .........................................................................................................210
11. High-Level Languages.................................................................................213
Compiled and Interpreted Languages..........................................................213
Your First C Program...................................................................................215
Perl...............................................................................................................218
Python ..........................................................................................................219
Review .........................................................................................................220
12. Optimization.................................................................................................223
When to Optimize........................................................................................223
Where to Optimize.......................................................................................224
Local Optimizations.....................................................................................225
Global Optimization.....................................................................................229
Review .........................................................................................................230
13. Moving On from Here .................................................................................233
From the Bottom Up....................................................................................234
From the Top Down .....................................................................................234
From the Middle Out ...................................................................................235
Specialized Topics .......................................................................................236
Further Resources on Assembly Language..................................................237
v
剩余325页未读,继续阅读
teclike
- 粉丝: 1
- 资源: 14
上传资源 快速赚钱
- 我的内容管理 收起
- 我的资源 快来上传第一个资源
- 我的收益 登录查看自己的收益
- 我的积分 登录查看自己的积分
- 我的C币 登录后查看C币余额
- 我的收藏
- 我的下载
- 下载帮助
会员权益专享
最新资源
- 27页智慧街道信息化建设综合解决方案.pptx
- 计算机二级Ms-Office选择题汇总.doc
- 单链表的插入和删除实验报告 (2).docx
- 单链表的插入和删除实验报告.pdf
- 物联网智能终端项目设备管理方案.pdf
- 如何打造品牌的模式.doc
- 样式控制与页面布局.pdf
- 武汉理工Java实验报告(二).docx
- 2021线上新品消费趋势报告.pdf
- 第3章 Matlab中的矩阵及其运算.docx
- 基于Web的人力资源管理系统的必要性和可行性.doc
- 基于一阶倒立摆的matlab仿真实验.doc
- 速运公司物流管理模式研究教材
- 大数据与管理.pptx
- 单片机课程设计之步进电机.doc
- 大数据与数据挖掘.pptx
资源上传下载、课程学习等过程中有任何疑问或建议,欢迎提出宝贵意见哦~我们会及时处理!
点击此处反馈
安全验证
文档复制为VIP权益,开通VIP直接复制
信息提交成功
评论0