Sharp MZ-700 Series Owner's Manual page 21

Personal computer
Hide thumbs Also See for MZ-700 Series:
Table of Contents

Advertisement

Novelet's try executing the program.
[RlPfNlfCRl
Enter RUN and press the |CR| key; the result is displayed on line 9 of the screen.
Now we will explain procedures for making changes in programs. First, let's change the instruction on
line 20 from B = 6 to B = 8. Type in LIST 20 and press the [CR] key; this displays just line 20 of the
program on the screen. Next, use the cursor control keys (the keys at the right side of the keyboard which
are marked with arrows) to move the cursor to the number
r
6 j , then press the 00 key and the |CR| key in
succession to make the change. Note that the change is not completed until the|CR|key is pressed.
Now type in LIST and press the |CR| key again to confirm that the change has been made.
Next, let's change line 30 of the program to C = 30 X A + B.
Using the cursor control keys, move the cursor so that it is positioned on top of the " A " in line 30,
then press the | INST | key three times in succession. This moves "A + B" three spaces to the right.
Cursor position
Now type in [3][o][x] and press the |CR| key to complete the insertion. LIST the program to confirm that
the change has been made correctly.
Now change line 30 again so that it reads "C = 30 X A " instead of "C = 30 X A + B". Do this by
moving the cursor to the position immediately to the right of B and pressing the | DEL 1 key two times;
this deletes "+B". Press the |CR| key to complete the change.
Now LIST the program and confirm that it appears as shown below.
1 0
A = 3
2 0
B = 8
3 0
C = 3 0 X A
4 0
P R I N T
C
5 0
E N D
To delete an entire line from a program, simply enter the line number of that line and press the |CR| key;
delete line 20 in this manner, then LIST the program to confirm that the line has been deleted.
We could insert the instruction "?A" between lines 30 and 40, by typing in 35_?A and pressing the
| CR[ key. Try this, then LIST the program to confirm that the line has been added. Now delete line 35 by
entering 35 and pressing the |CR| key.
The process of changing or inserting lines in a program in this manner is referred to as editing, and the
program which results from this process is referred to as the BASIC text. Each line of the program can
include a maximum of 255 characters, including the line number, but the maximum length is reduced
by four characters if the question mark is used to represent the PRINT instruction.
At this point, the program contained in the computer's memory should be as follows.
1 0
A = 3
3 0
C = 3 0 X A
4 0
P R I N T
C
5 0
E N D
Now we will use this program to explain the procedures for recording programs on cassette tape.
Prepare a blank cassette tape (one on which nothing has been recorded) and set it in the data recorder,
19

Advertisement

Table of Contents
loading

Table of Contents