自定义博客皮肤VIP专享

*博客头图:

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

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

博客底图:

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

栏目图:

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

主标题颜色:

RGB颜色,例如:#AFAFAF

Hover:

RGB颜色,例如:#AFAFAF

副标题颜色:

RGB颜色,例如:#AFAFAF

自定义博客皮肤

-+

  • 博客(27)
  • 资源 (17)
  • 收藏
  • 关注

空空如也

基于ARM 的嵌入式系统程序开发要点

(一) 嵌入式程序开发基本概念<br>(二) 系统的初始化过程<br>(三) 如何满足嵌入式系统的灵活需求<br>(四) 异常处理机制的设计<br>(五) ARM/Thumb的交互工作<br>(六) 开发高效程序的技巧<br>

2008-05-06

SkyEye教程

对于那些想进行嵌入式系统软件开发和学习,或者想研究嵌入式Linux等操作系统和一些底层系统软件(如TCP/IP等)的研究和开发人员来说,可能存在如下几方面的问题:(1)经常苦于经费不足,缺少足够的硬件开发板和完善的软件开发环境,相关的书籍对一些最新软件的分析还不够全面,无法深入研究和开发嵌入式软件。(2)高层次的软件设计和开发一般不用太考虑底层硬件的实现细节,如果直接处于一个具体的硬件环境下,在开发和研究中可能会陷入硬件的具体细节中不能自拔,而不能把精力放到高层次的软件设计和开发上。(3)如果硬件开发环境不太稳定(这种情况经常见到),且对具体的硬件不是很了解,则可能在排除问题上花费大量的不必要的时间。(4)如果你想自己尝试设计一个操作系统,则先在一个提供源码级调试的软件仿真器上进行开发,可能会大大提高你的开发进度。&lt;br&gt;&lt;br&gt;对于想了解、学习一般操作系统的实现原理,Linux/μCLinux操作系统或TCP/IP等系统级软件的实现的人员,目前一般采用的方法是看书和读源代码,这是一种静态的学习方法,效率较低,比较枯燥,缺少亲自实践的感觉。要想深入分析和开发软件,就要动手编程,不能只是看看书,读读代码,只有通过亲手实践才能够掌握软件设计的核心内容。上面所指出的问题和需求促使SkyEye项目的诞生。 &lt;br&gt;&lt;br&gt;3.SkyEye的目标和意义 &lt;br&gt;SkyEye是一个开源软件(OpenSource Software)项目,中文名字是&quot;天目&quot;。SkyEye的目标是在通用的Linux和Windows平台上实现一个纯软件集成开发环境,模拟常见的嵌入式计算机系统(这里假定&quot;仿真&quot;和&quot;模拟&quot;的意思基本相同);可在SkyEye上运行μCLinux以及μC/OS-II等多种嵌入式操作系统和各种系统软件(如TCP/IP,图形子系统,文件子系统等),并可对它们进行源码级的分析和测试。&lt;br&gt;&lt;br&gt;3.SkyEye的目标和意义 &lt;br&gt;SkyEye是一个开源软件(OpenSource Software)项目,中文名字是&quot;天目&quot;。SkyEye的目标是在通用的Linux和Windows平台上实现一个纯软件集成开发环境,模拟常见的嵌入式计算机系统(这里假定&quot;仿真&quot;和&quot;模拟&quot;的意思基本相同);可在SkyEye上运行μCLinux以及μC/OS-II等多种嵌入式操作系统和各种系统软件(如TCP/IP,图形子系统,文件子系统等),并可对它们进行源码级的分析和测试。&lt;br&gt;&lt;br&gt;纯软件的模拟器有许多种,如模拟一个芯片时序逻辑的模拟器、只模拟CPU指令的模拟器、模拟整个硬件开发板的模拟器、模拟一个PDA的模拟器等。存在一些纯软件的仿真器或模拟器,如Stanford大学的SimOS模拟器,它仿真的是MIPS系列CPU和相关外设,可以在其上运行SGI公司的Irix操作系统和软件,目前基本上停止了进一步的开发;PSIM是一个仿真PowerPC指令集的模拟器,目前只支持简单的命令行应用程序;xcopilot是一个PDA模拟器,它是由Greg Hewgill出于个人喜好编写的,它仿真的是M68K CPU,通过它可以给基于PalmOS的软件开发者提供一个模拟开发环境。Bochs是一个仿真x86 CPU的开源项目,目前还支持AMD64 CPU,在它上面可以运行Linux操作系统。其它一些商业的仿真软件如vmware和virtualPC可以仿真一个真实的x86计算机,而Virtutech Simics仿真器可以仿真多种CPU和硬件,功能强大,可用于硬件和系统软件的评测。&lt;br&gt;&lt;br&gt;SkyEye是一个指令级模拟器,可以模拟多种嵌入式开发板,可支持多种CPU指令集,在SkyEye上运行的操作系统意识不到它是在一个虚拟的环境中运行,而且开发人员可以通过SkyEye调试操作系统和系统软件。由于SkyEye的目标不是验证硬件逻辑,而是协助开发、调试和学习系统软件,所以在实现上SkyEye与真实的硬件环境相比还是有一定差别的。SkyEye在时钟节拍的时序上不保证与硬件完全相同,对软件透明的一些硬件仿真进行了一定的简化。这样带来的好处是SkyEye的执行效率更高。SkyEye的推出具有下面三方面的意义:&lt;br&gt;&lt;br&gt;通过SkyEye仿真集成环境可以很方便地进入到嵌入式系统软件学习和开发的广阔天地中。尤其对于缺少嵌入式硬件开发环境和软件开发环境的用户来说,它将是一个非常有效的学习工具和开发手段,因为SkyEye的整个软件系统都是Open Source的,且基于GPL协议(μCOS-II除外)。因此,如果要学习Linux操作系统或者进行嵌入式系统开发,但苦于没有硬件支持,SkyEye仿真环境软件是一个很好的选择! &lt;br&gt;如果想研究与具体硬件无关的系统软件(如TCP/IP协议栈等

2008-03-02

蓝牙协议电子书 + vc通讯例子

1 Introduction ......................................................................................... 4<br>1.1 Bluetooth Protocol Stack............................................................. 4<br>2 Protocols in Bluetooth Architecture.................................................. 6<br>2.1 Bluetooth Core Protocols ............................................................ 7<br>2.1.1 Baseband ....................................................................... 7<br>2.1.1.1 Audio................................................................ 7<br>2.1.2 Link Manager Protocol ................................................... 7<br>2.1.3 Logical Link Control and Adaptation Protocol................. 7<br>2.1.4 Service Discovery Protocol (SDP).................................. 8<br>2.2 Cable Replacement Protocol ...................................................... 8<br>2.2.1 RFCOMM....................................................................... 8<br>2.3 Telephony Control Protocol......................................................... 8<br>2.3.1 Telephony Control – Binary............................................ 8<br>2.3.2 Telephony Control – AT Commands .............................. 8<br>2.4 Adopted Protocols....................................................................... 9<br>2.4.1 PPP................................................................................ 9<br>2.4.2 TCP/UDP/IP ................................................................... 9<br>2.4.3 OBEX Protocol ............................................................... 9<br>2.4.3.1 Content Formats .............................................. 9<br>2.4.4 WAP............................................................................. 10<br>2.4.4.1 Content Formats ............................................ 11<br>3 Bluetooth Usage Models and Protocols ......................................... 12<br>3.1 File Transfer.............................................................................. 12<br>3.2 Internet Bridge .......................................................................... 12<br>3.3 LAN Access .............................................................................. 13<br>3.4 Synchronization ........................................................................ 14<br>3.5 Three-in-One Phone ................................................................. 14<br>3.6 Ultimate Headset ...................................................................... 15<br>4 Summary............................................................................................ 16<br>5 References......................................................................................... 17<br>6 Acronyms........................................................................................... 19

2008-02-23

linker and loader 中文版+英文版

几乎从有计算机以来,链接器和加载器就是软件开发工具包中的一部分,因为他们是<br>允许使用模块(而不是一个单独的大文件)来构建程序的关键工具。<br>早在1947年,程序员们就开始使用原始的加载器:将程序的例程存储在多个不同的磁<br>带上,并将他们合并、重定位为一个程序。在上世纪60年代早期,这些加载器就已经发展<br>的相当完善了。由于那时内存很贵且容量有限,计算机的速度(以今天的标准)很慢,为了<br>创建复杂的内存覆盖策略(将大容量的程序加在到少量的内存中),以及重复编辑之前链接<br>过的文件(节省重新创建程序的时间),这些链接器都包含了很多复杂的特性。<br>上世纪70到80年代,链接技术几乎没有什么进展。链接器趋向于更加简单,虚拟内存<br>技术将应用程序和覆盖机制中的大多数存储管理工作都转移给了操作系统,越来越快的计算<br>机和越来越大的磁盘也使得重新链接一个程序或替换个别模块比仅仅链接改变过的地方更加<br>容易了。从上世纪90年代起,由于增加了诸如动态链接共享库和C++的诸多现代特性,链接<br>器又开始变得复杂起来。像IA64这样具有长指令字和编译时访存调度等特性的先进处理器<br>架构,也需要将一些新的特性加入到链接器中以确保在被链接的程序中可以满足代码的这些<br>复杂需求。<br><br>Table of Contents<br>Chapter 0: Front Matter ........................................................ 1<br>Dedication .............................................................................................. 1<br>Introduction ............................................................................................ 1<br>Who is this book for? ......................................................................... 2<br>Chapter summaries ............................................................................. 3<br>The project ......................................................................................... 4<br>Acknowledgements ............................................................................ 5<br>Contact us ........................................................................................... 6<br>Chapter 1: Linking and Loading ........................................... 7<br>What do linkers and loaders do? ............................................................ 7<br>Address binding: a historical perspective .............................................. 7<br>Linking vs. loading .............................................................................. 10<br>Two-pass linking .............................................................................. 12<br>Object code libraries ........................................................................ 15<br>Relocation and code modification .................................................... 17<br>Compiler Drivers .................................................................................. 18<br>Linker command languages ............................................................. 19<br>Linking: a true-life example ................................................................. 20<br>Exercises .............................................................................................. 25<br>Chapter 2: Architectural Issues ........................................... 27<br>Application Binary Interfaces .............................................................. 27<br>Memory Addresses .............................................................................. 28<br>Byte Order and Alignment ............................................................... 28<br>Address formation ................................................................................ 30<br>Instruction formats ............................................................................... 31<br>Procedure Calls and Addressability ..................................................... 32<br>Procedure calls ................................................................................. 33<br>2 Table of Contents<br>Data and instruction references ............................................................ 36<br>IBM 370 ........................................................................................... 37<br>SPARC ............................................................................................. 40<br>SPARC V8 ................................................................................... 40<br>SPARC V9 ................................................................................... 42<br>Intel x86 ........................................................................................... 43<br>Paging and Virtual Memory ................................................................. 45<br>The program address space .............................................................. 48<br>Mapped files ..................................................................................... 49<br>Shared libraries and programs ......................................................... 51<br>Position-independent code ............................................................... 51<br>Intel 386 Segmentation ........................................................................ 53<br>Embedded architectures ....................................................................... 55<br>Address space quirks ........................................................................ 56<br>Non-uniform memory ...................................................................... 56<br>Memory alignment ........................................................................... 57<br>Exercises .............................................................................................. 57<br>Chapter 3: Object Files ........................................................ 59<br>What goes into an object file? .............................................................. 59<br>Designing an object format .............................................................. 60<br>The null object format: MS-DOS .COM files ...................................... 61<br>Code sections: Unix a.out files ............................................................. 61<br>a.out headers .................................................................................... 64<br>Interactions with virtual memory ..................................................... 65<br>Relocation: MS-DOS EXE files ........................................................... 72<br>Symbols and relocation ........................................................................ 74<br>Relocatable a.out .................................................................................. 75<br>Relocation entries ............................................................................. 78<br>Symbols and strings ......................................................................... 80<br>a.out summary .................................................................................. 82<br>Unix ELF ............................................................................................. 82<br>Relocatable files ............................................................................... 85<br>ELF executable files ......................................................................... 92<br>ELF summary ................................................................................... 94<br>Table of Contents 3<br>IBM 360 object format ......................................................................... 94<br>ESD records ..................................................................................... 95<br>TXT records ..................................................................................... 97<br>RLD records ..................................................................................... 97<br>END records ..................................................................................... 98<br>Summary .......................................................................................... 98<br>Microsoft Portable Executable format ................................................. 99<br>PE special sections ......................................................................... 105<br>Running a PE executable ............................................................... 107<br>PE and COFF ................................................................................. 107<br>PE summary ................................................................................... 108<br>Intel/Microsoft OMF files .................................................................. 108<br>OMF records .................................................................................. 110<br>Details of an OMF file ................................................................... 111<br>Summary of OMF .......................................................................... 114<br>Comparison of object formats ............................................................ 114<br>Project ................................................................................................ 115<br>Exercises ............................................................................................ 117<br>Chapter 4: Storage allocation ............................................ 119<br>Segments and addresses ..................................................................... 119<br>Simple storage layout ......................................................................... 120<br>Multiple segment types ...................................................................... 121<br>Segment and page alignment ............................................................. 124<br>Common blocks and other special segments ..................................... 125<br>Common ......................................................................................... 125<br>C++ duplicate removal ................................................................... 127<br>Initializers and finalizers ................................................................ 130<br>IBM pseudo-registers ..................................................................... 131<br>Special tables ................................................................................. 134<br>X86 segmented storage allocation ................................................. 134<br>Linker control scripts ......................................................................... 136<br>Embedded system storage allocation ................................................. 138<br>Storage allocation in practice ............................................................. 138<br>Storage allocation in Unix a.out linkers ......................................... 139<br>4 Table of Contents<br>Storage allocation in ELF .............................................................. 141<br>Storage allocation in Windows linkers .......................................... 144<br>Exercises ............................................................................................ 146<br>Project ................................................................................................ 147<br>Chapter 5: Symbol management ....................................... 149<br>Binding and name resolution ............................................................. 149<br>Symbol table formats ......................................................................... 150<br>Module tables ................................................................................. 153<br>Global symbol table ....................................................................... 154<br>Symbol resolution .......................................................................... 157<br>Special symbols ............................................................................. 158<br>Name mangling .................................................................................. 158<br>Simple C and Fortran name mangling ........................................... 158<br>C++ type encoding: types and scopes ............................................ 160<br>Link-time type checking ................................................................ 163<br>Weak external and other kinds of symbols ........................................ 164<br>Maintaining debugging information .................................................. 164<br>Line number information ............................................................... 164<br>Symbol and variable information ................................................... 165<br>Practical issues ............................................................................... 166<br>Exercises ............................................................................................ 167<br>Project ................................................................................................ 167<br>Chapter 6: Libraries ........................................................... 169<br>Purpose of libraries ............................................................................ 169<br>Library formats .................................................................................. 169<br>Using the operating system ............................................................ 169<br>Unix and Windows Archive files ................................................... 170<br>Unix archives ............................................................................. 170<br>Extension to 64 bits ........................................................................ 174<br>Intel OMF libraries ........................................................................ 174<br>Creating libraries ................................................................................ 176<br>Searching libraries ............................................................................. 177<br>Table of Contents 5<br>Performance issues ............................................................................. 179<br>Weak external symbols ...................................................................... 179<br>Exercises ............................................................................................ 181<br>Project ................................................................................................ 181<br>Chapter 7: Relocation ......................................................... 183<br>Hardware and software relocation ..................................................... 183<br>Link time and load time relocation .................................................... 184<br>Symbol and segment relocation ......................................................... 185<br>Symbol lookups ............................................................................. 186<br>Basic relocation techniques ................................................................ 186<br>Instruction relocation ..................................................................... 188<br>X86 instruction relocation .......................................................... 189<br>SPARC instruction relocation .................................................... 189<br>ECOFF segment relocation ............................................................ 191<br>ELF relocation ............................................................................... 193<br>OMF relocation .............................................................................. 193<br>Relinkable and relocatable output formats ........................................ 194<br>Other relocation formats .................................................................... 194<br>Chained references ......................................................................... 195<br>Bit maps ......................................................................................... 195<br>Special segments ............................................................................ 196<br>Relocation special cases ..................................................................... 197<br>Exercises ............................................................................................ 197<br>Project ................................................................................................ 198<br>Chapter 8: Loading and overlays ...................................... 201<br>Basic loading ...................................................................................... 201<br>Basic loading, with relocation ............................................................ 202<br>Position-independent code ................................................................. 203<br>TSS/360 position independent code ............................................... 203<br>Per-routine pointer tables ............................................................... 206<br>Table of Contents ........................................................................... 207<br>ELF position independent code ..................................................... 208<br>6 Table of Contents<br>PIC costs and benefits .................................................................... 212<br>Bootstrap loading ............................................................................... 213<br>Tree structured overlays ..................................................................... 214<br>Defining overlays ........................................................................... 217<br>Implementation of overlays ........................................................... 220<br>Overlay fine points ......................................................................... 222<br>Data ............................................................................................ 222<br>Duplicated code ......................................................................... 222<br>Multiple regions ......................................................................... 223<br>Overlay summary ........................................................................... 223<br>Exercises ............................................................................................ 223<br>Project ................................................................................................ 224<br>Chapter 9: Shared libraries ............................................... 227<br>Binding time ...................................................................................... 230<br>Shared libraries in practice ................................................................. 231<br>Address space management ............................................................... 231<br>Structure of shared libraries ............................................................... 232<br>Creating shared libraries .................................................................... 233<br>Creating the jump table .................................................................. 234<br>Creating the shared library ............................................................. 235<br>Creating the stub library ................................................................. 235<br>Version naming .............................................................................. 237<br>Linking with shared libraries ............................................................. 238<br>Running with shared libraries ............................................................ 238<br>The malloc hack, and other shared library problems ......................... 240<br>Exercises ............................................................................................ 243<br>Project ................................................................................................ 244<br>Chapter 10: Dynamic Linking and Loading .................... 247<br>ELF dynamic linking ......................................................................... 248<br>Contents of an ELF file ...................................................................... 248<br>Loading a dynamically linked program ............................................. 253<br>Starting the dynamic linker ............................................................ 253<br>Table of Contents 7<br>Finding the libraries ....................................................................... 254<br>Shared library initialization ............................................................ 255<br>Lazy procedure linkage with the PLT ................................................ 256<br>Other peculiarities of dynamic linking .............................................. 258<br>Static initializations ........................................................................ 258<br>Library versions ............................................................................. 259<br>Dynamic loading at runtime ............................................................... 260<br>Microsoft Dynamic Link Libraries .................................................... 260<br>Imported and exported symbols in PE files ................................... 261<br>Lazy binding .................................................................................. 266<br>DLLs and threads ........................................................................... 267<br>OSF/1 pseudo-static shared libraries ................................................. 267<br>Making shared libraries fast ............................................................... 268<br>Comparison of dynamic linking approaches ...................................... 270<br>Exercises ............................................................................................ 271<br>Project ................................................................................................ 271<br>Chapter 11: Advanced techniques ..................................... 273<br>Techniques for C++ ........................................................................... 273<br>Trial linking .................................................................................... 274<br>Duplicate code elimination ............................................................ 276<br>Database approaches ...................................................................... 278<br>Incremental linking and relinking ...................................................... 278<br>Link time garbage collection ............................................................. 281<br>Link time optimization ....................................................................... 282<br>Link time code generation ................................................................. 284<br>Link-time profiling and instrumentation ........................................ 284<br>Link time assembler ....................................................................... 285<br>Load time code generation ............................................................. 285<br>The Java linking model ...................................................................... 287<br>Loading Java classes ...................................................................... 288<br>Exercises ............................................................................................ 290<br>Project ................................................................................................ 291<br>8 Table of Contents<br>Chapter 12: References ...................................................... 293<br>Perl books ....................................................................................... 295

2008-01-10

手机游戏开发实例(smartphone联机炸弹人)

c++ wince sdk AI<br><br>smartphone版本 和windows版本<br><br>目录<br>Table of content<br>I. Introduction.........................................................................................................................................................................5<br>II. Graphics and Gameplay .................................................................................................................................................7<br>II.1. Getting Started .............................................................................................................................................................7<br>II.1.1. First Test................................................................................................................................................................7<br>II.1.2. Windows Programming and Message Handling essentials ...........................................................................8<br>II.1.3. Drawing Bitmaps to the screen........................................................................................................................ 14<br>II.1.4. Sprite movement and user input....................................................................................................................... 18<br>II.1.5. Additional stuff to do........................................................................................................................................ 22<br>II.2. Dialogs........................................................................................................................................................................22<br>II.3. GAPI, Bitmaps and Blitters......................................................................................................................................26<br>II.3.1. GAPI.................................................................................................................................................................... 26<br>II.3.2. Bitmaps................................................................................................................................................................ 30<br>II.3.3. Blitters ................................................................................................................................................................. 33<br>II.4. Game Design ..............................................................................................................................................................38<br>II.4.1. Graphics .............................................................................................................................................................. 39<br>II.4.2. Game Area .......................................................................................................................................................... 39<br>II.4.3. Bomb handling................................................................................................................................................... 40<br>II.4.4. Player Sprites...................................................................................................................................................... 42<br>II.4.5. Computer Player ................................................................................................................................................ 42<br>II.5. Finishing the game ....................................................................................................................................................43<br>II.6. Debugging...................................................................................................................................................................44<br>II.7. Efficient and clean programming on CE devices..................................................................................................45<br>II.8. Hardware Button Click Sound.................................................................................................................................47<br>III. Communications............................................................................................................................................................50<br>III.1. Overview of the libraries ........................................................................................................................................50<br>III.1.1. Consequences.................................................................................................................................................... 51<br>III.2. Messages....................................................................................................................................................................53<br>III.3. Class CNetwork........................................................................................................................................................54<br>III.3. Class CNetBuffer......................................................................................................................................................56<br>III.4. DirectPlay .................................................................................................................................................................57<br>III.4.1. Introduction....................................................................................................................................................... 57<br>III.4.2. Different kinds of Service Providers.............................................................................................................. 57<br>III.5. Class CDPNet...........................................................................................................................................................59<br>III.5.1. DirectPlay Objects and Initialisation............................................................................................................. 60<br>III.5.2. Sending Data..................................................................................................................................................... 67<br>III.5.3. Game Abort ....................................................................................................................................................... 67<br>III.6. IrDATM (Infrared Data Association).....................................................................................................................68<br>III.6.1. Introduction....................................................................................................................................................... 68<br>III.6.2. Class CNet......................................................................................................................................................... 70<br>III.6.3. Initialise the CIRNet object............................................................................................................................ 71<br>III.6.4. The Recieve Thread......................................................................................................................................... 73<br>III.6.5. The Send Thread .............................................................................................................................................. 74<br>III.6.6. The Send Buffer ............................................................................................................................................... 75<br>III.6.7. The Receive Buffer.......................................................................................................................................... 79<br>III.6.8. Testing the basic network functions............................................................................................................... 81<br>III.6.9. Last things todo in the class CIRNet.............................................................................................................. 82<br>IV. Appendix A: Overview of the message identifiers.................................................................................................84<br>3<br>V. Appendix B: Network Statistics for DirectPlay .......................................................................................................85<br>VI. Appendix C: Configuration of Bluetooth Manager to play SmartBlaser over the Bluetooth Serial Port<br>Service. ....................................................................................................................................................................................86<br>VII. LITERATURE.............................................................................................................................................................89<br>Table of figures<br>Figure 1: Screenshot of SmartBlaster ________________________________________________________ 5<br>Figure 2: Communication Infrastructure______________________________________________________ 6<br>Figure 3: Create new project ______________________________________________________________ 6<br>Figure 4: screenshot from the running application in „project3“.__________________________________ 18<br>Figure 5: The Insert Resource dialog. Three different sized empty dialog templates are available. _________ 23<br>Figure 6: The resource editor. ____________________________________________________________ 25<br>Figure 7: Under Project – Settings, open the tab “Link” and include gx.lib to the library modules _________ 26<br>Figure 8: Under Tools – Options, open the tab “Directories”.. ____________________________________ 27<br>Figure 9: Output of the sample application on the Smartphone. ___________________________________ 28<br>Figure 10: Output of the sample application on the PocketPC..____________________________________ 28<br>Figure 11 a): fast blitter function b): colour keying____________________________________________ 38<br>Figure 12: and at last the sprites get drawn with colour keying being used.___________________________ 38<br>Figure 13: The block bitmap______________________________________________________________ 39<br>Figure 14 bombs triggered by bombs _______________________________________________________ 41<br>Figure 15: Error file logging calls to new and delete___________________________________________ 46<br>Figure 16: Activate the Platform SDK library for Visual Studio ___________________________________ 50<br>Figure 17: Configuration of COM ports for the bluetooth serial sevice______________________________ 52<br>Figure 18: Enumeration of the available DirectPlay Service Providers______________________________ 58<br>Figure 19 : Message flow during network session______________________________________________ 66<br>Figure 20: different IrDa layers___________________________________________________________ 69<br>Figure 21: pointer position in send and recv buffers______________________________________________ 78<br>Figure 22: DirectPlay Network Statistic _____________________________________________________ 85<br>Figure 23: Configaration of Smartblaster____________________________________________________ 86<br>Figure 24: Configuration of computer "DUDDLE"_____________________________________________ 87<br>Figure 25: Configuration of computer "BONGO" ______________________________________________ 88<br>Table of code fragments<br>Code fragment 1: Extract from the file “Blaster_CE.h” in “project3\Blaster_CE” _____________________ 14<br>Code fragment 2: Extract from the file “Blaster_CE.cpp” in “project3\Blaster_CE” ___________________ 15<br>Code fragment 3: The file “resource.h” in project3 “project3\Blaster_CE” __________________________ 15<br>Code fragment 4: Extract from the file “Blaster_CE.rc” in project3\Blaster_CE” _____________________ 15<br>Code fragment 5: The function “LoadBitmaps” in “project3\Blaster_CE”.___________________________ 16<br>Code fragment 6: The function “DrawGame” in “project3\Blaster_CE”.____________________________ 17<br>Code fragment 9: Extract from the file „Blaster_CE.h“ in project4_________________________________ 18<br>Code fragment 10: Extract of the function “DrawGame“ in project4 _______________________________ 19<br>Code fragment 11: The function DoKeydownMain in project4a ___________________________________ 20<br>Code fragment 12: Initialising the GAPI input functionality and retrieving keycode information ___________ 20<br>Code fragment 13: The modified message loop in project4b ______________________________________ 21<br>4<br>Code fragment 14: Open a dialog box_______________________________________________________ 23<br>Code fragment 15: Example of a dialog procedure_____________________________________________ 24<br>Code fragment 17: Creating and using a font _________________________________________________ 25<br>Code fragment 18: The function ”LoadBitmap“ _______________________________________________ 33<br>Code fragment 19: The first blitter method ___________________________________________________ 34<br>Code fragment 20: The Flip method switching between primary and secondary surface_________________ 35<br>Code fragment 22: A faster blit.___________________________________________________________ 36<br>Code fragment 23: Modified LoadBitmap function _____________________________________________ 36<br>Code fragment 24: The faster blit for landscape displays ________________________________________ 37<br>Code fragment 25: Draw the background bitmap to the background buffer. __________________________ 37<br>Code fragment 28: The process function for the game. __________________________________________ 44<br>Code fragment 29: Stop the click with a device management function. ______________________________ 47<br>Code fragment 30: Query the registry before stopping the click tone. _______________________________ 49<br>Code fragment 31: Restore old click tone setting. ______________________________________________ 49<br>Code fragment 32: An example of a send method.. _____________________________________________ 59<br>Code fragment 35: Summary of the CDPServer constructor ______________________________________ 61<br>Code fragment 37: Summary of the function InitDirectPlayClient().________________________________ 62<br>Code fragment 38: Information required to enumerate hosts______________________________________ 62<br>Code fragment 39: Summary of CDPClient:: SessionsDlgEnumHosts _______________________________ 63<br>Code fragment 40: Summary of SessionsDlgNoteEnumResponse() _________________________________ 64<br>Code fragment 42: Client connects to a host (function SessionsDlgJoinGame) ________________________ 65<br>Code fragment 43: Example of how to the server sends data to all direct play clients ___________________ 67<br>Code fragment 44: Example of how to the clint sends data to the server _____________________________ 67<br>Code fragment 45: The Thread used to initialise or reconnect a network connection. ___________________ 70<br>Code fragment 46: The receive thread ______________________________________________________ 74<br>Code fragment 47: The send thread ________________________________________________________ 75<br>Code fragment 48: Example using GetNextMsg and RealeaseNexttMsg to produce a message ____________ 76<br>Code fragment 49: GetNextMsg returns a pointer to the next free message in the send buffer _____________ 76<br>Code fragment 50: ReleaseNextMsg releases dwSize bytes to be sent by adjusting the write pointer ________ 76<br>Code fragment 52: The send thread writes incoming data in the receive buffer and increments the pointers __ 79<br>Code fragment 53: Process the messages contained in the receive buffer ____________________________ 80<br>Code fragment 54: Handle incomplete messages_______________________________________________ 81<br>Code fragment 56: When detecting a socket error in one of the threads, the threads will be stopped and the reconnection<br>process will be initialised._______________________________________________________ 83

2007-12-29

The Art of Assembly Language Programming

You are visitor as of October 17, 1996.The Art of Assembly Language ProgrammingForward Why Would Anyone Learn This Stuff?1 What's Wrong With Assembly Language2 What's Right With Assembly Language?3 Organization of This Text and Pedagogical Concerns4 Obtaining Program Source Listings and Other Materials in This TextSection One: Machine OrganizationArt of Assembly Language: Chapter OneChapter One - Data Representation1.0 - Chapter Overview1.1 - Numbering Systems1.1.1 - A Review of the Decimal System1.1.2 - The Binary Numbering System1.1.3 - Binary Formats1.2 - Data Organization1.2.1 - Bits1.2.2 - Nibbles1.2.3 - Bytes1.2.4 - Words1.2.5 - Double Words1.3 - The Hexadecimal Numbering System1.4 - Arithmetic Operations on Binary and Hexadecimal Numbers1.5 - Logical Operations on Bits1.6 - Logical Operations on Binary Numbers and Bit Strings1.7 - Signed and Unsigned Numbers1.8 - Sign and Zero Extension1.9 - Shifts and Rotates1.10 - Bit Fields and Packed Data1.11 - The ASCII Character Set1.12 Summary1.13 Laboratory Exercises1.13.1 Installing the Software1.13.2 Data Conversion Exercises1.13.3 Logical Operations Exercises1.13.4 Sign and Zero Extension Exercises1.13.5 Packed Data Exercises1.14 Questions1.15 Programming ProjectsChapter Two - Boolean Algebra2.0 - Chapter Overview2.1 - Boolean Algebra2.2 - Boolean Functions and Truth Tables2.3 - Algebraic Manipulation of Boolean Expressions2.4 - Canonical Forms2.5 - Simplification of Boolean Functions2.6 - What Does This Have To Do With Computers, Anyway?2.6.1 - Correspondence Between Electronic Circuits and Boolean Functions2.6.2 - Combinatorial Circuits2.6.3 - Sequential and Clocked Logic2.7 - Okay, What Does It Have To Do With Programming, Then?2.8 - Generic Boolean Functions2.9 Laboratory Exercises<

2007-12-20

程序大战1.0

简介 程序大战也叫磁核大战,英文名为"CoreWars",是一个很古老的游戏,当年比尔.盖茨上学时就有这个东东了,不过国内玩的人很少。 目前一些免费 Unix如FreeBSD等的ports里就有他。 这个游戏可以从名字也能看出来就是程序之间的大赛。就是大家都写一个程序,然后我们把这些程序都放到内存,然后开始"并发"运行,看最终的结果是谁的程序消灭了内存中的其他程序而存活了下来。 这一程序对抗模型可以看作是原始的病毒对抗。每个程序都要尽力的消灭其他程序,为了能够生存,程序应该能保护自己,不断移动自身来躲过其他程序的攻击或当自身受到攻击后能自我修复。 当然这些程序不是运行在家用PC上,也不是随便使用大家常用的intel汇编来编写。其运行平台为Mars机。Mars是一种简单的计算机,他有固定的8000 个内存单元,和约10来个指令。然后整个大战程序就是由这些指令完成。 < 二 > Mars体系结构 Mars机器由一个组内存单元,一个CU单元,一个简单进程管理系统,和一组指令集构成。 Mars机的标准主要参考pMars虚拟机器标准,主要有两个:88标准和94标准。以下都是默认为88标准,扩展94标准会专门标识出来。 该系统内存大小固定为8000个内存单元,每一个内存单元由5个部分构成: <1> OPCODE区:操作数区,该区域指定了机器指令,如MOV ,ADD。 <2> A数据区 :一个32位的数据存储区,存放相应数据,如128,-100。 <3> A数据区寻址修饰:指定了A数据区的寻址方式。 <4> B数据区。 <5> B数据区寻址修饰。 ( 94标准中加入了一个新的部分 <6>操作数修饰区。 ) 系统的寻址方式分为立即寻址,直接寻址,间接寻址。 (94标准中加入了新的间接A减1寻址、间接A加1寻址、间接B减1寻址、间接B 加1寻址) 系统寻址都是相对当前IP为基准寻址的,这是Mars系统和传统计算机最大的不同之处。如 mov 0,1表示将当前指令所在的内存单元拷贝一份到当前指令所在内存单元的下一个内存单元。 CU单元用于执行相应的指令,配合CU单元还有一个隐含的寄存器IP,每次执行单元执行IP指定的内存单元的指令。 简单进程管理器管理进程。系统的进程由一个先进先出队列构成。每次管理系统将当前进程的执行地址出队列放入IP寄存器,然后CU单元执行指令,最后将该进程的下一条指令地址放入队尾。如果该进程产生新进程,则在队尾再加入新进程的起始执行地址。简单进程管理器保证每个进程轮流执行,当一个进程执行了DAT或者执行了0被除的操作则该进程结束。 系统指令包含: DAT MOV ADD SUB JMP JMZ JMN CMP SLT DJN SPL ( 94标准中加入了新的指令: SUB MUL DIV MOD SEQ SNE NOP LDP STP ) Mars机目前你所见到的几乎都是软件模拟系统,模拟器模拟Mars系统工作。有的模拟器支持88标准,有的支持94标准,有的支持88标准并部分支持94 标准,所以你在选择一个模拟器时应该好好看看它支持那个标准。 Mars机的汇编程序通常称为RedCode,而Mars模拟器几乎都集成了一个RedCode 的编译器,将RedCode程序编译为机器码写入内存。 系统初始时内存中都是DATA $ 0,$ 0 ,每一个程序加载到内存的随机位置,当多个程序都加载完后系统给每个程序创建一个进程,此时每个进程在进程队列中的位置是随机的,然后系统开始运行。然后各个程序开始进行对抗,看最终谁能生存下来。 <三> RedCode简单语法(按94标准)

2007-12-07

计算机体系结构第四版(原版)

Computer Architecture.pdf(英)Hennessy & Patterson

2007-12-07

csapp

深入理解计算机系统及实验

2007-12-03

缓冲区溢出攻击实验

缓冲区溢出攻击实验。

2007-11-22

揭密代码结构

揭密代码结构中英对照版

2007-11-19

逆向工程揭密

逆向工程揭密 (英)

2007-11-19

IA32 system programming guide Vol.3

IA32 system programming guide Vol.3

2007-11-08

IA32 system programming guide Vol.2

IA32 system programming guide Vol.2

2007-11-08

IA32 system programming guide Vol.1

IA32 system programming guide Vol.1

2007-11-08

at&t汇编教程1

at&t汇编教程 pdf 英文原版<br>Richard Blum

2007-11-08

跟我学模拟电子电路.pdf

跟我学模拟电子电路 电路哦

2007-11-03

空空如也

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

TA关注的人

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