# Apple Machine Language 1981 (ocr-bw) — source transcripts, page 1

[Canonical transcript page](https://www.vintageapple.net/transcripts/media/va-apple-machine-language-1981-ocr-bw-7fd713/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-apple-machine-language-1981-ocr-bw-7fd713/1#scan-d48e6fb8095ed43e2e24b0ba4ef8ecaab980986f4cc6f7e3529a51cca3780dd9)

Transcribed text:

APPLE MACHINE LANGUAGE
DON INMAN / KURT INMAN
Learn machine language programming quickly and easily, using this unique and entertaining method—combines color, graphics, and sound with step-by-step, uncomplicated demonstrations.

Image description: Book cover on a black background with bold yellow and red title and author text above a large colorful maze-like geometric pattern of red, yellow, black and white lines, and a small yellow star-shaped Reward Books logo with an R in the top left corner.

Reading notes: Small text in the top-left corner reading 'REWARD BOOK' is barely legible and was not transcribed. The body line 'quickly' and 'easily' are in italics; the italic emphasis is noted but not otherwise marked.

Printed product names: Apple

Languages: English

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

### PDF page 1

[Cite this scan](https://www.vintageapple.net/transcripts/media/va-apple-machine-language-1981-ocr-bw-7fd713/1#scan-e6fa01b9fc5ff6e177515fb16b9aac57bfb252a8aed9a3ca494e43d96f871795)

APPLE MACHINE LANGUAGE

Transcribed text:

REWARD BOOK

APPLE
MACHINE LANGUAGE
DON INMAN/KURT INMAN

Learn machine language programming quickly and easily, using this unique and entertaining method—combines color, graphics, and sound with step-by-step, uncomplicated demonstrations.

Image description: Book cover with a black background, yellow and red title and author text, and a large colorful maze-like geometric pattern of red, yellow, black and white lines in a square panel, with a small yellow star-shaped Reward Books logo at top left.

Reading notes: Small text at top left reading REWARD BOOK is tiny and only partly legible. Slash between author names is yellow and may be read as part of the author line.

Printed product names: Apple

Languages: English

[Original PDF page 1](https://www.vintageapple.net/files/613aee10374772531cb31733dfdc8ad7623bb53b46fa2ef4908b6d2992fbb244/7fd71301852dd94bf2b3bc84848eaed9d19460a4c74be3384cdc75dac3aa62d6.pdf#page=1)

### PDF page 2

[Cite this scan](https://www.vintageapple.net/transcripts/media/va-apple-machine-language-1981-ocr-bw-7fd713/1#scan-08a264a80a5ca32dda1fb098b22480cecf7a66a077124fd6a2780d147417d453)

Apple Machine Language

Transcribed text:

Apple
Machine Language
Don   Inman
Reston   Publishing   Company,   Inc.
A Prentice-Hall Company
Reston, Virginia
Kurt   Inman

Reading notes: No image was supplied, so the fields were filled only from the provided extracted copy. The headline is inferred from the title-like line 'Apple Machine Language' and is not confirmed as a printed headline. Reading order follows the supplied copy: title, 'Don Inman', publisher name, 'A Prentice-Hall Company', location 'Reston, Virginia', then 'Kurt Inman'. The copy names people and a publisher but no advertised products, prices, or dates.

Languages: English

[Original PDF page 2](https://www.vintageapple.net/files/613aee10374772531cb31733dfdc8ad7623bb53b46fa2ef4908b6d2992fbb244/7fd71301852dd94bf2b3bc84848eaed9d19460a4c74be3384cdc75dac3aa62d6.pdf#page=2)

### PDF page 3

[Cite this scan](https://www.vintageapple.net/transcripts/media/va-apple-machine-language-1981-ocr-bw-7fd713/1#scan-c2f5cb6db959443678e74d78da6d203cd44b974e65270a128cefeb5f73635652)

Transcribed text:

Library of Congress Cataloging in Publication Data
Inman,   Don.
Apple machine language.
Includes   in!lex.
1. Apple computer-Programming.   2.   Basic
(Computer program language)   I.   Inman,   Kurt, joint
author.   II.   Title.
QA   76.8.A66156   001.65'2   80-20083
ISBN   0-8359-0231-5
0-8359-0230-   7   pbk.
©1981 by Reston   Publishing   Company,   Inc.
A   Prentice-Hal/   Company
Reston, Virginia   22090
All rights reserved. No part of this book
may be reproduced, In any way or by any means,
without   permission in writing from the publisher.
10   9
Printed   in the   United   States

Reading notes: Cataloging data is partly garbled by OCR spacing and characters, e.g. 'in!lex' and '76.8.A66156'. No primary heading is clearly printed; the copy is a catalog-in-publication block rather than a headline.

Printed product names: Apple

Printed dates: 1981

Languages: English

[Original PDF page 3](https://www.vintageapple.net/files/613aee10374772531cb31733dfdc8ad7623bb53b46fa2ef4908b6d2992fbb244/7fd71301852dd94bf2b3bc84848eaed9d19460a4c74be3384cdc75dac3aa62d6.pdf#page=3)

### PDF page 4

[Cite this scan](https://www.vintageapple.net/transcripts/media/va-apple-machine-language-1981-ocr-bw-7fd713/1#scan-c226a9a6eae08a57c1761e2231db4e126607b920e2b91d4c610685e69279af89)

Transcribed text:

Chapter 1
IBASICI
Chapter   2
I Bos   I
Chapter 3
I sos   I
Contents
PREFACE   vii
REVIEW   OF   APPLESOFT   II   BASIC   1
Commands, 2
Assignment Statements, 6
Display   Statements, 8
Loop Statements and Subroutines, 11
Graphic Statements, 13
Relational Statements, 15
Precedence of   Mathematical   and   Logical   Relationships, 15
Strings   and Functions, 16
BASIC   Statements of   Special   Importance, 17
Exercises,   20
Answers to Exercises,   21
CROSSING   THE   BRIDGE   22
Memory   Use,   25
A   Simple   BASIC   Operating   System,   29
The   Completed   BASIC   Operating   System,   41
Exercises,   44
Answers to Exercises,   44
INSTRUCTION   CODE   FORMAT   46
Number   Systems, 47
Accumulator, 53
Instructions in Memory,   57.
Use   of the   BASIC-M/L   Operating   System,   57
Summary,   68
Exercises,   70
Answers to Exercises,   71
Iii

Reading notes: Chapter headings and running text contain OCR-like garbled characters such as 'IBASICI' and 'I Bos I'. Page numbers in the contents list are partly uncertain due to spacing and dot-leader noise.

Languages: English

[Original PDF page 4](https://www.vintageapple.net/files/613aee10374772531cb31733dfdc8ad7623bb53b46fa2ef4908b6d2992fbb244/7fd71301852dd94bf2b3bc84848eaed9d19460a4c74be3384cdc75dac3aa62d6.pdf#page=4)

### PDF page 5

[Cite this scan](https://www.vintageapple.net/transcripts/media/va-apple-machine-language-1981-ocr-bw-7fd713/1#scan-37938f67cb4293d09bb948d07191e114988a52198269a5fdbcdb92ac644ceaaa)

Transcribed text:

Chapter   4
I Bos   I
Chapter   5
lBosl
Chapter   6
I Bos   I
Chapter   7
I Bos   I
Chapter   8
lsMI
SIMPLE   GRAPHICS   72
Plotting   a Point on the   Screen,   73
Four-Corner   Plot,   79
Drawing a   Horizontal   Line, 83
Drawing   Vertical   Lines, 86
Drawing a   Rectangle,   89
Summary,   92
Exercises,   93
Answers to Exercises,   94
DI   SP   LA   YING   TEXT   95
Displaying   a   Character,   95
Discussion of the New   Instructions,   99
Running Through the   Alphabet,   106
Displaying   ASCII   Codes,   109
Running the Program, 112
Displaying   More Than   One   Line, 113
Summary,   120
Exercises,   122
Answers to Exercises,   124
APPLE   SOUNDS   125
Modification to the   BASIC   Operating   System,   127
Description of the Tone Experiment Program, 128
Executing the Program,   130
How Sections 2 and 3 Work, 136
Summary,   138
Exercises,   140
Answers to Exercises,   141
MORE   SOUNDS   AND   GRAPHICS   142
Combining   the   Speaker   and Video   Display,   142
Entering and Running the Program, 147
Using   the Keyboard to   Play   the Notes, 148
Description of the Program, 151
Entering and Running the Program, 155
Summary,   156
Exercises,   158
Answers to Exercises,   159
THE APPLE   SYSTEM   MONITOR   160
The Processor   Status   Register, 167
Subtraction, 172
Summary,   176
Exercises,   177
Answers to Exercises,   178
iv

Reading notes: Chapter number markers in the table of contents are partly garbled (e.g. 'I Bos I', 'lBosl', 'lsMI'). Page numbers and chapter-level structure are only partially legible in the extracted copy.

Languages: English

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

### PDF page 6

[Cite this scan](https://www.vintageapple.net/transcripts/media/va-apple-machine-language-1981-ocr-bw-7fd713/1#scan-0f60373d7899a26ceb0800b6984c0a84c7be4c15fa0f91ab43adf20450fc0686)

Transcribed text:

Chapter 9
I sMI
Chapter   10
lsMI
Chapter 11
IMAI
lsMI
Chapter 12
lBASICl
jBosl
lsMI
IMAI
Appendix A-1
A-2
A-3
MULTIPLE   PRECISION   AND
NEGATIVE   NUMBERS   179
Two-Byte Addition, 179
Two-Byte   Subtraction,   184
Negative Numbers, 186
A Number Guessing Game, 189
Summary,   200
Exercises,   201
Answers to Exercises,   202
MORE   MONITOR   MAGIC   203
Hexadecimal   Addition-Immediate Mode,   203
Hexadecimal Subtraction,   206
Decimal Arithmetic,   208
Examining and Altering Registers, 217
Summary,   223
Exercises,   224
Answers to Exercises,   225
MINI-ASSEMBLER   AND   ADDRESSING   MODES   227
Using   the Mini-Assembler, 228
Indexed   Addressing, 234
Zero   Page   Indexing,   235
Absolute   Indexed   Addressing,   240
Indexed   Indirect   Addressing, 244
Indirect   Indexed   Addressing, 251
Summary,   255
Exercises,   257
Answers to Exercises,   258
PUTTING   IT   ALL TOGETHER   259
8-Bit   Multiplication,   259
Multiplication   Directly From   BASIC,   265
Multiplication   Using   the   BASIC   Operating   System,   266
Multiplication   Using   the   System   Monitor, 268
Multiplication   Using   the Mini-Assembler, 269
8-Bit Division, 271
Summary,   276
Exercises,   277
Answers to Exercises,   279
BAS   IC   ST   A   TEM ENTS   280
MACHINE   LANGUAGE   INSTRUCTIONS   281
BUILT-IN   SUBROUTINES   282
v

Reading notes: Chapter and section labels are fragmented by OCR noise (e.g., 'I sMI', 'lBASICl', 'jBosl') Primary heading is not clearly identifiable from the supplied copy

Languages: English

[Original PDF page 6](https://www.vintageapple.net/files/613aee10374772531cb31733dfdc8ad7623bb53b46fa2ef4908b6d2992fbb244/7fd71301852dd94bf2b3bc84848eaed9d19460a4c74be3384cdc75dac3aa62d6.pdf#page=6)

### PDF page 7

[Cite this scan](https://www.vintageapple.net/transcripts/media/va-apple-machine-language-1981-ocr-bw-7fd713/1#scan-e80606b2e188a772af523805d9f90c1a8e4272cc6ed904eab9761d8d4e7bca09)

Transcribed text:

A-4   DI   SPLAY   SYMBOLS   282
A-5   PROGRAMS   283
Appendix B
Appendix C-1
C-2
C-3
Appendix D
HEX   EQUIVALENTS   FOR
DECIMAL   NEGATIVES   284
VIDEO   MEMORY   285
ASCII   SCREEN   CODES   287
COLOR   CODES   FOR
LOW   RESOLUTION   GRAPHICS   288
6502   INSTRUCTION   CODES   289
INDEX   294
vi

Reading notes: Source appears to be a table of contents fragment; no headline or advertised content identifiable.

Languages: English

[Original PDF page 7](https://www.vintageapple.net/files/613aee10374772531cb31733dfdc8ad7623bb53b46fa2ef4908b6d2992fbb244/7fd71301852dd94bf2b3bc84848eaed9d19460a4c74be3384cdc75dac3aa62d6.pdf#page=7)

### PDF page 8

[Cite this scan](https://www.vintageapple.net/transcripts/media/va-apple-machine-language-1981-ocr-bw-7fd713/1#scan-52836bda5588ee19ff76dd3295bee94292be11cc11ed447f22142d54b6276e23)

Transcribed text:

Preface
The purpose of this book is to introduce   Apple   computer users, who have a
knowledge   of   BASIC   language,   to machine   language   programming. The   transi-
tion from   BASIC   is made in   small,   easy steps.   Color,   graphics, and sound are
used   early   in   the   book to make the demonstration programs interesting and
action-packed. Each new instruction   is   explained,   and the demonstration   pro-
grams are discussed step-by-step in   functional   sections.
The reader first uses the   BASIC   statements   POKE,   PEEK,   and   CALL   to
enter and execute machine   language   programs from   within a   BASIC   language
program.   A   BASIC   Operating System   is then   developed   from   which machine
language   programs can be entered and executed.
The introduction from   BASIC,   a   language   the reader   already   knows,   pro-
vides a   natural   approach that   leads   to the use of the   Apple   System Monitor. The
System Monitor   allows   the reader to enter, examine, and execute machine   lan-
guage programs   directly.   The time used by the computer to interpret   BASIC
statements is thus eliminated.
The   final   step in the transition is to the   Apple's   Mini-Assembler, which   re-
lieves the programmer of many of the tedious details involved with direct   ma-
chine   language   programming.
Approaching machine   language   through   BASIC   provides a means for the
reader to use his or her previous   knowledge   as a stepping stone to explore a new
area.
You   will   proceed through this book in four definite stages. Machine   lan-
guage programs are entered and executed by four distinct methods.   One   method
is introduced at each stage of the book.
1.   I BASIC   I   Introduced   in   Chap.   1.   Machine   language   programs are
under   full   control   of   BASIC,   using the instructions   POKE,
CALL,   and   PEEK.
2.   l BOS   I   Introduced in   Chap.   2. Machine   language   programs are   con-
trolled   by a   BASIC   Operating System.
vii

Reading notes: Preface heading is not a primary headline; no distinct primary heading present.

Printed product names: Apple · Apple's Mini-Assembler · Apple System Monitor · BASIC · BOS

Languages: English

[Original PDF page 8](https://www.vintageapple.net/files/613aee10374772531cb31733dfdc8ad7623bb53b46fa2ef4908b6d2992fbb244/7fd71301852dd94bf2b3bc84848eaed9d19460a4c74be3384cdc75dac3aa62d6.pdf#page=8)

### PDF page 9

[Cite this scan](https://www.vintageapple.net/transcripts/media/va-apple-machine-language-1981-ocr-bw-7fd713/1#scan-3dee82279ba28c4391fcca0ef82a4a63b98e18c93098a0d3cffa1b8bbb5cd02e)

Transcribed text:

3.   I SM   I   Introduced   in   Chap.   8.   Machine language programs are
hand-assembled and entered directly from the Apple   Sys-
tem Monitor.
4.   I MA   I   Introduced   in Chap. 11. Machine language programs are
assembled by the Apple Mini-Assembler.
The   I BASIC   I   ,   I BOS   I   ,   I SM   l ,   and   I MA   I   logos   appear in the   table
of contents and in the appropriate chapter headings where they are used.
viii

Reading notes: Logo labels I BASIC, I BOS, I SM, and I MA are rendered with stylized delimiters that may not reflect exact original glyphs.

Languages: English

[Original PDF page 9](https://www.vintageapple.net/files/613aee10374772531cb31733dfdc8ad7623bb53b46fa2ef4908b6d2992fbb244/7fd71301852dd94bf2b3bc84848eaed9d19460a4c74be3384cdc75dac3aa62d6.pdf#page=9)

### PDF page 10

[Cite this scan](https://www.vintageapple.net/transcripts/media/va-apple-machine-language-1981-ocr-bw-7fd713/1#scan-441bfb535b8fd5823d9f4514c63e8bf4ac8e38d7172050a8e36289bd68640b66)

Transcribed text:

Chapter 1
Review of Applesoft   11   Basic
I BASIC   I
Several assumptions are made in writing this book. The authors felt this to be
necessary   because of the numerous versions of Apple computers presently in
use.
1. You have made the necessary hardware connections.   If   not, see the reference
manuals provided with your Apple computer.
2. The authors have used a version of the Apple that has:
a.   Applesoft   11   BASIC   on a plug-in   ROM   printed circuit card.
b. A switch on the card to select either Applesoft   II   or   Integer   BASIC.
3. You will read and use the Apple manuals pertinent to your particular   ma-
chine.
4. You know how to switch back and forth between the programming languages
available to you.
The Apple computer can speak several languages. The prompt character
indicates which language your Apple is currently ready to understand. The   aster-
isk (*) indicates that you are in the machine language mode. This language is
always in the computer and does not have to be   "loaded"   (entered from an   ex-
ternal source) from a cassette or diskette. The machine language monitor that
controls the use of this language is discussed in the latter part of this book (from
Chap.   8 on).
Asterisk
prompt
*•
Cursor
When using
Machine Language
If   your Applesoft is on the plug-in   ROM   pc card, your Apple also contains
a high-level English-oriented language called   Integer   BASIC*   stored permanentlv
*BASIC   was developed at Dartmouth College by John Kemeny and Thomas Kurtz as
an all-purpose computer language suitable for beginning programmers with diverse   educa-
tional backgrounds.
1

Reading notes: Heading line reads 'Review of Applesoft 11 Basic' with 'I BASIC I' fragment, interpreted as Applesoft II BASIC Reading order of marginal prompt and cursor labels is uncertain

Printed product names: Apple · Integer BASIC

Languages: English

[Original PDF page 10](https://www.vintageapple.net/files/613aee10374772531cb31733dfdc8ad7623bb53b46fa2ef4908b6d2992fbb244/7fd71301852dd94bf2b3bc84848eaed9d19460a4c74be3384cdc75dac3aa62d6.pdf#page=10)

### PDF page 11

[Cite this scan](https://www.vintageapple.net/transcripts/media/va-apple-machine-language-1981-ocr-bw-7fd713/1#scan-8bce9f28656de9433f825d1b386b6f83b6221413c280adbf39fa2a96c192c050)

Transcribed text:

in its   ROM   memory.   ROM,   which is an abbreviation for Read Only   Memory,   can
be   "read"   (used by your programs), but cannot be   "written   into"   (changed by
you). The prompt character for Integer   BASIC   is a right facing arrow(>).   Inte-
ger   BASIC   is   not   discussed in this book. For more information, see the Apple   II
BASIC   Programming   Manual   (Apple   product #A2L005X).
Applesoft   II   is   Apple's   extended   BASIC   language. The prompt character of
Applesoft   II   is a right square bracket (]).This extended   BASIC   is now available
in three forms:
1. The   Apple   11   Plus   System   with the Autostart Monitor   ROM
2. The   Applesoft   pll.jg-in   interface card
3. The   Apple   Language   System
The Apple   II   Plus   System   has   Applesoft   II   BASIC   in   ROM.   Therefore, the
Apple   Mini-Assembler,   the   Floating   Point   Package, and the SWEET-16   inter-
preter (which are stored in the Integer   BASIC   ROMs)   are not   available   on the
Apple   11   Plus   system.
Since   we   will   be using the   Mini-Assembler   later   in the book, we   will   focus
on the system containing the Applesoft   11   ROM   card rather than the Apple   11
Plus   system.
Right bracket
prompt
]   .   APPLESOFT   11
Cursor
This book is designed to provide a bridge over which the reader may cross
from programming in   BASIC   to programming in the computer's native machine
language.   While   the   book assumes a background   knowledge   of Applesoft   II
BASIC,   a brief review of   BASIC   statements used by the   Apple   computer is   pre-
sented in this chapter.   If   you   feel   confident of your knowledge of Applesoft   II
BASIC,   feel free to move on to   Chap.   2. However, if your   BASIC   is rusty, spend
some time reviewing the material here.
Although   this   material   is not a   complete   discussion of   Applesoft   capabil-
ities,   all   those statements and commands necessary for understanding the   re-
maining chapters of. the book are given. An   Apple   computer with 16K of RAM,
a tape recorder or disk drive, and   Applesoft   II   BASIC   are   all   that are necessary
to perform the demonstrations and exercises presented.
COMMANDS
Certain   fundamental   commands are necessary in preparing, debugging, and
executing a   program.   Those   discussed   here   are   NEW,   LIST,   RUN,   TEXT,
GRaphics,   LOAD,   SAVE,   CONTinue,   TRACE, and   NOTRACE.
2

Reading notes: Hyphenation and line breaks split several words (e.g., 'pll.jg-in', 'Applesoft 11 ROM') Reading order of the text is uncertain due to stray layout labels such as 'Right bracket prompt' and 'Cursor'

Printed product names: Apple II Plus System · Applesoft II · Apple Language System · Apple II BASIC Programming Manual · Apple Mini-Assembler · SWEET-16

Languages: English

[Original PDF page 11](https://www.vintageapple.net/files/613aee10374772531cb31733dfdc8ad7623bb53b46fa2ef4908b6d2992fbb244/7fd71301852dd94bf2b3bc84848eaed9d19460a4c74be3384cdc75dac3aa62d6.pdf#page=11)

[Next transcribed scans](https://www.vintageapple.net/transcripts/media/va-apple-machine-language-1981-ocr-bw-7fd713/2.md)
