Apple IIe User Manual
Page 36
Page 36 of 74
IIe
Printed: Tuesday, March 4, 2003 10:40:15 AM
what you named each of them.
If you find that you've forgotten the names of the programs on
your disk, type CAT (or CAT,D2 if the disk is in drive 2).
You'll see a display like this that tells you, among other things, the name of the programs on
the disk and how much space they take up on the disk.
Typical Catalog
/MYPROGRAMS
NAME
TYPE
BLOCKS
MODIFIED
PUZZLE
BAS
40
AGE
BAS
1
PRACTICE
BAS
11
PAZAZZ
BAS
14
RAIN
BAS
6
BLOCKS FREE:
208
BLOCKS USED:
72
]
Creating a Self-Starting Program
Programs that you buy don't require you to type RUN.
They just start running when you put the
program disk in the disk drive and turn on the power.
If you'd like a program you've written to be a self-starter, you can make it self-starting by
following these steps:
Format a disk (for ProDOS)
Copy the files PRODOS and BASIC.SYSTEM from the ProDOS User's Disk. (You'll find instructions
for copying files in the ProDOS User's Manual that came with your disk drive.)
Copy your program onto the disk and give it the name STARTUP.
Starting up this disk loads ProDOS, puts you into BASIC, and runs your program.
It's Your Turn
This section presents two sample programs along with complete explanations of how they work.
Converting Miles to Kilometers
Here's a program that converts miles to kilometers.
Program Line
Explanation
10
PRINT THIS PROGRAM CONVERTS 20
PRINT MILES TO KILOMETERS.
Describes what the program
does.
30
PRINT HOW MANY MILES 40
PRINT DID YOU TRAVEL
Prints your request for information. The
semicolon instructs the computer to leave the cursor on the current line rather than move it to
the next line.
50
INPUT MILE
Puts ? on the screen.
Whatever number you type is stored in a variable named
MILE.
Note that because of the semicolon in line 40, the question mark appears on the same
line as the question.
60
LET KILO = MILE/.62137
Creates a variable named KILO, which is equal to MILE (the number
you enter) divided by .62137.
70
PRINT YOU TRAVELED KILO; 80
KILOMETERS.
Prints what's inside the first set of
quotation marks, then prints the value of KILO, then prints what's inside the quotation marks
in line 80.