List of Figures

Chapter 1: Developing Efficient Program Code

Fig. 1.1: Application window displays the outcome of the assembly function with the optimized loop
Fig. 1.2: Application that calls assembly functions and uses a single return command

Chapter 2: Optimizing Calculation Algorithms

Fig. 2.1: Application adds two floating-point numbers by using the FPU commands
Fig. 2.2: Application that calculates the sum of elements of an integer array
Fig. 2.3: Application that evaluates the formula by using the FPU commands
Fig. 2.4: Application that implements the algorithm for comparing two floating-point numbers
Fig. 2.5: Application that counts the number of occurrences of the given integer in the array
Fig. 2.6: Application calculating the sine and the cosine of an angle
Fig. 2.7: Application that tests whether the given floating-point number is equal to zero (0)
Fig. 2.8: Using the LEA (address loading) command for performing mathematical operations
Fig. 2.9: Application that copies one string to another
Fig. 2.10: Application copying the elements of one array to another
Fig. 2.11: Application that performs concatenation of two strings
Fig. 2.12: Application that performs concatenation of arrays
Fig. 2.13: Application converting lowercase characters to uppercase ones
Fig. 2.14: Application for comparing two strings

Chapter 4: Optimizing C++ Logical Structures with Assembly Language

Fig. 4.1: Window of an application that uses optimized code for computing the maximum of two integers
Fig. 4.2: Window of an application that demonstrates the use of assembly commands for replacing the switch statement

Chapter 5: Assembly Module Interface to C++ Programs

Fig. 5.1: The location of the parameters in the stack
Fig. 5.2: Window of an application that demonstrates the use of two stand-alone assembly procedures from two object files
Fig. 5.3: Window of an application that demonstrates the use of two stand-alone assembly procedures from one object file
Fig. 5.4: Window of an application that demonstrates the use of functions with _cdecl and _fastcall convention
Fig. 5.5: Window of an application that displays an inverted floating-point number

Chapter 6: Developing and Using Assembly Subroutines

Fig. 6.1: Window of an application that multiplies an integer by a constant
Fig. 6.2: Window of an application that displays a string received from an assembly function
Fig. 6.3: Window of an application that displays a copy of a string
Fig. 6.4: Window of an application that displays a part of a string from a C++ .NET program
Fig. 6.5: Window of an application that searches for a character in a string
Fig. 6.6: Window of an application that looks for the maximum element in a floating-point array
Fig. 6.7: Window of an application that demonstrates the work with an element of a structure
Fig. 6.8: Window of an application that demonstrates manipulations with the elements of a union

Chapter 7: Linking Assembly Modules with C++ .NET Programs

Fig. 7.1: Adding an object module to the project
Fig. 7.2: Project window after the object file is added
Fig. 7.3: Window of an application that computes the difference between two numbers with a separately compiled object module
Fig. 7.4: Adding a new file to a project
Fig. 7.5: Selecting the file type and extension
Fig. 7.6: Setting options for processing the sub2.asm file
Fig. 7.7: Setting parameters for compiling the sub2.asm file
Fig. 7.8: Window of an application that demonstrates the use of an ASM file in the C++ .NET environment
Fig. 7.9: Window of an application that demonstrates the use of two functions from the added assembly module
Fig. 7.10: Step 1: Selecting an external tool
Fig. 7.11: Step 2: Selecting and setting parameters of external tools
Fig. 7.12: Starting the assembly compiler from the command line
Fig. 7.13: The window of an application that demonstrates string conversion
Fig. 7.14: Window of an application that demonstrates the use of a library module
Fig. 7.15: Window of an application that demonstrates the work of the library functions add2 and sub2
Fig. 7.16: Window of an application that uses two library files
Fig. 7.17: Project window
Fig. 7.18: Window of an application that demonstrates a call to an assembly function
Fig. 7.19: Window of an application that demonstrates the use of a standard library and DLL
Fig. 7.20: Window of an application that demonstrates the use of an assembly function when dynamically loading a library

Chapter 8: Dynamic Link Libraries and Their Development in Assembly Language

Fig. 8.1: Application window that demonstrates how to use the impdll.dll import library
Fig. 8.2: Demonstration of using the load-time dynamic linking of DLL
Fig. 8.3: Application window that demonstrates the use of the addsub.dll library
Fig. 8.4: Application window that shows dynamic loading of add2 and submul5 functions
Fig. 8.5: Window of the appendix showing dynamic loading of functions from library, developed in assembly language
Fig. 8.6: Abnormal termination of the program at non-observance of the calling convention

Chapter 9: Basic Structures of Visual C++ .NET 2003 Inline Assembler

Fig. 9.1: Application window demonstrating how to use an assembly macro
Fig. 9.2: Application window demonstrating the correct and incorrect use of C++ operators
Fig. 9.3: Application window illustrating a call of C++ function from the assembly block
Fig. 9.4: Message from the debugger not operating with the stack
Fig. 9.5: Window of the application demonstrating the use of the library functions atoi and printf
Fig. 9.6: Window of the application using the inline assembler

Chapter 10: Inline Assembler and Application Optimization. MMX and SSE Technologies

Fig. 10.1: Window of an application that computes the sum of the floating-point array elements
Fig. 10.2: Window of an application that searches for the maximum element in an integer array
Fig. 10.3: Window of an application that sorts an integer array in descending order
Fig. 10.4: Window of an application that demonstrates C++ intrinsics adding byte sequences
Fig. 10.5: Window of an application that adds two bytes with MMX extension assembly commands
Fig. 10.6: Window of an application that demonstrates addition of the elements of two integer arrays with MMX extension assembly commands
Fig. 10.7: Window of an application that compares two strings with MMX extension intrinsics
Fig. 10.8: Window of an application that compares two strings with MMX extension assembly commands
Fig. 10.9: Window of an application that does a bytewise comparison of strings with MMX assembly commands and displays the result
Fig. 10.10: Window of an application that searches for an element in a character string with the MMX extension assembler
Fig. 10.11: Window of an application that demonstrates manipulations with packed data with the MMX extension assembler
Fig. 10.12: Window of an application that demonstrates a search for maximum elements with the MMX extension inline assembler
Fig. 10.13: Window of an application that compares character strings with the pxor command
Fig. 10.14: Window of an application that demonstrates multiplication of integers with C++ .NET intrinsics
Fig. 10.15: Window of an application that multiplies integers with the MMX extension assembly commands
Fig. 10.16: Window of an application that finds the absolute value of an integer
Fig. 10.17: Window of an application that performs scalar addition of two floating-point numbers with the SSE extension assembler
Fig. 10.18: Window of an application that adds four floating-point numbers in parallel with the SSE extension assembler
Fig. 10.19: Window of an application that demonstrates subtraction of floating-point array elements aligned on 16-byte boundary with the SSE extension assembler
Fig. 10.20: Window of the modified application that demonstrates parallel subtraction of array elements
Fig. 10.21: Window of an application that demonstrates parallel multiplication and division of the elements of floating-point arrays with the SSE extension assembler
Fig. 10.22: Window of an application that demonstrates scalar multiplication and division of the elements of floating-point arrays
Fig. 10.23: Result of comparing array elements with the application in Listing 10.34 that uses intrinsics
Fig. 10.24: Result of comparison of arrays when the third elements are unequal
Fig. 10.25: Window of an application that compares floating-point arrays with the cmpeqps SSE command
Fig. 10.26: Window of an application that compares two floating-point arrays for greater than/less than with SSE extension assembly commands
Fig. 10.27: Window of an application that demonstrates scalar comparison with the comiss command. The arrays are equal
Fig. 10.28: Window of an application that demonstrates scalar comparison with the comiss command. The arrays are unequal
Fig. 10.29: Window of an application that demonstrates parallel conversion of two 32-bit integers to floating-point numbers with SSE extension assembly commands
Fig. 10.30: Window of an application that demonstrates parallel conversion of 32-bit floating-point numbers to integers with the assembler
Fig. 10.31: Window of an application that demonstrates parallel extraction of the square root from floating-point packed numbers with the SSE extension assembler
Fig. 10.32: Window of an application that demonstrates a parallel search for the maximum and minimum elements in two floating-point arrays with the assembler
Fig. 10.33: Window of an application that substitutes spaces with plus characters in a CString string

Chapter 11: Optimizing Multimedia Applications with Assembly Language

Fig. 11.1: Window of a program demonstrating operations on vectors
Fig. 11.2: Window of the program demonstrating the use of the MMX extension for operations on vectors

Chapter 12: Optimizing Multithread Applications with Assembly Language

Fig. 12.1: Window of a program demonstrating three threads
Fig. 12.2: Window of a program demonstrating mathematical operations in two threads

Chapter 13: C++ Inline Assembler and Windows Time Functions

Fig. 13.1: Window of an application that displays the time of execution of a for loop
Fig. 13.2: Window of an application that demonstrates the performance of a loop implemented with assembly commands
Fig. 13.3: Window of an application that computes the sine of a number every 5 milliseconds
Fig. 13.4: Window of an application that demonstrates computing a square root in a WM_TIMER handler
Fig. 13.5: Window of an application that handles a timer event with a callback function
Fig. 13.6: Window of an application that demonstrates the use of a waitable timer when finding the maximum in the integer array
Fig. 13.7: Window of a modified version of the application that finds the maximum and uses a timeout function

Chapter 14: Using Assembly Language for System Programming in Windows

Fig. 14.1: Window of an application that copies integers with the VirtualAlloc function
Fig. 14.2: Converting characters in a text file to the upper case
Fig. 14.3: Converting characters in a text file to the lower case

Chapter 15: Optimizing Procedure-Oriented Applications and System Services

Fig. 15.1: Window of a procedure-oriented Windows application that displays the difference between two integers
Fig. 15.2: Installation of the FileWriter system service in Windows
Fig. 15.3: Starting the Filewriter service
Fig. 15.4: Window of a program that tests a system service
Fig. 15.5: Selecting the Windows Service application type
Fig. 15.6: Setting the name of the service
Fig. 15.7: Adding the installer to the project
Fig. 15.8: Setting the DisplayName property
Fig. 15.9: Setting the Account property
Fig. 15.10: Setting the timer properties
Fig. 15.11: Setting the properties of the EventLog component
Fig. 15.12: Message from the CWService system service
Fig. 15.13: Contents of the testfile file


Visual C++ Optimization with Assembly Code
Visual C++ Optimization with Assembly Code
ISBN: 193176932X
EAN: 2147483647
Year: 2003
Pages: 50
Authors: Yury Magda

flylib.com © 2008-2017.
If you may any questions please contact us: flylib@qtcs.net