← Power Macintosh Programming Starter kit 1994

Power Macintosh Programming Starter kit 1994

From the originals

13 scans

Machine-transcribed text and image descriptions. Check the linked original for uncertain words or fine print.

These are transcribed pages from the documents, not the full publications. Open the original for the remaining pages.

Image 1

Power Macintosh Programming Starter Kit

POWER MACINTOSH PROGRAMMING STARTER KIT Software runs on both PowerPC and 680x0 Macintosh Computers FEATURING A SPECIAL VERSION OF METROWERKS CODEWARRIOR™ The Don Crabb Macintosh Library TOM THOMPSON

A book cover with a black-and-white woodcut-style illustration of workers at machines and computers, overlaid by a yellow central panel with bold black and white title lettering and a circular multicolored CD sticker at top right.

Reading notes: The CD sticker text is partially cut off at the right edge, so '680x0' appears as '680xC' and is cropped. The 'O' in 'MACINTOSH' is rendered as a gear graphic and may be read differently. The 'Software runs on both' sticker text is partly clipped at the right edge of the image.

Languages
English
PDF page 1

POWER MACINTOSH PROGRAMMING STARTER KIT Software runs on both PowerPC and 680x0 Macintosh Computers FEATURING A SPECIAL VERSION OF METROWERKS CODEWARRIOR™ The Don Crabb Macintosh Library TOM THOMPSON

A book cover with a black-and-white woodcut-style illustration of workers at machines and computers, with a yellow panel bearing large black and white title type and a compact disc graphic at upper right.

Reading notes: The disc label text 'Software runs on both PowerPC and 680x0 Macintosh Computers' is partly cut off at the right edge, so '680x0' may be incomplete. The Don Crabb Macintosh Library line is printed over a dark illustration and is partly low contrast.

Printed product names
Power Macintosh Programming Starter Kit
Languages
English
PDF page 2

Power Macintosh Programming Starter Kit

' - ·..::~ ·~Q ... -- ..... ._ ..... -.-- ~ ....- - - ~ - ; - ~ - ,.... - - "W - - - - ....- Power Macintosh Programming Starter Kit ---~~---- -- - - --,,,,....,~============m ........ -_.,,,,,.,...,.__....,,.

Reading notes: Most of the supplied text is garbled decorative fragments that could not be read reliably. The headline is inferred from the centred product name lines and may not be the primary printed headline. No prices, dates or years appear in the supplied copy. Reading order and exact line breaks of the product name are uncertain.

Printed product names
Power Macintosh Programming Starter Kit
Languages
English
PDF page 3

Power Macintosh Programming Starter Kit Tom Thompson Hayden Books

A book cover with a black-and-white woodcut-style vertical strip of figures at a computer on the left, a bold title and author name at top right, a Hayden Books logo in the center, and a man in a woodcut style holding a floppy disk and looking at a computer at bottom right.

Reading notes: Title block layout is read top to bottom; the logo text 'Hayden Books' is a publisher mark rather than body copy.

Languages
English
PDF page 4

Power Macintosh Programming Starter Kit

Power Macintosh Programming Starter Kit © 1994 Hayden Books, a division of Macmillan Computer Publishing. All rights reserved. Printed in the United States of America. No part of this book may be used or reproduced in any form or by any means, or stored in a database or retrieval system, without prior written permission of the publisher except in the case of brief quotations embodied in critical articles and reviews. Making copies of any part of this book for any purpose other than your own personal use is a violation of United States copyright laws. For information, address Hayden Books, 201West103rd Street, Indianapolis, Indiana 46290. Library of Congress Catalog Number: 9475236 ISBN: 1-56830-091-3 This book is sold as is, without warranty of any kind, either express or implied. While every precaution has been taken in the preparation of this book, the publisher and author assume no responsibility for errors or omissions. Neither is any liability assumed for damages resulting from the use of the information or instructions contained herein. It is further stated that the publisher and author are not responsible for any damage to or loss of your data or your equipment that results directly or indirectly from your use of this book. 96 95 94 4 3 2 1 Interpretation of the printing code: the rightmost double-digit number is the year of the book's printing; the rightmost single-digit number is the number of the book's printing. For example, a printing code of 941 shows that the first printing of the book occurred in 1994. Trademark Acknowledgments: All products mentioned in this book are either trademarks of the companies referenced in this book, registered trademarks of the companies refer- enced in this book, or neither. We strongly advise that you investigate a particular product's name thoroughly before you use the name as your own. Apple, Power Macintosh, Mac, Macintosh, PowerBook, and Duo are registered trademarks of Apple Computer, Inc. Metrowerks is a registered trademark and Code Warrior is a trademark of Metrowerks, Inc.

Reading notes: Printing code '96 95 94 4 3 2 1' spacing and layout may not reflect true reading order Library of Congress number '9475236' printed without a separator

Printed product names
Power Macintosh Programming Starter Kit · Apple · Power Macintosh · Mac · Macintosh · PowerBook · Duo · Metrowerks · Code Warrior
Printed dates
1994 · 9475236 · 1-56830-091-3 · 96 · 95 · 94 · 941
Languages
English
PDF page 5

The image is a plain, entirely blank white portrait page with no visible artwork, layout, or markings.

PDF page 6

The Hayden Books Team Publisher: David Rogelberg Managing Editor: Karen Whitehouse Library Editor: Don Crabb Development Editor: Brad Miser Copy and Production Editor: Marj Hopper Technical Reviewers: Richard Hooker, IBM Microelectronics; Alan Lillich, Apple Computer, Inc.; Mark Anderson, Metrowerks, Inc. Cover Designer: Jean Bisesi Interior Designer: Barbara Webster Production Analysts: Dennis Clay Hager, Mary Beth Wakefield Production Team: Gary Adair, Brad Chinn, Kim Cofer, Mark Enochs, Stephanie Gregory, Jenny Kucera, Beth Rago, Bobbi Satterfield, Marc Sheeter, Kris Simmons, Greg Simsic, Carol Stamile, Robert Wolf Indexers: Michael Hughes, C. A Small Composed in: FC-Serifa, FC-Imago, and MCPdigital

Reading notes: Primary heading not clearly identifiable; list appears to be a credits page rather than a headline.

Languages
English
PDF page 7

About the Author Tom Thompson has a BSEE degree and bought his first 128K Macintosh in early 1984. He is a Senior Tech Editor at Large for BYTE Magazine and has been covering the Mac for over ten years. He is an Associate Apple Devel- oper, and has substantial programming experience including several shareware utilities. He has also researched and written numerous articles on programming and hardware technology.

Printed product names
Macintosh
Printed dates
1984
Languages
English
PDF page 8

Overview 1 The Power Macs and a Brief History 1 2 CodeWarrior: A Guided Tour 15 3 Beginning Programs 41 4 Using the Toolbox 61 5 The PowerPC Software Architecture 143 6 Putting It All Together 169 7 The Art of Debugging 261 A The PowerPC RISC Processor Family 297 B Porting to the Power Macintosh 303 c Program Listings 307 0 Where to Go for Help Information 385 Glossary 387 Index 393 License 423

Reading notes: Chapter numbering 'c' and '0' may be OCR misreadings of 'C' and 'O' or other characters Some lines contain irregular spacing that may affect reading order

Printed product names
CodeWarrior
Languages
English
PDF page 9

Contents 1 The Power Macs and a Brief History 1 The Early Mac ..................................................................................................... 2 Faster and Better ...................................................................................... 4 The Modern Mac ...................................................................................... 4 Apple and IBM, Who Could Have Imagined It? ............................ 7 Time for a Change (to Power Mac) ............................................................ 13 2 CodeWarrior: A Guided Tour 15 CodeWarrior Requirements .......................................................................... 17 The Toolbar ........................................................................................................ 18 The Project .......................................................................................................... 19 The Editor ........................................................................................................... 27 The Compiler and Linker .............................................................................. 33 Preferences ........................................................................................................ 33 The Tour's Over ................................................................................................ 40 3 Beginning Programs 41 About the Toolbox ........................................................................................... 42 Munge It .................................................................................................... 42 Where's the Mac? ................................................................................... 55 Processes Revealed ............................................................................... 56 A Word of Caution ................................................................................. 59 Just the Beginning.......................................................................................... 60 4 Using the Toolbox 61 Meet Some Managers .................................................................................... 62 Initializing Managers ............................................................................ 65 Run the Code ........................................................................................... 69 The Fork in the File .......................................................................................... 70 Making Resources ........................................................................................... 72 Making Menus ........................................................................................ 74 Making Dialog Boxes ............................................................................ 80 Status Display .......................................................................................... 86 Adding Alerts .......................................................................................... 88 Saving Resource Data as Text .......................................................... 94 Some Words on Events .................................................................................. 95

Reading notes: Source appears to be a table of contents, so headline and product names are inferred from printed chapter titles rather than advertising copy.

Printed product names
Power Mac · CodeWarrior
Languages
English
PDF page 10

Power Macintosh Programming Starter Kit

0 Power Macintosh Programming Starter Kit •••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••• Code at Last ....................................................................................................... 97 The First Function ................................................................................ 100 Munger Code, Revisited ..................................................................... 101 Input and Output Filenames ............................................................ 104 Basic Application Functions ............................................................ 108 Main Event Loops ................................................................................. 111 The Initialization Function ................................................................. 117 Build Munger .......................................................................................... 119 High-Level Events .......................................................................................... 120 Make Munger Handle High-Level Events .................................... 121 New Alerts .............................................................................................. 134 Bundle Resource ................................................................................... 135 Finishing Up .......................................................................................... 140 The Fork in the Road ..................................................................................... 141 5 The PowerPC Software Architecture 143 The 68K Application Run-Time Architecture ....................................... 144 The PowerPC Application Run-Time Architecture ............................ 153 A Tale of Two Processors ............................................................................ 167 6 Putting It All Together 169 SwitchBank: Initial Investigation and Design ...................................................................................................... 171 Building Resources with Rez ..................................................................... 173 The SwitchBank Program ............................................................................ 191 Making a Fat Binary ...................................................................................... 215 Handling a Code Fragment ....................................................................... 220 Interlude: The Anatomy of a Trap ........................................................... 220 Writing a Fat Trap ......................................................................................... 225 Building a Fat Trap ....................................................................................... 253 7 The Art of Debugging 261 About Debuggers .......................................................................................... 262 Using the Code Warrior Debugger ........................................................... 265 A Low-Level Debugger ................................................................................ 283 Debugging Techniques ............................................................................... 286 A Bug Taxonomy ........................................................................................... 288 Debugging Miscellany ................................................................................ 293

Reading notes: Table of contents entries include dotted leaders and page numbers; reading order is sequential but page numbers are not reproduced in metadata.

Languages
English
PDF page 11

Contents 0· •••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••• A The PowerPC RISC Processor Family 297 PowerPC 601 .................................................................................................... 299 PowerPC 603 ................................................................................................... 300 B Porting to the Power Mac 303 C Program Listings 307 D Chapter 3 .......................................................................................................... 307 Chapter 4 ........................................................................................................... 310 Chapter 6 .......................................................................................................... 334 Where to Go for Help and Information 385 How to Address Your Request ................................................................. 386 AppleLlnk ............................................................................................... 386 CompuServe .......................................................................................... 386 GEnie ........................................................................................................ 386 America Online ..................................................................................... 386 Delphi ....................................................................................................... 386 After You Get the List .................................................................................. 386 Glossary Index License 387 393 423

Reading notes: Table of contents contains dotted leaders and page numbers that are not part of the copy Some words in the contents list are split across lines, e.g. 'Help and Information'

Printed product names
PowerPC 601 · PowerPC 603 · Power Mac · CompuServe · GEnie · America Online · Delphi
Languages
English