# Understanding Apple BASIC — source transcripts, page 1

[Canonical transcript page](https://www.vintageapple.net/transcripts/media/va-understanding-apple-basic-1983-78b237/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-understanding-apple-basic-1983-78b237/1#scan-a3920a2e0bba6eeedfe72ca597c03749c38ef8e2ed7fc1c314451d579fae1ea7)

UNDERSTANDING APPLE BASIC

Transcribed text:

UNDERSTANDING
APPLE® BASIC
Step-by-step Instruction for the Beginner
An Alfred Handy Guide
FEATURING ORIGINAL PROGRAMS AND EXERCISES
by Richard G. Peddicord

Image description: A book cover with a cream grid background, a green apple tree bearing red apples above alphabet blocks spelling ALFRED and EDIT, and a gray Alfred Handy Guide logo.

Reading notes: The price on the top-left corner is cut off and partially obscured by a stamp or sticker; it reads as '2.95 U.S.A' with leading characters cropped. The diagonal corner banner text 'FEATURING ORIGINAL PROGRAMS AND EXERCISES' is set on an angle and was transcribed in reading order from the image. Alphabet blocks read ALFRED (top-to-bottom spelling A, L, F, R, E, D) and EDIT on the base; block letters were read as shown.

Printed product names: Apple BASIC · Alfred Handy Guide

Languages: English

[Original Image 1](https://www.vintageapple.net/files/5c1ae57d0110bd962c18a9d17a79864fde6c5b93d6cf34ea1f777c47a6a6fc57/67755f9ef2b1b34b7efdb401.webp)

### PDF page 1

[Cite this scan](https://www.vintageapple.net/transcripts/media/va-understanding-apple-basic-1983-78b237/1#scan-7381c288174ff5001a089cef85ff166e722cc16d3afc16b3845b88906e957aaf)

UNDERSTANDING APPLE®

Transcribed text:

~
:.9E
J.S.A   /
_/
UNDERSTANDING
APPLE®
IAlll:
Step-by-step Instruction for
the Beginner
An   Alfred   Handy Guide   E:':]
by Richard G. Peddicord

Reading notes: Supplied copy contains garbled or stray fragments ("~", ":.9E", "J.S.A /", "_/", "IAlll:", "E:':]") that could not be confidently read. The headline is inferred from the stacked lines "UNDERSTANDING" and "APPLE®"; the reading order and whether this is the true headline could not be confirmed. "Apple" appears as a title word rather than a clearly advertised product, and the item looks like a book rather than an ad, so productNames may not reflect an advertised product. "Alfred Handy Guide" is partly garbled in the supplied copy ("An Alfred Handy Guide E:':]") and the series name may be inexact. No prices or dates are visible in the supplied copy.

Printed product names: Apple

Languages: English

[Original PDF page 1](https://www.vintageapple.net/files/8d82cf62d909409293ba6f90049cc35a18b0dba1d9a5c9996e895701e15bae96/Understanding_Apple_Basic_1983.pdf#page=1)

### PDF page 2

[Cite this scan](https://www.vintageapple.net/transcripts/media/va-understanding-apple-basic-1983-78b237/1#scan-78917b90bde825ff6b6588630b90b90b6a21741d53910b2e1529312a6fcb584e)

UNDERSTANDING APPLE® BASIC

Transcribed text:

UNDERSTANDING
APPLE®
BASIC
by Richard G.   Peddicord
AN ALFRED HANDY   GUIDE
Computer Series Editor:
George Ledin Jr.
~   ALFRED   PUBLISHING   CO.,   INC.
~   ~   SHERMAN   OAKS,   CA   91403

Reading notes: Transcript is intentionally empty because the exact extracted text is preserved separately. Visual layout and artwork are inferred only from the supplied copy and were not verified against the image. The supplied copy is a book title page, not an advertisement, so no advertised products or prices are listed. Line breaks and the ~ symbols in the publisher line are uncertain as to original layout.

Languages: English

[Original PDF page 2](https://www.vintageapple.net/files/8d82cf62d909409293ba6f90049cc35a18b0dba1d9a5c9996e895701e15bae96/Understanding_Apple_Basic_1983.pdf#page=2)

### PDF page 3

[Cite this scan](https://www.vintageapple.net/transcripts/media/va-understanding-apple-basic-1983-78b237/1#scan-3df6c2c73713c4d2ed9cb8c398598e4c2dc5433287aff831c5a088b02cbe704f)

Transcribed text:

This Handy Guide   is   not a publication of Apple Computer
Inc. and should not be   used   in lieu of   the instruction manuals
that accompany their products.   All   information regarding
Apple computers may not be   accurate   or completely up to
date.
Editorial Supervision: Joseph   W.   Cellini
Cover Design: Paula Bingham Goldstein
Copyright   ©   1983 by Alfred Publishing Co. Inc.
Printed   in   the   United   States   of America
All   rights reserved. No part of   this book shall   be   reproduced
or transmitted in any form or by any means, electronic or
mechanical, including photocopying, recording, or by any
information or retrieval system without written permission
of the publisher.
Alfred   Publishing Co., Inc.
15335   Morrison   St.
PO   Box5964
Sherman   Oaks, CA 91413
Library of   Congress   Cataloging in Publication Data
Peddicord, Richard G.
Underst.anding   Apple BASIC.
(An   Alfred   Handy Guide)
Bibliography: p.
Includes index.
1.   Apple   .//   (Computer)-Programming.   2.   Basic
(Computer program language).   I.   Title.
QA76.8.A662P43   1983   001.64'2   83-15654
ISBN   0-88284-246-3

Reading notes: OCR-style spacing artifacts in copyright and catalog lines Garbled catalog entry 'Apple .//' possibly 'Apple II' or similar

Printed product names: Apple BASIC · Apple Computer

Printed dates: 1983 · 83-15654

Languages: English

[Original PDF page 3](https://www.vintageapple.net/files/8d82cf62d909409293ba6f90049cc35a18b0dba1d9a5c9996e895701e15bae96/Understanding_Apple_Basic_1983.pdf#page=3)

### PDF page 4

[Cite this scan](https://www.vintageapple.net/transcripts/media/va-understanding-apple-basic-1983-78b237/1#scan-b2be322e7e24c5b281b171c5f606f04de78e470e58d29de989f1763e8ba1b10a)

Transcribed text:

CONTENTS
1. INTRODUCTION   • • .   • •   • • • • • • . . .   • • • .   • • . . .   • . .   • .   •   4
2. ABOUT   YOUR   APPLE   ..•.••.•......•.•....•   5
3. A PRINTING CALCULATOR...............   9
4.   LINE NUMBERS AND STATEMENTS   •   •  •   12
5.   VARIABLES   AND   ASSIGNMENT
STATEMElfrS   •••••••••••••••••••••..•••.•.•••   14
6. INPUTTING DATA FROM THE
KEYBOARD   • • • • • • • •   • • •   • • • • • • • • • • • •   • • • •   • • .   •   • • • •   16
7. READING DATA FROM   YOUR
PROGRAM   ••••.••••••   ••••••.••••••   •.   ••••..   ••••   18
8. A   COMPUTERIZED   SHOPPING   LIST   • • •   20
9. ARITHMETIC   EXPRESSIONS   • • • • • • .   • • • • •   22
10.   LOGICAL   EXPRESSIONS   •   • . .   • . .   • • • • • • • • • • •   24
11.   IF   •••   THEN   .~................................   26
12.   FOR   •   •   •   NEXT   • •   • • • •   • . .   .   • . .   • . . . .   • • • • •   • • .   • • •   •  •   28
13.   LOAN   AMORTIZATION   .   • • .   • . .   • • • •   • • • . .   • • • . .   31
14.   MAGIC   SUMS   • .   • • .   • • • •   • •   • • • .   . . .   • . .   • • . . . . .   • • • .   •   33
15.   STRING   VARIABLES   .   • .   • .   . . . .   • . . . . .   • . .   • •   • .   •   34
16.   ONE-DIMENSIONAL   ARRAYS   • • • . . . .   • • • • .   36
17.   ACCOUlfrS   RECEIVABLE   • .   • •   •  •   • • • • .   • •   • • •   38
18. BUBBLE   SORTING   .   • .   • • . .   . .   • • • •   • • .   • •   • .   • .   • .   •   41
19.   TWO-DIMENSIONAL   ARRAYS   • • • •   •  •   •  • • • . .   43
20.   LOW-RESOLUTION
COLOR   GRAPIDCS   •   • . . . . . .   •   • .   • .   • . . .   • • • .   • .   •   •  •   46
21.   HIGH-RESOLUTION
COLOR   GRAPmcs   • • • • • •   •  • • • • •   • • . . .   • • • .   •  •   • • •   48
22.   SYSTEM   AND   EDITOR   COMMANDS   . . .   • .   50
23.   DISK   OPERATION   • .   • • •   • •  • • •   • • • .   • . . . .   • . . .   • • •   51
24.   SEQUENTIAL   FILES   • • • •  • •   •  •   • • .   • • • • • • • • .   • • •   53
25. WHERE TO GO   FROM   HERE   • • • • • • • • • • • • •   56
26. BIBLIOGRAPHY   • • •   • .   •   • • .   • • • . .   • • • • • •   •  • • • • •   •  •   57
27.   INDEX   • • . . . . . .   • .   • • • • •   • •   • .   • • • • • • • • • •   •  •   .   • .   • • •   • .   • •   58
3

Reading notes: Dotted leaders and OCR-damaged characters (e.g., 'elfrS', 'ACCOUlfrS', 'mcs') make some entries uncertain Page numbers attached to section titles may be misaligned due to OCR spacing

Printed product names: Apple

Languages: English

[Original PDF page 4](https://www.vintageapple.net/files/8d82cf62d909409293ba6f90049cc35a18b0dba1d9a5c9996e895701e15bae96/Understanding_Apple_Basic_1983.pdf#page=4)

### PDF page 5

[Cite this scan](https://www.vintageapple.net/transcripts/media/va-understanding-apple-basic-1983-78b237/1#scan-7634c38a1e3dcc76759eda76afb7f67f078d65cfbc2bc827f3de6d62d1cb2af0)

Transcribed text:

1.   INTRODUCTION
The Apple   II   computer continues to be one of the
most popular microcomputers of   all   time. The version
of BASIC that has become standard on these machines
is called Appleso:ft   BASIC,   and it is one reason why
the Apple   is   so popular.
Appleso:ft   BASIC   lets you do things that other
versions of BASIC do not, such as put many state-
ments on the same line, use long variable names, and
omit certain parameters. Kids like it because it permits
lots of variation, and because it is user-friendly.
If   you want   to   learn Applesoft BASIC, this Handy
Guide is a good place to start. It is very important   that
you work the examples on an Apple computer and that
you try some of the exercises. Otherwise you may for-
get, or never understand, some of the concepts.
Many schools and libraries have one or more
Apples.   Phone   around and ask   if   you can use one. Many
computer stores have Apples, and perhaps even some
of your friends have them. And of course you can always
buy one. The important thing   is   to   be   able to use an
Apple when you want to.
4

Reading notes: Headline not clearly present; section heading '1. INTRODUCTION' treated as non-primary Printed spelling 'Appleso:ft' appears with embedded colon, preserved as written

Printed product names: Apple II · Applesoft BASIC · Apple

Languages: English

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

### PDF page 6

[Cite this scan](https://www.vintageapple.net/transcripts/media/va-understanding-apple-basic-1983-78b237/1#scan-4cc05e029014927d857ef8a8a8f52c4c8a9f4047cfb563a6ea931ba9c54760c7)

Transcribed text:

2.   ABOUT   YOUR   APPLE
A great variety of software and hardware are
available for the Apple   II   computer, and its Applesoft
BASIC has become one of the more flexible BASICs in
operation today.
THE SCREEN
The Apple   II   features a high-resolution color screen
of   280   columns and 196 rows, with six different colors
(black, white, orange, pink, blue, and green) available
for each   pi:cel,   or picture element. This is about the
same resolution and color range as the personal game
computers on the market today. It follows that you can
program games on your Apple   II.   It   is not possible to
attain the same speed as these commercial programs,
however, because you   will   be working in Applesoft
BASIC, and the commercial programs are written in
assembly   language,   which is faster because it's closer
to   the machine language itself.
The low-resolution screen on the Apple   II   has   40
columns and   40   rows, and each pixel can be one of 16
different colors from black to white. The reason why
you have more choice of color with the lower resolution
has to do with the way the color TV signal is generated
and how the color image is stored.
HOOKING   UP   YOUR   APPLE
The configuration that   has   proven to be most cost
effective and useful consists of an Apple   II   computer
with one disk drive connected to a TV set via an RF
modulator. The RF modulator converts the Apple's
TV signal into the same kind of signal that the televi-
sion receiver is expecting. Most RF modulators for
computers generate an output signal that is picked up
on Channel 3 or 4.
The first thing you must do before turning on the
power   is   to check the connections on your system. Your
Apple   II   computer has a power cord that plugs into the
back (see Figure 2.1).   Plug   this into a   grounded   115-
volt AC circuit. If   you try   to   use an ungrounded circuit,
the manufacturer's warranty is void, and for good
reason.
Coming out of the Apple   will   be what looks   like
a   hi-fi   cable, and indeed it has the same kind of plug
on the end, a so-called RCA phono plug. This plugs
into a little metal box that attaches to your TV set
antenna, and to your outside TV antenna. There   will
be a sliding switch on the box that switches power
between the computer and the antenna. This arrange-
ment permits the family color TV set to be used as
your Apple's output device.
You may or may not have a disk drive connected
to   your Apple. If one   is   connected, so much the better.
If one   is   not connected, do not attempt to connect one
using only this Handy Guide. You must use the instruc-
tions supplied with the drive. You can, however, hook
up your Apple   II   to   a TV set and turn on the power to
5

Reading notes: Extraction includes 'pi:cel' and 'Apple will be' fragments that may reflect OCR or line-break errors Page number '5' appears at the end without surrounding context

Printed product names: Apple II · Applesoft BASIC · RF modulator

Languages: English

[Original PDF page 6](https://www.vintageapple.net/files/8d82cf62d909409293ba6f90049cc35a18b0dba1d9a5c9996e895701e15bae96/Understanding_Apple_Basic_1983.pdf#page=6)

### PDF page 7

[Cite this scan](https://www.vintageapple.net/transcripts/media/va-understanding-apple-basic-1983-78b237/1#scan-7f25b6572c147af07eb507afff47a7c710154de261576e7d1375e2b48ccf5559)

Transcribed text:

Figure 2.1 Hooking up your Apple//.
both. The Apple's power switch is located in the back
on the far left.   It   is a rocker switch; push the top part
in to turn the power on. The power light in the lower
left corner of the keyboard   will   come on.
THE   KEYBOARD
A diagram of the Apple   II   keyboard is shown   in
Figure 2.2. Your first step is to try out a few of the
essential keys. The   RESET   key is most useful. Try it.
You   will   hear a bleep from the Apple's speaker and the
flashing square cursor   will   be immediately to the right
of the Applesoft prompt character, ] . Whatever   pro-
gram   you were working on   will   still be in memory, and
whatever shapes you had entered   will   still be there.
In other words, no real harm is done   if   you press
RESET.
The   SHIFT   key works the same as in a type-
writer: hold it down while you strike a key; the upper-
case version of the character   will   be sent to the central
processing unit.
In Applesoft, you enter characters one at a time
and then press   RETURN.   Until   you press   RETURN,
the machine has no idea what you have typed in. There-
fore you can   make all   the corrections you want to a line
before sending it centrally. The   arrow   or   cursor   keys
(on the right side of   the keyboard) are extremely useful
6

Printed product names: Apple// · Apple II · Applesoft

Languages: English

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

### PDF page 8

[Cite this scan](https://www.vintageapple.net/transcripts/media/va-understanding-apple-basic-1983-78b237/1#scan-cdcc96a117efe73d26749a5434ec297f6e4ff0aa49689a37c931e3b428081055)

Transcribed text:

-.l
~
i'
t.:>
~
~ <t>
~
'E.. <t>
::.:::::
~ C"'
0
~
Hold down while striking
another   key.   Nothing will
appear on   screen,   but
special character will be
sent centrally
Press for
upper   case
POWER   I   48   K   I
Resets system
I
Causes repetition of
any key held down
I
Returns to beginning
of new line
I
Moves right past
characters
I
--- Moves left past
characters

Reading notes: Key labels and control descriptions are fragmented, with several stray symbols and unclear reading order. The product name 'POWER I 48 K' may be a fragment and its exact spelling is uncertain.

Printed product names: POWER

Languages: English

[Original PDF page 8](https://www.vintageapple.net/files/8d82cf62d909409293ba6f90049cc35a18b0dba1d9a5c9996e895701e15bae96/Understanding_Apple_Basic_1983.pdf#page=8)

### PDF page 9

[Cite this scan](https://www.vintageapple.net/transcripts/media/va-understanding-apple-basic-1983-78b237/1#scan-b0d94bd530a99a7935bb69d3f584e778996e90e4e95b41b763f9ebbda2896753)

Transcribed text:

in making   corrections,   since they move the cursor   across
text on the screen without changing it. Only when you
press another key   will   the indicated change be made.
You   will   use these keys often.
If you want to move the cursor over many char-
acters, you can hold down the repeat key (REPT) while
you hold down one of the arrow keys. This same REPT
key will cause any character to be repeated.
Some   commands that you should be aware of are
listed below:
8
HOME   Clears   text and moves cursor to
top left.
DEL   Put beginning line number after
DEL, then a comma, then the
ending line number. Every line
from begin to end   will   be
DELeted from program.
LIST   Lists your program.
RUN   Runs your program.
PR#l   Enables printer   in   slot 1.
PR#6   Enables disk drive in slot 6.
PR#O   Disables printer.
EXERCISES
1. Play follow the leader with us.   Simply   do each
thing listed below as many times as indicated:
a. Press   RESET   3   times
b. Press   SPACE   BAR 2 times
c. Press   RETURN   1 time
d. Press your nose 1 time
e. Press letter M   10   times
f. Press left   arrow(+-)   10   times
g. Type PRINT ''GOTCHA''   1   time
h. Press   RETURN   10   times

Reading notes: Source appears to be a computer manual excerpt on keyboard commands rather than an advertisement; no headline or product prices present Some characters such as 'PR#O' may be OCR-confused with 'PR#0' and 'LIST' spacing is uncertain

Languages: English

[Original PDF page 9](https://www.vintageapple.net/files/8d82cf62d909409293ba6f90049cc35a18b0dba1d9a5c9996e895701e15bae96/Understanding_Apple_Basic_1983.pdf#page=9)

### PDF page 10

[Cite this scan](https://www.vintageapple.net/transcripts/media/va-understanding-apple-basic-1983-78b237/1#scan-757144e9f332dccdfb30e1d881cc27a088039c9e73edcbd70ec2d8184e230b89)

Transcribed text:

3. A PRINTING CALCULATOR
Applesoft   BASIC   has a feature that   is   quite use-
ful if   you have some arithmetic calculations   to   perform.
Basically all you have to do is type the word PRINT
I   followed by an arithmetic expression that the machine
can understand, hit RETURN, and the machine   will
give you the correct answer.
ADDITION AND   SUBTRACTION
Try this one:
PR I NT   5+6   (hit RETURN)
11
You can put several additions or subtractions in
one expression. If you don't use parentheses they   will
be performed from left to right. For example,
PRINT   5+6-7-3+ll
5
The machine adds 5 and 6 to get 11, then sub-
tracts   7, then subtracts 3, then adds 4.
If you put in parentheses, you can change the
meaning, as in:
PRINT   5+6-<7-3>+4
11
Because the parentheses are there, the machine
must subtract the   3   from the   7   before it does anything
else.
MULTIPLICATION
Multiplication is indicated by the asterisk *, as in
PRINT   "13   TIMES   14   IS   "13*14
13   TIMES   lll   IS   182
Notice that   if   you put a message in quotes it will
print exactly what you wrote.   This   allows you to iden-
tify what the numbers are.
If you need to multiply a sum of items by a given
number, as in a sales tax calculation, you would use
parentheses:
PRINT   Cl.26+0.23+4.99>*0•6
.3888
DIVISION
Division   is   indicated with the slash sign (!). As
with multiplication,   if   you want to divide a sum of num-
bers by a certain number, be sure to put   all   the terms
of the sum within parentheses. This forces the machine
9

Reading notes: OCR spacing and character errors in several places (e.g., 'PR I NT', 'll' for 11, 'Cl.26' and '!' for slash). Reading order of the final division paragraph is cut off at the source boundary.

Languages: English

[Original PDF page 10](https://www.vintageapple.net/files/8d82cf62d909409293ba6f90049cc35a18b0dba1d9a5c9996e895701e15bae96/Understanding_Apple_Basic_1983.pdf#page=10)

### PDF page 11

[Cite this scan](https://www.vintageapple.net/transcripts/media/va-understanding-apple-basic-1983-78b237/1#scan-fe57176aa7cbcd26fdf18474a250ca2c1f2c74c4e3291e82114620d892330564)

Transcribed text:

to add them together before it divides.   Say   you want
the average of 5, 43, and 67.   This will   give it to you:
PRINT   "AVERAGE   IS   ";(5+43+67)/3
AVERAGE   IS   38.3333333
If   you have an expression with only multiplication
and division, the operations will be performed from
left to right. Thus:
PRINT   1/2*3
1. 5
But:
PRINT   1/(2*3>
.166666667
We say that multiplication and division are on the
same level of the arithmetic   hierarchy.   A string of mixed
multiplications and divisions   will   be performed from
left to right unless parentheses   make   it otherwise.
Multiplication and division   take   precedence over addi-
tion and subtraction. This means that they   will   be done
first.
For example,
PRINT   3+2*6
15
If addition took precedence over multiplication it
would add, then multiply, as in:
PRINT   <3+2>*6
30
EXPONENTIATION
The last arithmetic operation is exponentiation,
the power operation. Recall that   "a   to the power   b"
means   a   muliplied by itself   b   times.   On   the Apple key-
board the hat symbol (/\)means exponentiation. Thus:
PRINT   3/\2
9
AND
PRINT   2/\3
8
Exponentiation is at the top of the hierarchy, in
that it   will   be done before multiplication and division.
A string of exponentiations will be done from left to
right.
IO
EXERCISES
1. Perform the following arithmetic calculations
using a print statement:
a.   457 + 32 + 94
b. 34 times 237

Reading notes: Source appears to be a BASIC programming manual page with OCR-style spacing artifacts; some characters such as '<' and '>' may be misread parentheses, and '/\' is the exponent symbol.

Languages: English

[Original PDF page 11](https://www.vintageapple.net/files/8d82cf62d909409293ba6f90049cc35a18b0dba1d9a5c9996e895701e15bae96/Understanding_Apple_Basic_1983.pdf#page=11)

[Next transcribed scans](https://www.vintageapple.net/transcripts/media/va-understanding-apple-basic-1983-78b237/2.md)
