自定义博客皮肤VIP专享

*博客头图:

格式为PNG、JPG,宽度*高度大于1920*100像素,不超过2MB,主视觉建议放在右侧,请参照线上博客头图

请上传大于1920*100像素的图片!

博客底图:

图片格式为PNG、JPG,不超过1MB,可上下左右平铺至整个背景

栏目图:

图片格式为PNG、JPG,图片宽度*高度为300*38像素,不超过0.5MB

主标题颜色:

RGB颜色,例如:#AFAFAF

Hover:

RGB颜色,例如:#AFAFAF

副标题颜色:

RGB颜色,例如:#AFAFAF

自定义博客皮肤

-+
  • 博客(1)
  • 资源 (7)
  • 收藏
  • 关注

原创 声明一个函数指针

写一个函数指针,指向一个接受一个函数指针作为参数返回一个函数指针的函数.

2010-07-19 17:56:00 516

The Shellcoder’s Handbook

***请支持开源*** The Shellcoder’s Handbook.About ShellCoding.

2010-03-13

NASM For Windows

***请支持开源*** 著名的nasm的windows版本,比masm更好的体验。

2010-03-07

Professional Assembly Language

***请支持开源*** 汇编大师Richard Blum的经典AT&T汇编教程英文原版(没有中文版) 下面是书中的介绍 Introduction Assembly language is one of the most misunderstood programming languages in use. When the term assembly language is used, it often invokes the idea of low-level bit shuffling and poring over thousand- page instruction manuals looking for the proper instruction format. With the proliferation of fancy high- level language development tools, it is not uncommon to see the phrase “assembly language programming is dead” pop up among various programming newsgroups. However, assembly language programming is far from dead. Every high-level language program must be compiled into assembly language before it can be linked into an executable program. For the high- level language programmer, understanding how the compiler generates the assembly language code can be a great benefit, both for directly writing routines in assembly language and for understanding how the high-level language routines are converted to assembly language by the compiler. Who This Book Is For The primary purpose of this book is to teach high-level language programmers how their programs are converted to assembly language, and how the generated assembly language code can be tweaked. That said, the main audience for this book is programmers already familiar with a high-level language, such as C, C++, or even Java. This book does not spend much time teaching basic programming principles. It assumes that you are already familiar with the basics of computer programming, and are interested in learning assembly language to understand what is happening underneath the hood. However, if you are new to programming and are looking at assembly language programming as a place to start, this book does not totally ignore you. It is possible to follow along in the chapters from the start to the finish and obtain a basic knowledge of how assembly language programming (and programming in general) works. Each of the topics presented includes example code that demonstrates how the assem- bly language instructions work. If you are completely new to programming, I recommend that you also obtain a good introductory text to programming to round out your education on the topic. What This Book Covers The main purpose of this book is to familiarize C and C++ programmers with assembly language, show how compilers create assembly language routines from C and C++ programs, and show how the gener- ated assembly language routines can be spruced up to increase the performance of an application. All high-level language programs (such as C and C++) are converted to assembly language by the com- piler before being linked into an executable program. The compiler uses specific rules defined by the cre- ator of the compiler to determine exactly how the high-level language statements are converted. Many programmers just write their high-level language programs and assume the compiler is creating the proper executable code to implement the program. Introduction However, this is not always the case. When the compiler converts the high-level language code state- ments into assembly language code, quirks and oddities often pop up. In addition, the compiler is often written to follow the conversion rules so specifically that it does not recognize time-saving shortcuts that can be made in the final assembly language code, or it is unable to compensate for poorly written high- level routines. This is where knowledge of assembly language code can come in handy. This book shows that by examining the assembly language code generated by the compiler before link- ing it into an executable program, you can often find places where the code can be modified to increase performance or provide additional functionality. The book also helps you understand how your high- level language routines are affected by the compiler’s conversion process. How This Book Is Structured The book is divided into three sections. The first section covers the basics of the assembly language programming environment. Because assembly language programming differs among processors and assemblers, a common platform had to be chosen. This book uses the popular Linux operating system, running on the Intel family of processors. The Linux environment provides a wealth of program devel- oper tools, such as an optimizing compiler, an assembler, a linker, and a debugger, all at little or no charge. This wealth of development tools in the Linux environment makes it the perfect setting for dissecting C programs into assembly language code. The chapters in the first section are as follows: Chapter 1, “What Is Assembly Language?” starts the section off by ensuring that you understand exactly what assembly language is and how it fits into the programming model. It debunks some of the myths of assembly language, and provides a basis for understanding how to use assembly language with high- level languages. Chapter 2, “The IA-32 Platform,” provides a brief introduction to the Intel Pentium family of processors. When working with assembly language, it is important that you understand the underlying processor and how it handles programs. While this chapter is not intended to be an in-depth analysis of the opera- tion of the IA-32 platform, it does present the hardware and operations involved with programming for that platform. Chapter 3, “The Tools of the Trade,” presents the Linux open-source development tools that are used throughout the book. The GNU compiler, assembler, linker, and debugger are used in the book for com- piling, assembling, linking, and debugging the programs. Chapter 4, “A Sample Assembly Language Program,” demonstrates how to use the GNU tools on a Linux system to create, assemble, link, and debug a simple assembly language program. It also shows how to use C library functions within assembly language programs on Linux systems to add extra fea- tures to your assembly language applications. The second section of the book dives into the basics of assembly language programming. Before you can start to analyze the assembly language code generated by the compiler, you must understand the assem- bly language instructions. The chapters in this section are as follows: xxiv Introduction Chapter 5, “Moving Data,” shows how data elements are moved in assembly language programs. The concepts of registers, memory locations, and the stack are presented, and examples are shown for mov- ing data between them. Chapter 6, “Controlling Execution Flow,” describes the branching instructions used in assembly lan- guage programs. Possibly one of the most important features of programs, the ability to recognize branches and optimize branches is crucial to increasing the performance of an application. Chapter 7, “Using Numbers,” discusses how different number data types are used in assembly lan- guage. Being able to properly handle integers and floating-point values is important within the assembly language program. Chapter 8, “Basic Math Functions,” shows how assembly language instructions are used to perform the basic math functions such as addition, subtraction, multiplication, and division. While these are gener- ally straightforward functions, subtle tricks can often be used to increase performance in this area. Chapter 9, “Advanced Math Functions,” discusses the IA-32 Floating Point Unit (FPU), and how it is used to handle complex floating-point arithmetic. Floating-point arithmetic is often a crucial element to data processing programs, and knowing how it works greatly benefits high-level language programmers. Chapter 10, “Working with Strings,” presents the various assembly language string-handling instruc- tions. Character data is another important facet of high-level language programming. Understanding how the assembly language level handles strings can provide insights when working with strings in high-level languages. Chapter 11, “Using Functions,” begins the journey into the depths of assembly language programming. Creating assembly language functions to perform routines is at the core of assembly language optimiza- tion. It is good to know the basics of assembly language functions, as they are often used by the compiler when generating the assembly language code from high-level language code. Chapter 12, “Using Linux System Calls,” completes this section by showing how many high-level func- tions can be performed in assembly language using already created functions. The Linux system pro- vides many high-level functions, such as writing to the display. Often, you can utilize these functions within your assembly language program. The last section of the book presents more advanced assembly language topics. Because the main topic of this book is how to incorporate assembly language routines in your C or C++ code, the first few chapters show just how this is done. The remaining chapters present some more advanced topics to round out your education on assembly language programming. The chapters in this section include the following: Chapter 13, “Using Inline Assembly,” shows how to incorporate assembly language routines directly in your C or C++ language programs. Inline assembly language is often used for “hard-coding” quick rou- tines in the C program to ensure that the compiler generates the appropriate assembly language code for the routine. Chapter 14, “Calling Assembly Libraries,” demonstrates how assembly language functions can be com- bined into libraries that can be used in multiple applications (both assembly language and high-level language). It is a great time-saving feature to be able to combine frequently used functions into a single library that can be called by C or C++ programs. xxv Introduction Chapter 15, “Optimizing Routines,” discusses the heart of this book: modifying compiler-generated assembly language code to your taste. This chapter shows exactly how different types of C routines (such as if-then statements and for-next loops) are produced in assembly language code. Once you understand what the assembly language code is doing, you can add your own touches to it to customize the code for your specific environment. Chapter 16, “Using Files,” covers one of the most overlooked functions of assembly language program- ming. Almost every application requires some type of file access on the system. Assembly language pro- grams are no different. This chapter shows how to use the Linux file-handling system calls to read, write, and modify data in files on the system. Chapter 17, “Using Advanced IA-32 Features,” completes the book with a look at the advanced Intel Single Instruction Multiple Data (SIMD) technology. This technology provides a platform for program- mers to perform multiple arithmetic operations in a single instruction. This technology has become cru- cial in the world of audio and video data processing. What You Need to Use This Book All of the examples in this book are coded to be assembled and run on the Linux operating system, run- ning on an Intel processor platform. The Open Source GNU compiler (gcc), assembler (gas), linker (ld), and debugger (gdb) are used extensively throughout the book to demonstrate the assembly language features. Chapter 4, “A Sample Assembly Language Program,” discusses specifically how to use these tools on a Linux platform to create, assemble, link, and debug an assembly language program. If you do not have an installed Linux platform available, Chapter 4 demonstrates how to use a Linux distribution that can be booted directly from CD, without modifying the workstation hard drive. All of the GNU development tools used in this book are available without installing Linux on the workstation.

2010-02-20

RealPlayer For Linux RPM包

***请支持开源*** RealPlayer 11的rpm包,请用相应软件包管理前端安装,不要简单的使用rpm命令,因为可能需要相应依赖。

2010-02-20

evaQQ 0.4.9 rpm包

***请支持开源*** 不要用rpm指令安装,直接双击安装。o(∩_∩)o...哈哈

2010-02-05

making——gcc和g++辅助工具

gcc和g++的辅助工具,可以批量编译程序

2009-10-31

GTK+2.0编程范例

***请支持开源*** 基本信息 ·出版社:清华大学出版社 ·页码:307 页 ·出版日期:2002年11月 ·ISBN:7302060118 ·条形码:9787302060116 ·包装版本:第1版 ·装帧:平装 ·开本:16开 产品信息有问题吗?请帮我们更新产品信息。 内容简介 本书分两部分共11章,第一部分为前五章,主要讲述基础的GTK+2.0编程、GTK+2.0中的常用控件的使用方法等;第二部分为后六章,是前一部分的提高和扩展,主要讲述GTK+2.0中新增的复杂控件的使用、文件操作、游戏编程等高级应用。 编辑推荐 本书分两部分共11章,第一部分为前五章,主要讲述基础的GTK+2.0编程、GTK+2.0中的常用控件的使用方法等;第二部分为后六章,是前一部分的提高和扩展,主要讲述GTK+2.0中新增的复杂控件的使用、文件操作、游戏编程等高级应用。

2009-10-31

空空如也

TA创建的收藏夹 TA关注的收藏夹

TA关注的人

提示
确定要删除当前文章?
取消 删除