# Programming the 68000 — source transcripts, page 1

[Canonical transcript page](https://www.vintageapple.net/transcripts/media/va-programming-the-68000-1986-5238cc/1)

## Transcribed source material

Machine transcriptions and image descriptions; uncertain copy may be marked [illegible]. Verify against the linked originals. Historical rights remain with the original owners.

These are transcribed excerpts, not the full publications. Open the originals for remaining pages.

### Image 1

[Cite this scan](https://www.vintageapple.net/transcripts/media/va-programming-the-68000-1986-5238cc/1#scan-541b05bb35e8fc0b6ce5f8ef4a446768c44d1dee21cbf6508b3c7305311434c4)

Transcribed text:

HAYDEN Macintosh Library

Programming the 68000
Macintosh Assembly Language

$24.95

Edwin Rosenzweig & Harland Harrison

Image description: A surreal close-up of a stylized eye with an orange-red eyelid, in which a beige Macintosh computer with keyboard and mouse appears against a blue sky with clouds, set on a dark blue-to-green gradient background with a cyan wavy line.

Reading notes: The price sticker '$24.95' is partially obscured and slightly skewed; the trailing characters on the sticker are small and may be a currency or code mark rather than part of the price. The 'HAYDEN' and 'Macintosh Library' top banner text is stylized script and was read as 'Macintosh Library'. Author names on the bottom are in a spaced-out light typeface overlapping a worn area and may have minor letter uncertainty.

Printed prices: $24.95

Languages: English

[Original Image 1](https://www.vintageapple.net/files/324d68c899bf865790d14ee84283cd44b845ad80d82917d49ab6bc7aabc008f7/a29bbceaf2e69411eb059523.webp)

### PDF page 1

[Cite this scan](https://www.vintageapple.net/transcripts/media/va-programming-the-68000-1986-5238cc/1#scan-b0c6b3187ba44e03e28aac7cc96e082a886689092190dfc6faa91c2481d4c07b)

Transcribed text:

HAYDEN Macintosh Library

Programming the 68000

Macintosh Assembly Language

$24.95 EA

Edwin Rosenzweig & Harland Harrison

Image description: A book cover with a dark blue-to-green gradient background, an orange-bordered central image of a stylized eye with a beige Macintosh computer, keyboard and mouse visible in the iris against a blue sky, and cyan wavy lines on either side.

Reading notes: The price sticker '$24.95 EA' is partially obscured by a white label and its characters are slightly worn; the reading is best-effort. The series name 'Macintosh Library' in the top banner is in script and was read as 'Macintosh Library'.

Printed product names: Programming the 68000

Printed prices: $24.95 EA

Languages: English

[Original PDF page 1](https://www.vintageapple.net/files/476952bb716d844e2b5058be822e2fd6a77fa2f28379a072546a5c20b71ae4bb/Programming_the_68000_1986.pdf#page=1)

### PDF page 2

[Cite this scan](https://www.vintageapple.net/transcripts/media/va-programming-the-68000-1986-5238cc/1#scan-9b29a3b10246dd2f57c92568be6cb65e69146b31945cac11eb86a7f216c6b6a1)

Image description: The image is an entirely blank white page with no visible artwork, layout elements, or text.

[Original PDF page 2](https://www.vintageapple.net/files/476952bb716d844e2b5058be822e2fd6a77fa2f28379a072546a5c20b71ae4bb/Programming_the_68000_1986.pdf#page=2)

### PDF page 3

[Cite this scan](https://www.vintageapple.net/transcripts/media/va-programming-the-68000-1986-5238cc/1#scan-1fdcae7c83f46c07e6beb5b596851f133ece7b7897289a1a65683d41a305a9bd)

Transcribed text:

Programming
the68000
Macintosh™   Assembly   Language
Edwin   Rosenzweig
and Harland Harrison
[[]
Hayden Book   Company
A   DIVISION   OF   HAYDEN   PUBLISHING   COMPANY,   INC.
HASBROUCK   HEIGHTS,   NEW   JERSEY

Reading notes: Garbled character sequence '[[]' between author line and publisher block Publisher name and location partially unclear in reading order

Languages: English

[Original PDF page 3](https://www.vintageapple.net/files/476952bb716d844e2b5058be822e2fd6a77fa2f28379a072546a5c20b71ae4bb/Programming_the_68000_1986.pdf#page=3)

### PDF page 4

[Cite this scan](https://www.vintageapple.net/transcripts/media/va-programming-the-68000-1986-5238cc/1#scan-a80fb30abb2a954fb015885177623af7e03d9d8b371e38259c4006b9cfba9c33)

Transcribed text:

Acquisitions Editor:   B1LL   GROUT
Production Editor: RoNNIE GROFF
Cover design: JIM BERNARD
Cover photo: Lou ODoR/GEoRGE   BAQUERO
Composition: ELIZABETH   l'YPESE'JTING   COMPANY
Printed and bound by: COMMAND WEB   OFFSET,   INC.
Library   of   Congress   Cataloging-in-Publication Data
Rosenzweig, EJ. (Edwin J.)
Programming the   68000.
Includes   index.
1.   Motorola   68000   (Microprocessor)-Programming. 2. Assembler language
(Computer program language)   I.   Hamson,   Harland. II. Title.
QA76.8.M6895R67 1986   005.265   86-3085
ISBN   0·8104-6310·5
Quik Circuit is a trademark of Bishop Graphics,   Inc.,   Westlake Village, CA.
People in Places is a trademark of Data and Information Software Company.
Inc.   San   Francisco, CA.
PCMacBASIC is a trademark of Pterodactyl Software,   Fairfax,   CA.
Copyright   © 1986 by Hayden Book Company.   All   rights   reserved. No part of
this book may be reprinted, or reproduced, or utilized in any form or by any   elec-
tronic, mechanical, or other means, now known or hereafter invented, including
photocopying and recording, or in any information storage and retrieval system,
without permission in writing from the Publisher, with the exception that programs
may be stored and retrieved electronically for personal use.
Printed in the   United   States   of America
1   2   3   4   5   6   7   8   9   Printing
86   87   88   89   90   91   92   93   94   Year

Reading notes: OCR-like spacing and character substitutions in the copyright and cataloging block (e.g., 'B1LL GROUT', 'Lou ODoR', 'GEoRGE BAQUERO', 'Hamson' for Harland Hamson, 'EJ.' for E.J.), so exact spelling of names may be unreliable. The printed year sequence '86 87 88 ... 94 Year' and 'QA76.8.M6895R67 1986' call-number fragment are not clearly advertised dates; included only as printed.

Printed product names: Quik Circuit · People in Places · PCMacBASIC

Printed dates: 1986 · 86-3085 · 86 · 87 · 88 · 89 · 90 · 91 · 92 · 93 · 94

Languages: English

[Original PDF page 4](https://www.vintageapple.net/files/476952bb716d844e2b5058be822e2fd6a77fa2f28379a072546a5c20b71ae4bb/Programming_the_68000_1986.pdf#page=4)

### PDF page 5

[Cite this scan](https://www.vintageapple.net/transcripts/media/va-programming-the-68000-1986-5238cc/1#scan-369c11ee305b678fb1dabc70465753a9da3b70b4f7c885fe25bd948494cdbf62)

Transcribed text:

Preface
This book assumes that you have some knowledge of programming. We
expect you to know how to code a simple BASIC or Pascal program.   If   you
know how to program in assembler, so much the better.
However, we also realize that you may never have programmed in
assembler before, don't know what a linker is, etc. Tupics such as binary
and hexadecimal are covered in appendices so the less advanced program-
mer can go there for additional knowledge about assembly language
programming.   If   you know another assembler language such as the   8080,
6502,   8088,   Z80,   or even   360/370,   then you will find this book that much
easier-you can skip most of the appendices.
There are two essential processes involved in reading this book.   One   is
the process of learning about   68000   assembly language. The other process
is learning your way around the Macintosh operating system-its   "guts"
which make all the graphics, menus, and windows possible. Assembler is
the gateway to the heart of the Macintosh.
If   you program in Pascal or BASIC and want to keep programming in
those languages, a knowledge of assembler is very useful-especially   m
debugging.   You   will find that certain routines have to be made fast and
compact-your knowledge of assembler will be invaluable then.
However, the main reason that any assembler language programmer
gives for wanting to program in assembler is the feeling of POWER.   You   can
actually get down into the insides of the machine and make it perform to
its maximum capability. With the sophistication of   68000   assembler and
the Macintosh   ROMs,   your coding won't be that much slower than coding
in a   higher-level   language and your debugging will probably be faster.
There is also a certain FUN in programming in assembler which you
don't get when programming in a   higher-level   language. We suppose it is

Reading notes: Line-break hyphenation and spacing irregularities in the excerpt (e.g., 'Tupics', 'm debugging') may affect reading accuracy

Printed product names: Macintosh · Pascal · BASIC · 68000 · 8080 · 6502 · 8088 · Z80 · 360/370

Languages: English

[Original PDF page 5](https://www.vintageapple.net/files/476952bb716d844e2b5058be822e2fd6a77fa2f28379a072546a5c20b71ae4bb/Programming_the_68000_1986.pdf#page=5)

### PDF page 6

[Cite this scan](https://www.vintageapple.net/transcripts/media/va-programming-the-68000-1986-5238cc/1#scan-a4bad5b1f16055332034e83e4caed10e4855dcb4d8c208ea3ddd844d28505fd4)

Transcribed text:

the same thrill a mechanic gets from tuning up a fine race car or any mad
tinkerer gets from a new invention.
We look forward to helping people learn to program in   68000   as-
sembler on the Macintosh without having to struggle as we did.   Of   course,   _
we didn't have this book to help us!
This book was written just the way Pterodactyl Software, the company
of which we are both part, is run. Ed Rosenzweig wrote the less technical
chapters while Harland Harrison wrote the more technical,   detailed
chapters and the sample program.
EDWIN RoSENZWEIG AND HARLAND   HARRISON
(Fairfax and Belmont, California)

Reading notes: Source contains irregular spacing and capitalization in the name 'RoSENZWEIG', preserved as printed.

Printed product names: 68000 · Macintosh · Pterodactyl Software

Languages: English

[Original PDF page 6](https://www.vintageapple.net/files/476952bb716d844e2b5058be822e2fd6a77fa2f28379a072546a5c20b71ae4bb/Programming_the_68000_1986.pdf#page=6)

### PDF page 7

[Cite this scan](https://www.vintageapple.net/transcripts/media/va-programming-the-68000-1986-5238cc/1#scan-97bdbeb1356e95a8715e016734b514daee6419532e7898b86378f98bcb346182)

Transcribed text:

Acknowledgments
w.   would like to thank the   following   people:
Mike McGrath, Bill Grout, and the people at Hayden-for   all   their help.
April Post-for helping with the illustrations.
Kirk Austin and Bruce Southwick-for proving, by reading the manu-
script and   immediately starting to write code,   that one could learn
Macintosh assembler and the   68000   through this book.
Reina Harrison-for patience and understanding.
Lori Sweet-for patience   'Yhile   an author struggled.

Reading notes: Garbled spacing in the opening line 'w.   would like to thank the' may indicate a missing name or initial.

Languages: English

[Original PDF page 7](https://www.vintageapple.net/files/476952bb716d844e2b5058be822e2fd6a77fa2f28379a072546a5c20b71ae4bb/Programming_the_68000_1986.pdf#page=7)

### PDF page 8

[Cite this scan](https://www.vintageapple.net/transcripts/media/va-programming-the-68000-1986-5238cc/1#scan-1cdf06b4d38f19a18f5539a060068d09a36e824949bbe8fd9b3132080d9cb234)

Transcribed text:

Organization
of   this Book
book is written so that people who want to learn assembly
language on the Macintosh computer can learn at their own pace.   If   you
know a higher level language such as Pascal,   BASIC,   or C but have never
programmed in assembler then you should read all the chapters in
sequence with detours to the appendices where appropriate.   If   you have
programmed in assembler before, you can skim the first chapter, skip the
appendix on binary and hexadecimal, and start your in-depth reading
with Chapter 2, The Addressing Modes of the   68000.   You   an also skim the
sections on assemblers and linkers in Chapter 6. The section on   68000
hardware is very interesting (it explains why all addresses must start on
even boundaries, for example) but it, too, can be skimmed.

Reading notes: Source text is a book organization passage with no visible headline, products, prices, or dates.

Languages: English

[Original PDF page 8](https://www.vintageapple.net/files/476952bb716d844e2b5058be822e2fd6a77fa2f28379a072546a5c20b71ae4bb/Programming_the_68000_1986.pdf#page=8)

### PDF page 9

[Cite this scan](https://www.vintageapple.net/transcripts/media/va-programming-the-68000-1986-5238cc/1#scan-6d1534ed3590ea5bb3d2e7c6cc83e9a682b869aacafab4aa5281b13c61e3b3b1)

Transcribed text:

Summary of the Chapters
The   first   chapter, Introduction to Assembly Language, shows how
assembly language relates to higher level languages, what a linker does,
how the Macintosh editor and assemblers work, what the format of an
assembler file is, what addresses are, and some information about the
registers and stack of the   68000.   This chapter gets you up to speed with the
tools and concepts necessary to start learning   68000   assembler. People not
previously exposed to assembly language may want to read Appendix A,
The Binary Numbering System, at this time.
The second chapter, The Addressing Modes of the   68000,   describes all
the various ways of finding where the data is located. When using the   68000
there are twelve different ways you can address data including modes as
powerful as Program Counter relative with index and displacement. This
chapter is one of the building blocks of the rest of the book; it must be
understood completely before continuing.
The third chapter, The   68000   Instruction   Set,   describes   every   68000   op
code (short for operation code) and related operands. The op codes are
arranged by frequency of use. As a reference, Appendix B contains timing
information and complete formats. Appendix B is an alphabetical listing.
Appendix   C contains effects on condition codes for each   68000
instruction.
The fourth chapter, Sample Programs, contains a series of simple
subprograms   so   that you   can   see   concrete   examples   of how   68000
assembler is put   t9gether   into workable programs. This chapter shows
how to compare   two   strings, how to optimize assembler, how to convert
from hexadecimal to decimal, how to write a key stroke handler, how to do
simple arithmetic operations.
The fifth chapter, Overview of the   68000   Hardware, describes how the
68000   looks to a programmer. Here such questions as why instructions

Reading notes: Line-break hyphenation and spacing in the source text may affect reading order (e.g., 't9gether' appears to be a damaged word).

Languages: English

[Original PDF page 9](https://www.vintageapple.net/files/476952bb716d844e2b5058be822e2fd6a77fa2f28379a072546a5c20b71ae4bb/Programming_the_68000_1986.pdf#page=9)

### PDF page 10

[Cite this scan](https://www.vintageapple.net/transcripts/media/va-programming-the-68000-1986-5238cc/1#scan-d5b8ded394ad91d3f25a82ee83d0b0b29040e5b8a0d3657efbe50b2c2c49a667)

Transcribed text:

must start on an even byte and what a bus line does are answered. This
information is helpful to the programmer who wants to better understand
the idiosyncrasies of the   68000   microprocessor.
The sixth chapter, Macintosh 'lbols, describes the assembler,   linker,
and resource compiler in detail. Here you   will   learn the steps   necessary   to
create working Macintosh programs once you have assembled a program.
The seventh chapter, The Mac Environment, describes how windows,
menus, and dialog boxes are handled, what events are,   Update   and Activate
events, resource files,   memory   and jump tables.
The eighth chapter, Macintosh ROM Calls, explains how Macintosh
ROM calls are made via traps. How to make a   ROM   call in assembler is
illustrated. Heaps and handles are discussed, sample QuickDraw ROM
calls are described.
The ninth chapter, SimpleCalc, has a complete sample program and
an explanation of its internals. SimpleCalc is a simple integer spreadsheet
program written in   MDS   assembler. Many of the procedures you will need
to program a Macintosh application are shown in this example.
The tenth chapter,   Some   Advanced Subroutines Not in SimpleCalc,
shows sample assembler code to make 'lbolBox calls for such functions as
using the   Memory   Manager, creating variable text in a dialog box, cursor
handling,   dragging   selections with the mouse,   changing   menu items,
printing, and using the SANE floating point package.

Reading notes: Chapter heading text contains OCR-like garbling ('Macintosh 'lbols', 'Mac Environment' spacing) and the 'lbolBox' term appears to be a corrupted 'ToolBox'.

Printed product names: Macintosh · SimpleCalc · SANE

Languages: English

[Original PDF page 10](https://www.vintageapple.net/files/476952bb716d844e2b5058be822e2fd6a77fa2f28379a072546a5c20b71ae4bb/Programming_the_68000_1986.pdf#page=10)

### PDF page 11

[Cite this scan](https://www.vintageapple.net/transcripts/media/va-programming-the-68000-1986-5238cc/1#scan-c6569cba722306fb750c2fa7d435d4656c0bc52f7071d40c0c8d60f97a025b4b)

Transcribed text:

Contents
Chapter 1   Introduction to Assembly   Language   1
Who   Will Find This Book Helpful   1
Assembler   Used   in This Book   1
Why   Should   You   Use   Assembly Language?   1
Relationship   oi   Higher Level Languages to Assembler   2
How to Program in   68000   on a Mac   7
The Editor   8
The Assembler   9
Getting Closer to the Hardware   12
Addresses   12
Internals   oi   the   68000   Microprocessor   13
Condition Code   R>rtion   oi   Status Register   19
Machine   Language   21
Chapter 2   'Ihe   Addressing   Modes   of   the   68000   23
Inherent Mode   23
1. Immediate Mode   25
2.   Data Register Direct Mode   26
3. Address Register Direct Mode   26
4. Absolute Short Mode   27
5.   Absolute Long Mode   29
6. Addressing Register Indirect Mode   30

Reading notes: Spacing within some words in the table of contents (e.g., 'Ihe', 'oi', 'R>rtion') appears damaged or OCR-garbled.

Languages: English

[Original PDF page 11](https://www.vintageapple.net/files/476952bb716d844e2b5058be822e2fd6a77fa2f28379a072546a5c20b71ae4bb/Programming_the_68000_1986.pdf#page=11)

[Next transcribed scans](https://www.vintageapple.net/transcripts/media/va-programming-the-68000-1986-5238cc/2.md)
