Newsgroups: alt.books.technical Subject: "Programming the PowerPC" Date: 5 Dec 1994 17:55:29 -0500 The cover price is $40.00. The book teaches techniques for programming the new Power Macs using either the Symantec Cross-Development Kit or the Metrowerks CodeWarrior PowerPC compiler. The disk contains source code and projects for both compilers. "Programming the PowerPC" Dan Sydow M&T Books, 1994 $39.95 ISBN: 1-55851-400-7 Below is the entire Table of Contents of the book so you can get an idea as to whether or not the book is of interest to you. ___________________________________________ Programming the PowerPC Table of Contents 1 The PowerPC and the Power Macs The Need for a New Chip CISC and RISC RISC Leads to More Than Just Speed The Power Macintosh Line Features of the New Macs The Customer Base Is It Still a Mac? The PowerPC System Software Software Compatibility Hardware Compatibility Developer Support Chapter Summary 2 CISC and RISC Technologies CISC and the 680x0 Series Why CISC? Instruction Execution on a 680x0 The Timing of Intructions on a 680x0 CISC-Fast, But Not Fast Enough RISC and the Power Mac Series Why RISC? Instruction Execution on a Power Mac The Timing of Intructions on a Power Mac Chapter Summary 3 The PowerPC Architecture Branch Processing Unit Instruction Fetching Instruction Fetching and the Branch Unit Superscaling The Superscalar Design Branch Processing Unit Integer Unit Floating-Point Unit Cache Data Cache Instruction Cache Chapter Summary 4 PowerPC System Software-the Emulator and Mixed Mode The PowerPC System Software Ported System Software Routines The New System Software PowerPC Execution of System Software Routines The 68LC040 Emulator The Mixed Mode Manager Instruction Set Architecture Cross-Mode Calls 680x0 to PowerPC Cross-Mode Calls PowerPC to 680x0 Cross-Mode Calls The Programmer's Role in Mode-Switching Chapter Summary 5 PowerPC System Software-Code Fragments The PowerPC Runtime Environment What the Runtime Environment Is A New Runtime Environment-And Why It Was Needed Import Libraries Linked Libraries and Import Libraries Advantages of Import Libraries Code Fragments About Code Fragments The Code Fragment Manager Transition Vectors The Table of Contents Chapter Summary 6 PowerPC Compilers The Metrowerks CodeWarrior Compilers What Metrowerks Consists Of Creating a CodeWarrior Project Adding to the Project The Prefix File Creating the Resource File The MWdemoPPC Source Code Creating the PowerPC Application Symantec's Cross-Development Kit (CDK) What the CDK Consists Of Installing AppleScript Using AppleScript to Update ANSI Libraries Creating a Folder to Hold Your Power Mac Project Creating the Resource File Opening the CDK Project Required Resources The CDKdemoPPC Source Code Creating the PowerPC Application Chapter Summary 7 Universal Procedure Pointers Universal Procedure Pointer Theory Procedure Pointers and the 680x0 processor Universal Procedure Pointers and the PowerPC Using UniversalProcPtrs Using a UniversalProcPtr in a Call to ModalDialog() How the Compiler Chooses Between ProcPtr and UniversalProcPtr Using UniversalProcPtrs in Other Toolbox Calls UniversalProcPtr Example Programs ModalDialog() and UPPs User Items and UPPs Chapter Summary 8 Fat Binary Applications Fat Application Theory Structure of a 680x0 Application Structure of a PowerPC Application Structure of a Fat Application Using CodeWarrior to Create Fat Apps Creating the PowerPC Version Creating the Fat Binary Creating the 680x0 Version Using Symantec's CDK to Create Fat Apps Creating the PowerPC Version Creating the 680x0 Version Creating the Fat Binary Gracefully Exiting a PowerPC-only App PowerPC-only Applications and User-Friendliness The 680x0 Resource File The 680x0 Source Code Copying the Resources to the PowerPC-only App Stripping Fat Applications Converting a Fat Binary to a PowerPC Application Converting a Fat Binary to a 680x0 Application Chapter Summary 9 The PowerPC Numerics Environment Switching From SANE to PowerPC Numerics PowerPC Numerics Data Formats The Single Format The Double Format The Double-Double Format Numeric Data Format Summary Numerics Libraries and the PowerPC Numerics Porting Considerations The extended and double_t Data Types Eliminate the comp Data Type Be Aware of How Expressions Are Evaluated Chapter Summary 10 Porting Code to Native PowerPC Porting Preparation Use the Universal Header Files Change Assembly Code to C Code ANSI C and the PowerPC Change int Variables to Other Integral Types Use ANSI Function Declarations Use Function Prototypes Using a Single Source File For Both 68K and PowerPC Development Using Conditional Compilation Directives QuickDraw Globals and Conditional Compilation Directives How the Compiler Knows If a Macro Is Defined PowerPC Compatibility Keep Code 32-bit Clean Use Access Functions for Low-Memory Globals Use Universal Procedure Pointers in Place of ProcPtrs Data Alignment The 680x0 Alignment Convention The PowerPC Alignment Convention Potential Data Alignment Problems The Data Alignment Solution Testing Data Alignment Avoiding an Alignment Switch Chapter Summary 11 Import Libraries Code Fragment Basics All Code is a Fragment Fragment Code and Containers Import Library Basics Imported and Exported Symbols Import Library Special Routines Import Library Code Defining One of the Special Routines A Second Initialization Routine Example Import Library Advantages Loading and Executing Import Library Code Creating an FSSpec For an Import Library Loading a Library Unloading a Library Creating a Library With CodeWarrior The Import Library Resources The Import Library Project The Import Library Source Code Creating a Test Application With CodeWarrior The Application Resources The Application Project The Application Source Code Executing the Application and the Library Loading a Library on Demand The Test Application's Resources The Argument for Import Libraries The Test Application's Code Sharing Import Libraries Sharing the CompanyInfo Library Between Applications Creating a 'shlb' Library Chapter Summary 12 More Import Libraries Adding Icons to Applications and Libraries Adding an Icon to the Application Adding an Icon to the Library A Second Library Example Opening a PICT File The Initialization Routine The Termination Routine The Main Routine Using CodeWarrior to Build the Library Modifying the TestApp2 Application Changes to the TestApp2 Resources Changes to the TestApp2 Code A Last Word on the Main Routine Testing the PICTchooser Library Apple Events Introduction to Apple Events Responding to a Quit Application Apple Event Adding Apple Events to an Application Modifying the Main Event Loop Installing the Event Handlers Defining the Event Handlers Defining the Open Document Event Handler Testing Apple Events Chapter Summary 13 Optimizing PowerPC Code Improving the Timing of WaitNextEvent() Using WaitNextEvent() Outside the Main Event Loop Verifying the WaitNextEvent() Is Time Consuming A First Solution-Fewer Calls to WaitNextEvent() A Second Solution-Timing the Calls to WaitNextEvent() Miscellaneous Performance Enhancements Align Data Structures Move Floating-Point Parameters to the End of the List Chapter Summary