68000, 68010 and 68020 Primer
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
SAMS The Waite Group 68000, 68010, 68020 Primer Stan Kelly-Bootle • Bob Fowler MOTOROLA Series in Solid-State Electronics (1011) 002/ 01 DR CA 92126
A purple book cover with a green-framed illustration of a chip with gold pins and a circular window, surrounded by numbered lines, plus SAMS and Motorola logos.
Reading notes: Top-right label with stamped or handwritten text is partly obscured and only partly legible, including '(1011) 002/ 01', 'DR' and 'CA 92126'. Numbers in the illustration (2, 3, 6, 9, 10, 11, 12) are diagram labels and were not transcribed. Reading order of the partially obscured top-right label is uncertain.
- Printed product names
- 68000 · 68010 · 68020
- Languages
- English
PDF page 1
SAMS The Waite Group 68000, 68010, 68020 Primer Stan Kelly-Bootle • Bob Fowler MOTOROLA Series in Solid-State Electronics
Book cover with dark purple background, a green-bordered illustration of a purple microchip with gold pins and a gold-topped center, surrounded by numbered pin-trace lines, plus the SAMS and Motorola logos.
Reading notes: Partial library or shipping label at top right reads '(1011) 002/ 01', 'DR', 'CA 92126' and is partly obscured by a dark smudge; not transcribed as part of the title copy. Numbers 2 through 12 printed on the illustration's pin diagram are not transcribed as copy.
- Printed product names
- 68000 · 68010 · 68020
- Languages
- English
PDF page 2
68000, 68010 and 68020 Primer
68000, 68010 and 68020 Primer Stan Ke/ ly-Bootle and Bob Fowler Howard W. Sams & Co., Inc. A Subsidiary of Macmillan, Inc. 4300 West 62nd Street, Indianapolis, Indiana 46268 U.S.A.
Reading notes: Transcript intentionally left empty because the exact extracted text is preserved separately; other fields were filled from the supplied copy only. Layout and artwork were not visually verified, so the visual description relies on the supplied text alone. Author name appears as 'Stan Ke/ ly-Bootle', with a stray slash and space that may be a line-break artifact; not corrected. Irregular spacing appears throughout the supplied copy, and reading order of the title and author lines is inferred from the extraction. No prices or dates are present in the supplied copy.
- Printed product names
- 68000, 68010 and 68020 Primer
- Languages
- English
PDF page 3
© 1985 by The Waite Group, Inc. FIRSTEDffiON SECOND PRINTING-1987 All rights reserved. No part of this book shall be reproduced, stored in a retrieval system, or transmitted by any means, electronic, mechanical, photocopying, recording, or otherwise, without written permission from the publisher. No patent liability is assumed with respect to the use of the information contained herein. While every precaution has been taken in the preparation of this book, the publisher assumes no responsibility for errors or omissions. Neither is any liability assumed for damages resulting from the use of the information contained herein. The Waite Group has made every attempt to supply trademark information about company names, products, and services mentioned in this book. The trademarks indicated below were derived from various sources. The Waite Group cannot attest to the accuracy of this information. 8080, 8088/8086 and Intel are trademarks of Intel Corporation. AM-100 is a registered trademark of Alpha Microsystems, Inc. Apple is a trademark of Apple Computer, Inc. EXORciser, EXORmacs, EXORset, VERSAmodules, and VMEmodules are registered trademarks of Motorola, Inc. IBM and IBM PC are trademarks of International Business Machines, Inc. Lotus, 1-2-3, and Symphony are trademarks of Lotus Development Corporation. Macintosh is a trademark licensed to Apple Computer, Inc. MBASIC is a registered trademark of Microsoft Corporation. Radio Shack is a registered trademark of Radio Shack. WordStar is a registered trademark of MicroPro International Corporation. Z80 is a registered trademark of Zilog, Inc. International Standard Book Number: 067-22405-4 Library of Congress Catalog Card Number: 85-61636 Typography by Walker Graphics Printed in the United States of America
Reading notes: Headline not clearly identifiable in supplied copy; the copyright and printing lines were treated as front matter and no primary heading was assigned.
- Printed product names
- 8080 · 8088/8086 · AM-100 · EXORciser · EXORmacs · EXORset · VERSAmodules · VMEmodules · IBM PC · Lotus · 1-2-3 · Symphony · Macintosh · MBASIC · Radio Shack · WordStar · Z80
- Printed dates
- 1985 · 1987
- Languages
- English
PDF page 4
To my childers everywhere: Edmund Paul, Michele Rose, Carol Ann, David Russell and rather late, alas, Anna Clare -Stan Kelly-Bootle To Guruprem Singh Khalsa, whose encouragement, inspiration, and vision over the years have helped to prepare me for this task -8.F.
Reading notes: Dedication page text; no primary heading or product copy present
- Languages
- English
PDF page 5
Acknowledgments We were tempted for a while to break with tradition, and claim that this book was entirely our own work, conceived, written and produced with no outside help whatsoever! Honesty and chivalry, though, combined with threats from certain quarters, finally convinced us that we should pay our respects in the customary manner. First, we must thank Motorola's MOS Integrated Circuit Group without whom (as they say) our primer would undoubtedly be devoted to a less inter- esting and rewarding family of chips. In particular, we are grateful to James J. Farrell III, Technical Communications Manager, and Margaret Dickie at Motorola Inc., Austin, Texas for their courteous help with permissions, pictures and diagrams. Our debt to writers on the M68000 and 16/32 bit micros in general is enormous and must here be condensed to a simple, nonexhaustive enumeration: Stritter, Treddenick, Scanlon, Starnes, Kane, Hawkins, Leventhal, Alexandridis, Waite, Morgan. Editorially, we received encouragement from James Rounds of Howard W. Sams & Co., helpful advice from Dr. Roger C. Gledhill of International Micro Technologies, Inc., and much-needed cajolery from Mitch Waite and Jerry Volpe of The Waite Group. On the production side, we would like to thank Lynella Cordell and her staff at The Waite Group, who together with Marla Rabinowitz and Walter Lynam resolved the many typographical and stylistic problems created by our keystrokes. Our program examples were derived from work on the Alpha Microsystems Am-100/L TM using their M68 Assembler. The authors wish to thank Alpha Microsystems and the San Francisco Chapter of AMUS (Alphamicro Users' Society) for their technical assistance. We also benefited from many informal discussions with Dr. Michael Godfrey of ICL, London and Bob Toxen of Stratus Computer, Inc., Boston. Nevertheless, we accept full responsibility for any resid- ual bugs and welcome your polite corrections. Stan Kelly-Bootle proclaims his everlasting devotion to his wife Iwonka and step-daughter Natasha Leof for their love and support throughout the project. iv
Reading notes: Source is a book acknowledgments page with no advertised products, prices, or dates; productNames lists technical terms as printed rather than advertised items.
- Printed product names
- Am-100/L · M68 Assembler · M68000
- Languages
- English
PDF page 6
Contents Introduction viii 1 Basic Microprocessor Concepts 1 Microprocessors 1 Binary Arithmetic 6 BCD - Binary Coded Decimal 10 Octal and Hexadecimal 13 Boolean Algebra 14 Microcomputers - the Three Components 20 Inside the MPU 25 Memories Are Made of This 29 Software - General Overview 36 2 The M68000 Family 40 Introduction 40 The M68000 Success Story 44 Timing 46 Why 16-Bit? 49 3 M68000 Program·mer's Models 55 Levels of Programming 55 M68000 Instruction Set - Brief Introduction 61 Memory Model 62 Register Model 68 M68000 Basic Register Model 71 v
Reading notes: Source appears to be a table of contents; headline taken from the first printed heading.
- Languages
- English
PDF page 7
vi Contents Register Arithmetic 79 Address Registers 83 System Byte 84 4 M68000 Instruction Set - First Steps Instructions 91 Addressing Modes 106 Absolute Addressing Modes 116 Address Register Indirect Memory Addressing Mode Address Register Indirect with Post-Increment: (An)+ Address Register Indirect with Pre-Decrement: -(An) 124 128 133 91 5 M68000 Instruction Set - Advanced Topics 135 Preserving Register Values - Why and How 135 Stacks 138 Address Register Indirect with Offset 147 Address Register Indirect with Offset and Index 149 Index Mode - Applications 150 Multiplication 151 Division 153 Relative Modes - Motivation 158 Relative Addressing - Program Counter Addressing with Offset 159 Relative Addressing - Program Counter with Offset and Index 163 Addressing Modes - Grand Summary 165 6 Miscellaneous M68000 Instructions 172 Bit Manipulation 172 Logical Operations 173 Shift and Rotate Instructions 187 Rotates 200 Bit Testing and Setting 204 Compare with the CMP Family of Instructions 214 Miscellaneous Math 222 Multi-Precision Math 225 Binary Coded Decimal 229 Miscellaneous Data Handling 233 Link/Unlk - Preamble 237
- Languages
- English
PDF page 8
Contents vii 7 The MC68010 252 Virtual Memory 253 Virtual Machine 256 Vector Base Register 258 The MOVEC and MOVES Instructions 261 The SFC and DFC Registers and Address Spaces 262 Loop Mode 264 The MC68012 265 8 The MC68020 266 Instruction Cache 266 New Addressing Modes 274 Trace Bits TO and Tl 278 Coprocessor Support 280 The Master Bit 285 New Instructions on the MC68020 288 A M68000 Instructions - Number of Operands 295 B M68000 Addressing Mode Types 297 C M68000 Instructions/Legal Modes 300 D M68000 Instruction Summary 303 68000 Addressing Modes 303 Addressing Mode Orthogonality and Legality 307 The 68000 Instruction Summary Table - Preliminaries 310 E M68000 Resources 329 F ASCII Table 345 Index 349
Reading notes: Source is a table of contents; no advertised products, prices, or dates are present. Heading spacing in extracted text is irregular.
- Languages
- English
PDF page 9
Introduction This primer is intended for the growing number of programmers and hobbyists, both novice and experienced, who want to understand the powerful instruction set of the Motorola M68000 family of 16/32-bit microprocessors. The instruction set represents the language built into the chip, and ultimately, all programs written for the M68000, whether in ADA, BASIC, C language, assembly lan- guage, or whatever, need to be translated "down" to this level. With 8-bit micros it was tricky but possible to hand code at the machine level without assemblers. With 16-bit instruction words (up to seven of them per instruction) hand coding is strictly for masochists too tight to buy an assembler. So the M68000 instruction set will usually be studied in the context of an assembler. The authors' attempts to master M68000 assemblers revealed a monstrous, horrifying gap in the literature. There was no patient elementary introduction even to those basic instructions and addressing modes that are common to all M68000 models. More understandably, there were no popular expositions of the exciting extensions available on the MC68010 virtual machine chip and the full-32-bit mainframe-micro MC68020. This primer is our selfless attempt to fill both gaps. You can view the book as a painless "first pass" for all those who wish to gain fluency in any of the many fine M68000 assemblers and cross-assemblers now available (see Appendix E). Assembly language documentation can be pretty daunting unless you already understand how the op codes work, and many of the manuals are less than clear on which addressing modes are legal with which instruction. Beyond that you face the hurdles of directives, macros, conditionals, libraries, linkers, overlays, monitor calls, and so on - all of which can vary from assembler to assembler. Yet the rewards are great. Quite apart from the obvious advantages - speed and compactness (notice how often advertisements for software boast, viii
Reading notes: Source text begins mid-document with an Introduction section; the primary heading is not present in the supplied copy. The text ends mid-sentence at a page break.
- Printed product names
- Motorola M68000 · MC68010 · MC68020
- Languages
- English
PDF page 10
Introduction ix "Written in tight, fast assembly language!"), we know of no greater joy in computing than successfully running one's own first sizeable chunk of assembled code. There is a feeling of, "Wow, we did it - the 68000 and me!" Our book should also be useful for those wanting to experiment with the various M68000 educational single board kits and systems. We have purposely avoided a detaile(i exploration of the M68000 micro- electronics and IC technology. Our bird's eye view of the M68000 hardware is a simple "black-box" approach, but sufficient, we hope, to reveal the subtle interplay of hardware and software as realized by the Motorola design team. If you want to delve deeper (and in the field of computers there is no bottom layer beyond possible delving) this book will help you tackle the vast technical liter- ature on M68000 architecture and timing, support chips, 1/0, coprocessors and systems integration. Success breeds success - a maxim which is compounded in the micro- computer industry. All semiconductor prices fall dramatically as fabrication vol- ume and yield increase, so successful chips like the M68000, especially the economy MC68008 version, are inevitably finding their way into the low-cost entry-level personal and home computer market. The basic MC68000, now available for around $50 each in small quantities, can already be found playing diverse roles in graphics workstations and multiuser business systems - not only on the main CPU (central processing unit) board, but also powering intelligent device drivers and 1/0 (input/output) preprocessors. Even the more expensive MC68010 is found lurking inside peripherals, such as the Apple laser printer. The MC68020 chip, currently selling for $500 in small quantities, seems certain to fall in price to the MC68000 level over the next few years. The impact on personal and office computing will be staggering! The Apple Macintosh has already given us a glimpse of what can be done with the power of a basic 16/32-bit MC68000. The user-friendliness we associate with crisp, bit-mapped screens, icons, windows, and mouse-controlled pulldown menus puts heavy demands on CPU and memory. The MC68020's extra speed (16.67 MHz, with fast RAM to match), lower power consumption (1.5 watts), built-in coprocessor interface for economical multiprocessing and number-crunching support, and increased memory ad- dressing space (over 4 billion bytes) -will allow bigger and friendlier operating systems, more complex color graphics (including animation), and less unnatural high-level query languages providing easier access to large databases. An added bonus will be the ability to offer several operating systems on the same machine, solving many of the present compatibility quirks (''what runs on what?") and ending once and for all those tiresome medieval disputes such as "UNIX versus AMOS" or "CP/M versus PC-DOS." Our book will prepare you for this revolution!
Reading notes: OCR-style spacing and hyphenation artifacts such as 'detaile(i' and 'M68000 micro-'. Possible OCR error in 'Introduction ix' and quoted phrase 'Written in tight, fast assembly language!').'
- Printed product names
- Apple Macintosh · Apple laser printer · M68000 · MC68000 · MC68008 · MC68010 · MC68020 · UNIX · AMOS · CP/M · PC-DOS
- Printed prices
- $50 · $500
- Languages
- English
PDF page 11
x Introduction All members of the M68000 family share the same basic instruction set, with each enhanced model building up from the previous simpler model. This concept of upwards compatibility at the object code level provides vital insur- ance for all software developers, both the individual "hacker" and the major software houses. For as fast as hardware prices shrink, the cost of programming escalates. The M68000 was designed with ease of programming and debugging in mind, and further, with the assurance that whatever advances might occur in IC techniques, programs will run without change on all future models. We will all undoubtedly have new things to learn as the revolution unrolls apace, but readers should be happy to know that little in this book will have to be unlearned. PREREQUISITES Exactly how much prior knowledge should be assumed is a problem faced by all computer book authors. We have veered in the direction of assuming less rather than more exposure to computer basics, and we rely on your own judgment to skip any familiar material. Chapter 1, for example, is a quick summary of some essential micropro- cessor concepts that you are invited to bypass at your own discretion. Our strategy was conditioned by the fact that a new generation of program- mers, the class of '85, is entering the field with little or no prior exposure to the previous (dying?) generation of 8-bit micros. If you have done any assembly language programming on the Intel TM 8080 TM, Zilog 280 TM or Motorola M6800, for instance, many of the M68000 op codes will be old friends (at least func- tionally), and you will be able to concentrate on the subtleties introduced by the richer set of addressing modes. But for those new to the world of op codes, we have tried to explain both the function and the motivation for each instruction, with lots of simple examples. We have carefully chosen the order in which the instructions are introduced, grouping together those which share some funda- mental property. There are four appendices (A - D) that list the op codes and addressing modes in different ways, plus a pullout reference card. BOOK PLAN After the optional basic concepts in Chapter 1 (we dismissed the corny notion of calling this Chapter 0), Chapter 2 gives some historical and design perspec- tives and lists the features distinguishing the five M68000 models currently available. Chapter 3 explains the chip from a software perspective (memory organization and register disposition). The instructions and addressing modes
Reading notes: Source appears to be an excerpt from an introduction or preface; no primary headline is printed Trademark symbols (TM) rendered inline around some product names
- Printed product names
- M68000 · Zilog 280 · Motorola M6800
- Printed dates
- '85
- Languages
- English