PowerPC Programming for Intel Programmers
From the originals
13 scansMachine-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
PowerPC™ Programming for Intel Programmers BONUS CD-ROM! Design PowerPC Programs on Your Intel-Compatible PC with Tools from MetaWare and MicroAPL Your In-Depth Reference to the PowerPC Architecture Analyze the Programmatic Differences in the PowerPC Family of Microprocessors Features an Expanded and Annotated PowerPC Instruction Set Reference Kip McClanahan Systems Software Designer, Motorola Incorporated IDG BOOKS WORLDWIDE PROFESSIONAL PUBLISHING GROUP PROGRAMMERS PRESS
A book cover with an orange-to-white gradient left edge, a bonus CD-ROM graphic at top right, and a central image of a red hand over a yellow background with PowerPC chip graphics and circuit-like lines.
Reading notes: Small publisher logo text at bottom left (IDG Books Worldwide, Professional Publishing Group, Programmers Press) is partly small and stylized; the transcription follows the legible words. The 'PowerPC' chip labels within the central image are small and partially obscured; they were not transcribed separately.
- Printed product names
- PowerPC · Intel Programmers · MetaWare · MicroAPL
- Languages
- English
PDF page 1
POWERPC PRO~RAMMING BONUS CD·ROM!
-- POWERPC" PRO~RAMMING BONUS CD·ROM! Design PowerPC Programs on Your Intel-Compatible PC with Tools from MetaWare and MicroAPL for INTEL PROGRAMMERS Your ln·Depth Reference to the PowerPC Architecture Analyze the Programmatic Differences in the PowerPC Family of Microprocessors Features an Expanded and Annotated PowerPC Instruction Set Reference .:r- ·;.;.r KIP MCCLANAHAN Systems Software D esigner, M otorola Incorporated
Reading notes: Headline reads 'PRO~RAMMING' with a tilde, which may be an OCR artifact for 'PROGRAMMING'; left as supplied. Stray quotation mark after 'POWERPC' at the top of the supplied copy is uncertain. Garbled marks '.:r- ·;.;.r' near the bottom are unreadable and may be decorative or scan noise. Leading '--' at the top of the supplied copy is uncertain. Layout and reading order are inferred from the supplied line sequence, not confirmed from the image. 'Design PowerPC Programs on Your Intel-Compatible PC' and similar lines are descriptive copy rather than named products; no product names were added beyond the tool vendors. Transcript intentionally left empty per supplied instructions; exact text is preserved separately.
- Printed product names
- MetaWare · MicroAPL
- Languages
- English
PDF page 2
The image is a entirely blank white page with no visible artwork, text, or layout elements.
PDF page 3
POWERPC RAMMING FOR L PROGRAMMERS KIP MCCLANAHAN II ~ - == ::::;;;:; IDG BOOKS WORLDWIDE ~ 1'\18USHI NGGROUP A Division of IDG Books Worldwide, Inc. Foster City, CA • Ch icago, IL • Indianapoli s, IN • Bra intree, MA • Dallas, TX
Reading notes: Headline line breaks and letter spacing in the source ("POWERPC / RAMMING FOR / L PROGRAMMERS") are irregular; the reconstructed headline may not match the exact printed layout. Author name "KIP MCCLANAHAN" and publisher lines appear in the copy but were not captured as headline.
- Languages
- English
PDF page 4
PowerPC Programming for Intel Programmers Published by IDG Books Worldwide, Inc. An International Data Group Company 919 East Hillsdale Boulevard, Suite 400 Foster City, CA 94404 Copyright Copyright© 1995 by IDG Books Worldwide. All rights reserved. No part of this book (including interior design, cover design, and illustrations) may be reproduced or transmitted in any form, by any means, (electronic, photocopy- ing, recording, or otherwise) without the prior written permission of the pub- lisher. For authorization to photocopy items for internal corporate use, person- al use, or for educational and/or classroom use, please contact: Copyright Clearance Center, 222 Rosewood Drive, Danvers, MA 01923 USA, Fax Nbr. 508-750-4470. Library of Congress Catalog Card No.: 95-75059 ISBN 1-56884-306-2 Printed in the United States of America First Printing, June, 1995 10987654321 Distributed in the United States by IDG Books Worldwide, Inc. Limit of Liability/Disclaimer of Warranty The author and publisher of this book have used their best efforts in preparing this book. IDG Books Worldwide, Inc., International Data Group, Inc., and the author make no representation or warranties with respect to the accuracy or com- pleteness of the contents of this book or the material on this disk included with this book, and specifically disclaim any implied warranties of merchantability or fitness for any particular purpose, and shall in no event be liable for any loss of profit or any other commercial damage, including but not limited to special, incidental, consequential or other damages. Trademarks All brand names and product names used in this book are trademarks, regis- tered trademarks, or trade names of their respective holders. IDG Books World- wide, Inc., is not associated with any product or vendor mentioned in this book. Motorola and the Motorola logo are registered trademarks of Motorola Incor- porated. PowerPC, the PowerPC logo, PowerPC 601, PowerPC 603, PowerPC 604, PowerPC 620, and the PowerPC 600 Family are trademarks of Interna- tional Business Machines Corporation and are used by Motorola under license from International Business Corporation." Published in the United States
Reading notes: Copyright line OCR reads 'Copyright© 1995' with spacing irregularities; verify symbol and spacing. Trademark paragraph contains a stray closing quotation mark after 'International Business Corporation.'
- Printed product names
- PowerPC 601 · PowerPC 603 · PowerPC 604 · PowerPC 620 · PowerPC 600 Family · PowerPC · PowerPC logo · Motorola logo
- Printed dates
- 1995 · June, 1995
- Languages
- English
PDF page 5
Welcome to the world of IDG Books Worldwide. IDG Books Worldwide, Inc. is a subsidiary of International Data Group, the world's largest pub- lisher of computer-related information and the leading global provider of information services on information technology. IDG was founded more than 25 years ago and now employs more than 7,500 people worldwide. IDG publishes more than 235 computer publications in 67 countries (see listing below). More than fifty million people read one or more IDG publications each month. Launched in 1990, IDG Books Worldwide is today the #l publisher of best-selling computer books in the United States. We are proud to have received 3 awards from the Computer Press Association in recognition of editorial excellence, and our best-selling ... For Dummies™ series has more than 15 million copies in print with translations in 24 languages. IDG Books, through a recent joint venture with IDG's Hi-Tech Beijing, became the first U.S. publisher to publish a computer book in the Peo- ple's Republic of China. In record time, IDG Books has become the first choice for millions of read- ers around the world who want to learn how to better manage their businesses. Our mission is simple: Every IDG book is designed to bring extra value and skill-building instruc- tions to the reader. Our books are written by experts who understand and care about our readers. The knowledge base of our editorial staff comes from years of experience in publishing, education, and journalism - experience which we use to produce books for the '90s. In short, we care about books, so we attract the best people. We devote special attention to details such as audience, interi- or design, use of icons, and illustrations. And because we use an efficient process of authoring, editing, and desktop publishing our books electronically, we can spend more time ensuring superi- or content and spend less time on the technicalities of making books. You can count on our commitment to deliver high-quality books at competitive prices on topics consumers want to read about. At IDG, we value quality, and we have been delivering quality for more than 25 years. You'll find no better book on a subject than an IDG book. rJ~ john Kilcullen President and CEO IDG Books Worldwide, Inc. IDG Books Worldwide, Inc. is a subsidiary of International Data Group, the world's largest publisher of computer-related information and the leading global provider of information services on information technology. International Data Group publishes over 220 computer publications in 65 countries. More than fifty million people read one or more Imernational Data Group publications each month. The officers are Patrick J. McGovern, Founder and Board Chairman; Kelly Conlin, President; Jim Casella, Chief Operating Officer. International Data Group's publications include: ARGENTINA'S Computerworld Argentina, lnfoworld Argentina; AUSTRALIA'S Computer- world Australia, Computer Living, Australian PC World, Australian Macworld, Network World, Mobile Business Australia, Publish!, Reseller, lDG Sources; AUSTRIA'S Computerwelt Oesterreich, PC Test; BELGIUM'S Data News (CW); BOLIVIA'S Computerworld; BRAZIL'S Computerworld, Connections, Game Power, Mundo Unix, PC World, Publish, Super Game; BULGARIA'S Computerworld Bulgaria, PC & Mac World Bulgaria, Network World Bulgaria; CANADA'S CIO Canada, Computel'WOrld Canada, lnfoCanada, Network World Canada, Reseller; CHILE'S Computerworld Chile, Informatica; COLOMBIA'S Computerworld Colombia, PC World; COSTA RICA'S PC World; CZECH REPUBLIC'S Computerworld, Elektronika, PC World; DENMARK'S Communications World, Computerworld Danmark, Computerworld Focus, Macintosh Produktkatalog, Macworld Danmark, PC World Danmark, PC Produktguide, Tech World, Windows World; ECUADOR'S PC World Ecuador; EGYPT'S Computerworld (CW) Middle East, PC World Middle East; FINLAND'S MikroPC, Tietoviikko, Tietoverkko; FRANCE'S Distributique, GOLDEN MAC, lnfoPC, Le Guide du Monde lnformatique, Le Monde lnfonnatique, Telecoms & Reseaux; GERMANY'S Computerwoche, Computerwoche Focus, Computerwoche Extra, Electronic Enter- tainment, Gamepro, Information Management, Macwelt, Netzwelt, PC Welt, Publish, Publish; GREECE'S Publish & Macworld; HONG KONG'S Computerworld Hong Kong, PC World Hong Kong; HUNGARY'S Computerworld SZT, PC World; INDIA'S Computers&: Communications; INDONESIA'S Info Komputer; IRELAND'S ComputerScope; ISRAEL'S Beyond Windows, Computerworld Israel, Multimedia, PC World lsrael; ITALY'S Computerworld Italia, Lotus Magazine, Macworld Italia, Net- working Italia, PC Shopping Italy, PC World Italia; JAPAN'S Computerworld Today, Information Systems World, Macworldjapan, Nikkei Personal Computing, SunWorld japan, Windows World; KENYA'S East African Computer News; KOREA'S Computerworld Korea, Macworld Korea, PC World Korea; LATIN AMERICA'S GarnePro; MALAYSIA'S Computerworld Malaysia, PC World Malaysia; MEXICO'S Compu Edicion, Compu Manufactura, Computacion/Pumo de Vema, Computerworld Mexico, MacWorld, Mundo Unix, PC World, Windows; THE NETHERLANDS' Computer! Totaal, Computable (CW), LAN Magazine, Lotus Magazine, MacWorld; NEW ZEALAND'S Computer Buyer, Cornputerworld New Zealand, Network World, New Zealand PC World; NIGERIA'S PC World Africa; NORWAY'S Computerworld Norge, Lotusworld Norge, Macworld Norge, Maxi Data, Networld, PC World Ekspress, PC World Nettverk, PC World Norge, PC World's Produktguide, Publish& Multi- media World, Student Data, Unix World, Windowsworld; PAKISTAN'S PC World Pakistan; PANAMA'S PC World Panama; PERU'S Computerworld Peru, PC World; PEOPLE'S REPUBLIC OF CHINA'S China Computerworld, China Infoworld, China PC Info Magazine, Computer Fan, PC World China, Electronics International, Elec- tronics Today/Multimedia World, Electronic Product World, China Network World, Software World Magazine, Telecom Product World; PHILIPPINES' Computerworld Philippines, PC Digest (PCW); POLAND'S Computerworld Poland, Computerworld Special Report, Networld, PC Wor1d/Komputer, Sunworld; PORTUGAL'S Cerebro/PC World, Correio lnfonnatico/Computerworld, Macln; ROMANIA'S Computerworld, PC World, Telecom Romania; RUSSIA'S Computerworld-Moscow, Mir· PK (PCW), Sety (Networks); SINGAPORE'S Computerworld Southeast Asia, PC World Singapore; SLOVENIA'S Monitor Magazine; SOUTH AFRICA'S Computer Mail (CIO),Computing S.A.,Network World S.A., Software World; SPAIN'S Advanced Systems, Amiga World, Computerworld Espana, Communicaciones World, Macworld Espana, NeXTWORLD, Super juegos Magazine (GamePro), PC World Espana, Publish; SWEDEN'S Attack, ComputerSweden, Corporate Computing, Macwor1d, Mikroda- tom, Natverk & Kommunikation, PC World, CAP & Design, Datalngenjoren, Maxi Data,Windows World; SWITZERLAND'S Computerworld Schweiz, Macworld Schweiz, PC Tip; TAIWAN'S Computerworld Taiwan, PC World Taiwan; THAILAND'S Thai Computetworld; TURKEY'S Computerworld Monitor, Macworld Turkiye, PC World Turkiye; UKRAINE'S Computerworld, Computers+Software Magazine; UNITED KINGDOM'S Computing /Computerworld, Connexion/Network World, Lotus Magazine, Macworld, Open Computing/Sunworld; UNITED STATES' Advanced Systems, AmigaWorld, Cable in the Classroom, CD Review, CIO, Computerworld, Computerworld Client/Server journal, Digital Video, DOS World, Electronic Entertainment Magazine (E2), Federal Computer Week, Game Hits, GamePro, IDG Books, lnfoworld, Laser Event, Macworld, Maximize, Muhimedia World, Network World, PC Lener, PC World, Publish, SWATPro, Video Event; URUGUAY'S PC World Uruguay; VENEZUELA'S Computerworld Venezuela, PC World; VIETNAM'S PC World Vietnam.
Reading notes: Possible OCR splitting in the publication list, e.g. 'PC Wor1d/Komputer' and 'Publish& Multimedia' spacing Garbled characters such as 'rJ~' and 'lnfoworld' may be OCR artifacts Possible reading-order mixing between the two text blocks
- Printed dates
- 1990 · 25 years · 90s
- Languages
- English
PDF page 6
FOR MORE INFORMATION For general information on IDG Books in the U.S., including information on discounts and premiums, contact IDG Books at 800-434-3422. For information on where to purchase IDG's books outside the U.S., contact Christina Turner at 415-655-3022. For information on translations, contact Marc Jeffrey Mikulich, Foreign Rights Manager, at IDG Books Worldwide; fax number: 415-655-3295. For sales inquires and special prices for bulk quantities, contact Tony Real at 800-434-3422 or 415-655-3048. For information on using IDG's books in the classroom and ordering examination copies, contact Jim Kelly at 800-434-2086. PowerPC Programming for Intel Programmers is distributed in Canada by Macmillan of Canada, a Division of Canada Publishing Corporation; by Com- puter and Technical Books in Miami, Florida, for South America and the Caribbean; by Longman Singapore in Singapore, Malaysia, Thailand, and Korea; by Toppan Co. Ltd. in Japan; by Asia Computerworld in Hong Kong; by Woodslane Pty. Ltd. in Australia and New Zealand; and by Transword Pub- lishers Ltd. in the U.K. and Europe.
- Printed product names
- PowerPC Programming for Intel Programmers
- Languages
- English
PDF page 7
ABOUT THE AUTHOR Kip McClanahan has been writing low-level code for PCs for over a decade. Before joining Motorola, Kip wrote x86 assembly language device drivers for various operating systems including DOS, NetWare, Windows, and UNIX. Shortly after the PowerPC 601 microprocessor reached first silicon, Kip joined Motorola to work on the development of the Motorola Computer Group's PowerPC-based personal computer systems. During the initial PowerPC development efforts at Motorola, Kip realized that the transition from x86 assembly language to PowerPC assembly language could be facilitated with a little correlation between the two architectures. This book is the result of that realization. Kip currently spends his time writing code for Motorola's RISC Software Group. This RISC software team's responsibilities include developing Motoro- la's PowerPC firmware and extensive PowerPC software development tools as well as porting Microsoft's Windows NT operating system to the PowerPC architecture. When he's not working, Kip enjoys mountain biking, hiking, cooking, and brewing his own beer in the undeniably awesome town of Austin, Texas. Kip McClanahan can be reached on the Internet via email at: kip@io.com There is a World-Wide-Web site set up for book-related information and PowerPC programming information at: http://www.io.com/user/kip/PPCPROG.HTML There is also an Internet mailing list for PowerPC programming-related dis- cussions. To subscribe, send an email message with the word "SUBSCRIBE" as the only body text to the following address: powerpc-pro-request@io.com
- Printed product names
- PowerPC · PowerPC 601 · PowerPC firmware · Windows NT
- Languages
- English
PDF page 8
CREDITS Vice President and Publisher Chris Williams Publishing Director Amorette Pedersen Editorial Director Anne Marie Walker Manuscript Editor Robert L. Hummel Technical Editor Robert L. Hummel Project Editor Denise Peters illustrator Peter Woodbury Director of Production Beth A. Roberts Composition Benchmark Productions Proofreader George Samiljan Indexer Liz Cunningham Cover Design TonBo Designs
- Languages
- English
PDF page 9
DEDICATION For my parents: Dick and Gloria McClanahan. As far as light reaches, it will never fall on two more supportive and caring people.
- Languages
- English
PDF page 10
ACKNOWLEDGMENTS First and foremost, vast thanks to Jill, my honey, who put up with the demands on my time, late nights, bad moods, repeated requests for, "Will you type this in?" and still managed to be supportive throughout. Thank you. Second and still foremost, let it be known that Rob Hummel is more pow- erful than a locomotive and able to leap tall buildings in a single bound. Con- stantly offering great suggestions and astute observations, Rob was fundamen- tal to this effort. If I gain nothing else from this experience, I've gained a friend and peer. Thanks also to the dedicated and professional team at IDG: Trudy Neuhaus, Kate Tolini, Denise Peters, and Amy Pedersen. To say that "It would not have been possible without ... " would be an understatement. Thanks to Carol and Belinda at Waterside Productions; Julie Meyer at Cun- ningham Communications, a fantastic resource, and thanks to Ian Suhrstedt for work on the World Wide Web page for PowerPC Programming for Intel Programmers. There have been dozens of people at Motorola who have also made this a better book. In particular, I'd like to thank the following people for the follow- ing things: Jerry Young, who did a terrific job of editing, reviewing, and provid- ing the Motorola perspective on many topics; John Southard for his superb technical review and insight (and always willing to listen to my fatigue-induced ranting and raving); Matt Holle for his technical review and hackery; Kumar Ranganathan for his technical review; and Dean Mosley, the man with the all the answers. Also thanks to Keith Diefendorf£, Doug McQuaid, Ray Essick, Mike Phillip, and Clara Serrano for their technical input and review as well as Ilona Rossman, Glenn Stephens, David Zack, Nelda Currah, Madeline Brock, Bruce Pape, and Robert Yuan. And finally, thanks to the Gang: Jon, Heidi, Kenny, Martin; Lee Deshler at IBM Corp. and Deni Connor (who got the ball rolling); as well as the Austin- Based BlackHawk Design Team: Doug, Lan, CW, Gary, C.Bala, Mike, Amy, Richard, Paul, Jayathi, and the rest! And thanks to John and Amelia Amershek as well as Don and Rita Anselmo.
Reading notes: Possible OCR artifact 'Keith Diefendorf£' may contain a stray character.
- Printed product names
- PowerPC Programming for Intel Programmers
- Languages
- English
PDF page 11
CONTENTS INTRODUCTION •••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••• 1 Motivating Progress .................................................................................................... 1 Seeking Information ................................................................................................ 2 Something for Everyone .......................................................................................... 2 Architecture vs. Implementation .............................................................................. 3 Conventions .................................... ................ ....................................... ..................... 5 The Tangle of Terminology .................................................................................... 5 Bits, Bytes, and Words .............. .............................................................................. 6 Register and Bit Field Conventions .......................................................................... 6 Number Systems ...................................................................................................... 7 Operand Order ........................................................................................................ 7 Ready to Roll .......................................................................................................... 7 CHAPTER ONE - THE POWERPC TRANSITION •••••••••••••••••••••••••••••••••••••••••• 9 New Name, Same Game ............................................................................................ 9 Searching for Similarities .............................. ........................................................ 10 Preserving Order .................................................................................................... 10 Defining RISC Architecture .................................................................................. 11 Common Programming Operations .............. ........................................................ 13 Making the Transition .......................................................................................... 23 Popular MPU Comparison .................................................................................... 24 Architecture Awaits .............................................................................................. 25 CHAPTER Two - FOUNDATIONS AND ARCHITECTURE •••••••••••••••••••••••••••••••• 29 The Intel i486 ............................................................................................................ 30 Cache Unit ............................................................................................................ 30 Floating-Point Unit ...................................... ........................................................ 32 Integer (Fixed-Point) Unit .................................................................................... 32 Segmentation and Paging Units ...................... ........................................................ 32 Meet The Power PC Architecture ....................... ....................................................... 34 Architecture, Implementation, and Scope .............................................................. 35 The PowerPC 601 ..... .. ............................................................................................. 37 PowerPC Blocks, Bits, and Buses .......................................................................... 37 The Instruction Unit .............................................................................................. 39 The Integer Unit .............................................................................. .................... 44 Floating-Point Unit ..................................... .. ....................................................... 44 Memory Management Unit .................................................................................. 45 The Cache Unit ................................................................. ..................................... 46 Memory Unit and System Interface Unit ............................................................... .46 The Power PC 603 .................................................................................................... 4 7 The Instruction Unit .............................................................................................. 4 7
Reading notes: Table of contents page numbers contain irregular spacing from OCR, e.g. 'Conventions .................................... ................' Chapter heading formatting 'CHAPTER Two' has inconsistent capitalization
- Printed product names
- PowerPC 601 · Intel i486
- Languages
- English