# Programming the 68000: Macintosh Assembly Language — source transcripts, page 1

[Canonical transcript page](https://www.vintageapple.net/transcripts/media/va-programming-the-68000-macintosh-assembly-language-1986-7854e7/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-macintosh-assembly-language-1986-7854e7/1#scan-171b8a77ea636b79664267dbdb56e57f52ab39861d697921dfb89f2459e69925)

Transcribed text:

HAYDEN Macintosh Library

Programming the 68000

Macintosh Assembly Language

Edwin Rosenzweig
& Harland Harrison

Image description: A book cover with a blue-to-green gradient background, an orange-bordered image of an eye whose iris reflection shows a beige Macintosh computer with keyboard and mouse against a cloudy sky, and a wavy cyan line crossing the cover.

Reading notes: The 'HAYDEN' and 'Macintosh Library' header text is stylized; 'Macintosh Library' is in a cursive script and was read as such. Author names are set in widely letter-spaced type and were transcribed as printed.

Languages: English

[Original Image 1](https://www.vintageapple.net/files/b91fa9c9ed3fa480b97d4e6cb0be2ccacb2cf2d91d1cb460047879f63df7eeeb/f053ec552b25266389487a0d.webp)

### PDF page 1

[Cite this scan](https://www.vintageapple.net/transcripts/media/va-programming-the-68000-macintosh-assembly-language-1986-7854e7/1#scan-0732ce25821183882f993bc8c79cf9d58335e2259f270df809a37d37e2a6efca)

Transcribed text:

HAYDEN Macintosh Library

Programming the 68000

Macintosh Assembly Language

Edwin Rosenzweig & Harland Harrison

Image description: A book cover with a blue-to-green gradient background, an orange top band, and a large close-up illustration of an eye whose iris shows a beige Macintosh computer with keyboard and mouse against a blue sky with clouds, with a cyan wavy line crossing the design.

Reading notes: Title and author names are clearly legible; the HAYDEN and Macintosh Library series text is stylized script and was transcribed as read. Faint rectangular translucent patches appear on the cover but do not obscure text.

Languages: English

[Original PDF page 1](https://www.vintageapple.net/files/5e20b14340b8c49d11efa2251db1cb99469ec6e467269ce55f15d73e88e026f1/Programming_the_68000_Macintosh_Assembly_Language_1986.pdf#page=1)

### PDF page 2

[Cite this scan](https://www.vintageapple.net/transcripts/media/va-programming-the-68000-macintosh-assembly-language-1986-7854e7/1#scan-66fc54800dc624ea35d3c4533890211a1b057c42bb79427fe45b2559626aa7ad)

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

[Original PDF page 2](https://www.vintageapple.net/files/5e20b14340b8c49d11efa2251db1cb99469ec6e467269ce55f15d73e88e026f1/Programming_the_68000_Macintosh_Assembly_Language_1986.pdf#page=2)

### PDF page 3

[Cite this scan](https://www.vintageapple.net/transcripts/media/va-programming-the-68000-macintosh-assembly-language-1986-7854e7/1#scan-9eeb1c2373399b844767ffd6d25c454ea891efb76360da1acac7868cbfc3662b)

Transcribed text:

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

Reading notes: Spacing in the title and author line is irregular, possibly from OCR A bracketed symbol '[JJ' appears near the author line and may be a damaged character

Languages: English

[Original PDF page 3](https://www.vintageapple.net/files/5e20b14340b8c49d11efa2251db1cb99469ec6e467269ce55f15d73e88e026f1/Programming_the_68000_Macintosh_Assembly_Language_1986.pdf#page=3)

### PDF page 4

[Cite this scan](https://www.vintageapple.net/transcripts/media/va-programming-the-68000-macintosh-assembly-language-1986-7854e7/1#scan-23b8c79ad624309fe4d472383c335575f5518992a2216ee5596720415a595f58)

Transcribed text:

Acquisitions Editor:   BILL   GROUT
Production Editor:   HoNNIE   GROFF
Cover design:   JJM   BERNARD
Cover photo:   Lou   OooRIGEORGE   BAQUERO
Composition:   ELIZABETH   'IYPEsErnNG   CoMll'\NY
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.   Harrison, Harland. II. Title.
QA76.8.M6895R67 1986   005.265   86-3085
ISBN   0-8104-6310-5
Quilt   Circuit is a trademark of Bishop Graphics, Inc.,   Wlstlake   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, mechanicai, 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: Some OCR-like spacing and character errors appear in the copyright and imprint lines, e.g. 'Wlstlake', 'mechanicai', 'IYPEsErnNG'. Credit lines include scrambled characters such as 'JJM BERNARD' and 'Lou OooRIGEORGE BAQUERO' whose intended names are uncertain. Reading order of the composition and printing credits is ambiguous.

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

Printed dates: 1986 · 86-3085 · 1 2 3 4 5 6 7 8 9 · 86 87 88 89 90 91 92 93 94

Languages: English

[Original PDF page 4](https://www.vintageapple.net/files/5e20b14340b8c49d11efa2251db1cb99469ec6e467269ce55f15d73e88e026f1/Programming_the_68000_Macintosh_Assembly_Language_1986.pdf#page=4)

### PDF page 5

[Cite this scan](https://www.vintageapple.net/transcripts/media/va-programming-the-68000-macintosh-assembly-language-1986-7854e7/1#scan-9c1ed0cb5c450e3263d734871c8d22a45c4240667bfb52af73cb06acb7f52246)

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 progranimed in
assembler before, don't know what a linker is, etc. Tupics such as   binaiy
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   veiy   useful-especially   iii
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   highe~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   highe~level   language. We suppose it is

Reading notes: Source text contains OCR-style spacing and hyphenation artifacts (e.g., 'tupics', 'binaiy', 'progranimed', 'highe~level') that may be misreadings.

Languages: English

[Original PDF page 5](https://www.vintageapple.net/files/5e20b14340b8c49d11efa2251db1cb99469ec6e467269ce55f15d73e88e026f1/Programming_the_68000_Macintosh_Assembly_Language_1986.pdf#page=5)

### PDF page 6

[Cite this scan](https://www.vintageapple.net/transcripts/media/va-programming-the-68000-macintosh-assembly-language-1986-7854e7/1#scan-70b8398dfdc9afccb3567f07ecb7eb6427806e86f3b9a10cf90b994b64d1aa53)

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 text appears to be a fragment; the primary heading is not included, so headline is null.

Printed product names: Macintosh · 68000

Languages: English

[Original PDF page 6](https://www.vintageapple.net/files/5e20b14340b8c49d11efa2251db1cb99469ec6e467269ce55f15d73e88e026f1/Programming_the_68000_Macintosh_Assembly_Language_1986.pdf#page=6)

### PDF page 7

[Cite this scan](https://www.vintageapple.net/transcripts/media/va-programming-the-68000-macintosh-assembly-language-1986-7854e7/1#scan-8df4938a05548616cb6417dfd5b6159550683f9a2f5c22d0777381606f1e2304)

Transcribed text:

Acknowledgments
W.   \VOuld   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.
Rema   Harrison-for patience and understanding.
Lori   Sweet-for   patience while an author   struggled.

Reading notes: Line-break hyphenation in 'manu-script' and 'Hayden-for' may affect reading order Possible OCR artifact in 'W.   \VOuld' at the start of the first line

Printed product names: Macintosh · 68000

Languages: English

[Original PDF page 7](https://www.vintageapple.net/files/5e20b14340b8c49d11efa2251db1cb99469ec6e467269ce55f15d73e88e026f1/Programming_the_68000_Macintosh_Assembly_Language_1986.pdf#page=7)

### PDF page 8

[Cite this scan](https://www.vintageapple.net/transcripts/media/va-programming-the-68000-macintosh-assembly-language-1986-7854e7/1#scan-ffd043d1e79fe632dd56dea43c9da0b6b50a8fab6cd1451acb22087c16ca97f7)

Transcribed text:

Organization
of this Book
'l~is   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: Stray characters such as 'l~is' and 'You an' appear to be OCR or damage artifacts. Possible missing punctuation or words, e.g. 'You an also skim'. Heading and page-level layout not present in supplied copy; no primary heading identified.

Languages: English

[Original PDF page 8](https://www.vintageapple.net/files/5e20b14340b8c49d11efa2251db1cb99469ec6e467269ce55f15d73e88e026f1/Programming_the_68000_Macintosh_Assembly_Language_1986.pdf#page=8)

### PDF page 9

[Cite this scan](https://www.vintageapple.net/transcripts/media/va-programming-the-68000-macintosh-assembly-language-1986-7854e7/1#scan-28a0c21c54edef4ba9496040f6a3c590cf92dc878de3ba26989b1737dd3e1631)

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 Bis 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: Final sentence of the fifth chapter summary is truncated mid-sentence. Word split 't9gether' appears to be an OCR error for 'together'.

Languages: English

[Original PDF page 9](https://www.vintageapple.net/files/5e20b14340b8c49d11efa2251db1cb99469ec6e467269ce55f15d73e88e026f1/Programming_the_68000_Macintosh_Assembly_Language_1986.pdf#page=9)

### PDF page 10

[Cite this scan](https://www.vintageapple.net/transcripts/media/va-programming-the-68000-macintosh-assembly-language-1986-7854e7/1#scan-faa5c11f633f5fb3a1d96b33fda25f64e421a2f019d844da6ca3f42a806c52f6)

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 Tuols, 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 TuolBox 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: Several words appear misspelled in the source copy, such as 'Tuols' and 'TuolBox', which may be OCR errors for 'Tools' and 'ToolBox'. Source fragment begins mid-sentence and may not be the start of the document.

Printed product names: Macintosh · SimpleCalc · QuickDraw · SANE

Languages: English

[Original PDF page 10](https://www.vintageapple.net/files/5e20b14340b8c49d11efa2251db1cb99469ec6e467269ce55f15d73e88e026f1/Programming_the_68000_Macintosh_Assembly_Language_1986.pdf#page=10)

### PDF page 11

[Cite this scan](https://www.vintageapple.net/transcripts/media/va-programming-the-68000-macintosh-assembly-language-1986-7854e7/1#scan-beade6897f437bcf9ac0365e2c3cb53da5a87567c82feb62c18de244ad281066)

Transcribed text:

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

Reading notes: OCR errors in table of contents (e.g., 'Ibis' for 'This', 'Pbrtion', 'Ihe', 'Addressing Register Indirect' ordering) Chapter 2 heading and numbering garbled; page numbers for several entries uncertain

Languages: English

[Original PDF page 11](https://www.vintageapple.net/files/5e20b14340b8c49d11efa2251db1cb99469ec6e467269ce55f15d73e88e026f1/Programming_the_68000_Macintosh_Assembly_Language_1986.pdf#page=11)

[Next transcribed scans](https://www.vintageapple.net/transcripts/media/va-programming-the-68000-macintosh-assembly-language-1986-7854e7/2.md)
