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

[Canonical transcript page](https://www.vintageapple.net/transcripts/media/va-programming-the-macintosh-in-assembly-language-1986-3b84da/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-macintosh-in-assembly-language-1986-3b84da/1#scan-be2b6b1983daaa6284541dcacbcd53318f65b68ccc41a01be6dbc4276b03cf71)

Transcribed text:

SYBEX

Programming the

Macintosh™

in Assembly Language

Steve Williams

Image description: A red book cover with the SYBEX logo at top left, large cream title text, and a framed illustration of a striped rainbow Apple logo with a silver key threaded through it on a gray-blue background, with the author name in black at bottom.

Reading notes: The 'TM' mark after Macintosh is small and superscript; it is transcribed as ™.

Languages: English

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

### PDF page 1

[Cite this scan](https://www.vintageapple.net/transcripts/media/va-programming-the-macintosh-in-assembly-language-1986-3b84da/1#scan-83e221059216d8cf88b05b8a1f456d275abac0a352fea10cf63778ebb74c6d4c)

Transcribed text:

SYBEX

Programming the

Macintosh™

in Assembly Language

Steve Williams

Image description: A book cover with a red background, cream-colored title lettering, a SYBEX logo in the upper left, and a framed illustration of a rainbow-striped Apple logo with a silver key on a gray-blue background, with the author name at the bottom.

Reading notes: Title is split across several lines with horizontal rules between 'Programming the' and 'Macintosh' and between 'Macintosh' and 'in Assembly Language'; reading order follows the visual layout. The trademark symbol ™ after Macintosh is small and superscripted; it is included as printed.

Languages: English

[Original PDF page 1](https://www.vintageapple.net/files/17572478b8bee2df91ca8297fdf9ec3f4d4c0789b7c3989f8d3634d5e8cab4ad/Programming_the_Macintosh_In_Assembly_Language_1986.pdf#page=1)

### PDF page 2

[Cite this scan](https://www.vintageapple.net/transcripts/media/va-programming-the-macintosh-in-assembly-language-1986-3b84da/1#scan-418b3d55fb27b41952306deceb517288c8f435b4a1dcb65bf86cabae082ef9d7)

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

[Original PDF page 2](https://www.vintageapple.net/files/17572478b8bee2df91ca8297fdf9ec3f4d4c0789b7c3989f8d3634d5e8cab4ad/Programming_the_Macintosh_In_Assembly_Language_1986.pdf#page=2)

### PDF page 3

[Cite this scan](https://www.vintageapple.net/transcripts/media/va-programming-the-macintosh-in-assembly-language-1986-3b84da/1#scan-8467fdcf0f2379cb949f08ad7a9cad51d1ca53a3be30fc722c3a54e5d5b01d5b)

Transcribed text:

Programming the Macintosh in Assembly Language

Steve Williams

SYBEX®

Berkeley • Paris • Düsseldorf • London

Image description: A book title page with bold italic title text at top, a grid-patterned square containing a white apple silhouette with a microchip graphic over it, the author name in italic below, and the SYBEX logo with city names at the bottom.

Reading notes: Faint background text or bleed-through is visible on the right side of the page and was not transcribed.

Languages: English

[Original PDF page 3](https://www.vintageapple.net/files/17572478b8bee2df91ca8297fdf9ec3f4d4c0789b7c3989f8d3634d5e8cab4ad/Programming_the_Macintosh_In_Assembly_Language_1986.pdf#page=3)

### PDF page 4

[Cite this scan](https://www.vintageapple.net/transcripts/media/va-programming-the-macintosh-in-assembly-language-1986-3b84da/1#scan-342e10d846e89e11ed8a19331a84504cd47ad3638c1f8ce808f0fd55fbb1680e)

Transcribed text:

Cover   art by Peni   Choux
Book design by Sharon Leong
Apple,   Lisa,   Lisa   Pascal   Workshop, Macintosh   Development   System, MacsBug, MacWorks,
MaxDB, and TermBug are trademarks of   Apple   Computer,   Inc.
Consulair   C   is a trademark of   Consulair   Corp.
CP/M   and   CP/M-68K   are trademarks to   Digital   Research,   Inc.
Macintosh is a   licensed   trademark of   Apple   Computer,   Inc.
Microsoft and Microsoft BASE are trademarks of Microsoft   Corp.
Motorola   and   UNI   DOS   are trademarks of   Motorola,   Inc.
PDP-11   is a trademark of   Digital   Equipment   Corp.
UNIX   is a trademark of   Bell   Labs.
SYBEX is not   affiliated   with any manufacturer.
Every effort has been made to   supply   complete   and accurate information.   However,   SYBEX
assumes no responsibility for its use, nor for any infringements of patents or other rights of third
parties which would   result.
Copyright©1986 SYBEX   Inc.,   2344 Sixth Street,   Berkeley,   CA   94710.   World   rights reserved. No part
of this   publication   may be stored in a   retrieval   system, transmitted, or reproduced in any   way,
including   but not   limited   to photocopy, photograph, magnetic or other record, without the prior
agreement and written permission of the   publisher.
Library of   Congress   Card   Number: 85-62542
ISBN   0-89588-263-9
Printed by Haddon   Craftsmen
Manufactured in the   United   States of America
10   9 8 7 6 5 4 3 2 1

Reading notes: Copyright line lists 1986; ISBN and Library of Congress numbers are identifiers rather than dates

Printed product names: Apple Lisa · Lisa Pascal Workshop · Macintosh Development System · MacsBug · MacWorks · MaxDB · TermBug · Consulair C · CP/M · CP/M-68K · Macintosh · Microsoft BASE · Motorola · UNI DOS · PDP-11 · UNIX

Printed dates: 1986 · 85-62542

Languages: English

[Original PDF page 4](https://www.vintageapple.net/files/17572478b8bee2df91ca8297fdf9ec3f4d4c0789b7c3989f8d3634d5e8cab4ad/Programming_the_Macintosh_In_Assembly_Language_1986.pdf#page=4)

### PDF page 5

[Cite this scan](https://www.vintageapple.net/transcripts/media/va-programming-the-macintosh-in-assembly-language-1986-3b84da/1#scan-609361fcbaf95d7345cd25d72ebf80fe275b096e5e8660f027fae32055133449)

Image description: The image is a entirely blank white page with no visible artwork, layout, or printed content.

[Original PDF page 5](https://www.vintageapple.net/files/17572478b8bee2df91ca8297fdf9ec3f4d4c0789b7c3989f8d3634d5e8cab4ad/Programming_the_Macintosh_In_Assembly_Language_1986.pdf#page=5)

### PDF page 6

[Cite this scan](https://www.vintageapple.net/transcripts/media/va-programming-the-macintosh-in-assembly-language-1986-3b84da/1#scan-8250681c18015207413d495ebc579248e4ad64c4798310ceb6585b9084f791cc)

Transcribed text:

vi
CONTENTS
Acknowledgments   xxi
Introduction   xxii
Chapter   1
Basic Concepts
WHAT IS   PROGRAMMING?   1
Algorithms   2
Programming Languages   2
Flowcharts   3
HOW   DOES   A   COMPUTER   WORK?   5
Memory   S
Input/Output   Devices   7
Central   Processing   Unit   7
CPU   Organization   7
Stored Program Execution   9
Data Representation   11
What's in a   K?   17
Operations on Binary Numbers   18
Extensions   24
SUMMARY   24
EXERCISES   24
1

Reading notes: Source text appears to be a table of contents with OCR-like spacing artifacts (e.g., 'S' for 'Memory' page number, 'K?' in 'What's in a K?') Page numbers and character 'S' in the Memory entry may be misread

Languages: English

[Original PDF page 6](https://www.vintageapple.net/files/17572478b8bee2df91ca8297fdf9ec3f4d4c0789b7c3989f8d3634d5e8cab4ad/Programming_the_Macintosh_In_Assembly_Language_1986.pdf#page=6)

### PDF page 7

[Cite this scan](https://www.vintageapple.net/transcripts/media/va-programming-the-macintosh-in-assembly-language-1986-3b84da/1#scan-de6a257b32b91df39220a95d0fa034efe34cd666e5dc102ee9f183d450fc840a)

Chapter2 68000 Architecture

Transcribed text:

Chapter2
68000   Architecture
INTRODUCTION   29
REGISTER SET   30
Address Registers   30
Data Registers   31
Program   Counter   32
Status   Register   32
DATA   ORGANIZATION   IN   MEMORY   34
Bytes, Words, and Longwords   35
BCD   36
Floating   Point   36
ASCII   38
ADDRESSING   MODES   38
Effective Address   39
Data Register Direct Addressing   40
Address Register Direct Addressing   41
Address Register   Indirect   Addressing   43
Address Register   Indirect   Addressing with   Post-increment   44
Address Register   Indirect   Addressing with   Pre-decrement   46
Address Register   Indirect   Addressing with Dispiacement   47
Address Register   Indirect   Addressing with   Index   49
Absolute   Short   Addressing   51
Absolute Long Addressing   52
Program   Counter with Displacement   54
Program   Counter with   Index   55
Immediate   Mode   57
Status   Register Addressing   58
vii
29

Languages: English

[Original PDF page 7](https://www.vintageapple.net/files/17572478b8bee2df91ca8297fdf9ec3f4d4c0789b7c3989f8d3634d5e8cab4ad/Programming_the_Macintosh_In_Assembly_Language_1986.pdf#page=7)

### PDF page 8

[Cite this scan](https://www.vintageapple.net/transcripts/media/va-programming-the-macintosh-in-assembly-language-1986-3b84da/1#scan-7ae5dbc3ad81738315257541d53ed5b90f0618fae47d4dd5ce3ff639c62bc39b)

Transcribed text:

viii
STACKS AND STACK FRAMES   59
How a Stack Works   59
68000 Hardware Stack   60
Stack   Implemented   in Software   61
Stack Frames   62
SUMMARY   62
EXERCISES   64
Chapter3
68000   Instruction   Set
INTRODUCTION   67
INSTRUCTION   CLASSES   67
Data Movement   68
Integer   Arithmetic Operations   68
Logical   Operations   69
Shift and Rotate Operations   69
Bit   Manipulation   Operations   70
Binary Coded   Decimal   Instructions   70
Program   Control   Instructions   70
System   Control   Operations   71
PROGRAM   DEVELOPMENT   MECHANICS   71
Editing   72
Backups   73
Assembling   75
Linking   75
EXEC   75
Debugging   76
Example-Summing   the First Five   Integers   78
67

Languages: English

[Original PDF page 8](https://www.vintageapple.net/files/17572478b8bee2df91ca8297fdf9ec3f4d4c0789b7c3989f8d3634d5e8cab4ad/Programming_the_Macintosh_In_Assembly_Language_1986.pdf#page=8)

### PDF page 9

[Cite this scan](https://www.vintageapple.net/transcripts/media/va-programming-the-macintosh-in-assembly-language-1986-3b84da/1#scan-753d61eb5e40279d7ab92335065797e80b93654118cc43defc5cf37d8890def0)

Transcribed text:

DDT-68K   83
Example   84
INSTRUCTIONS   88
Effective Address Operands   88
ABCD   Instruction   89
ADD   Instruction   92
ADDA   lnstruqion   95
ADDI   Instruction   97
ADDQ   Instruction   99
ADDX   Instruction   101
AND   Instruction   103
ANDI   Instruction   105
ASL   Instruction   108
ASR   Instruction   111
Bee   (Conditional   Branch)   Instruction   114
BCHG   Instruction   120
BCLR   Instruction   122
BSET   Instruction   124
BSR   Instruction   126
BTST   Instruction   128
CHK   Instruction   131
CLR   Instruction   133
CMP   Instruction   135
CMPA   Instruction   138
CMPI   Instruction   140
CMPM   Instruction   142
DBcc   Instruction   144
DIVS   Instruction   148
DIVU   Instruction   150
EOR   Instruction   152
EORI   Instruction   154
EXG   Instruction   156
EXT   Instruction   158
ix

Reading notes: Table of contents listing for an instruction set reference; page numbers are printed but no advertised content is present OCR artifacts such as 'lnstruqion' and 'Bee' in place of 'Bcc' and 'Bcc (Conditional Branch)'

Languages: English

[Original PDF page 9](https://www.vintageapple.net/files/17572478b8bee2df91ca8297fdf9ec3f4d4c0789b7c3989f8d3634d5e8cab4ad/Programming_the_Macintosh_In_Assembly_Language_1986.pdf#page=9)

### PDF page 10

[Cite this scan](https://www.vintageapple.net/transcripts/media/va-programming-the-macintosh-in-assembly-language-1986-3b84da/1#scan-b9ab2a6fb83ff49658faf044d7d657a44549e473ec57446bdb80780994c20108)

Transcribed text:

x
ILLEGAL   Instruction   160
JMP   Instruction   161
JSR   Instruction   163
LEA   Instruction   165
LINK   Instruction   167
LSL   Instruction   170
LSR   Instruction   172
MOVE   Instruction   174
MOVE to CCR   Instruction   176
MOVE to SR   Instruction   178
MOVE   from SR   Instruction   180
MOVE   USP   Instruction   182
MOVEA   Instruction   183
MOVEM   Instruction   185
MOVEP   Instruction   190
MOVEQ   Instruction   193
MULS   Instruction   195
MULU   Instruction   197
NBCD   Instruction   199
NEG   Instruction   201
NEGX   Instruction   203
NOP   Instruction   205
NOT   Instruction   206
OR   Instruction   208
ORI   Instruction   210
PEA   Instruction   212
RESET   Instruction   214
ROL   Instruction   215
ROR   Instruction   218
ROXL   Instruction   221
ROXR   Instruction   224
RTE   Instruction   227
RTR   Instruction   229
RTS   Instruction   230

Reading notes: Index-style table of contents listing instruction names with page numbers; no advertised products, prices, or dates present.

Languages: English

[Original PDF page 10](https://www.vintageapple.net/files/17572478b8bee2df91ca8297fdf9ec3f4d4c0789b7c3989f8d3634d5e8cab4ad/Programming_the_Macintosh_In_Assembly_Language_1986.pdf#page=10)

### PDF page 11

[Cite this scan](https://www.vintageapple.net/transcripts/media/va-programming-the-macintosh-in-assembly-language-1986-3b84da/1#scan-b86296435031dd0755a4098589cc0f5847f0d73f20cd22f20c71913c958f55bb)

Chapter4 Simple Macintosh Programs

Transcribed text:

SBCD   Instruction   231
Sec   Instruction   234
STOP   Instruction   237
SUB   Instruction   238
SUBA   Instruction   240
SUBI   Instruction   242
SUBQ   Instruction   244
SUBX   Instruction   246
SWAP   Instruction   248
TAS   Instruction   249
TRAP   Instruction   251
TRAPV   Instruction   252
TST   Instruction   253
UNLK   Instruction   255
SUMMARY   256
EXERCISES   256
Chapter4
Simple Macintosh   Programs
INTRODUCTION   259
THE HELLO WORLD   PROGRAM   260
The Hello.asm   File   260
The   Hello.link   File   261
The Hello.job   File   261
Running the   Hello   World   Program   261
OUTPUT   CONVERSION   ROUTINES   262
Converting Binary to   Hexadecimal   263
Converting Binary to   Decimal   264
xi
259

Reading notes: Chapter heading run together as 'Chapter4' in source text

Languages: English

[Original PDF page 11](https://www.vintageapple.net/files/17572478b8bee2df91ca8297fdf9ec3f4d4c0789b7c3989f8d3634d5e8cab4ad/Programming_the_Macintosh_In_Assembly_Language_1986.pdf#page=11)

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