Sharp MZ-700 Owner's Manual page 20

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

Advertisement

If
you have the MZ-731 (or a separate plotter-printer), now try appending the characters 1/PJ to the
end of the word PRINT.
This time nothing appears on the display
screen,
but the same result is printed out on the plotter-printer.
In
other
words, the I
/PJ
symbols switch output from the display to the plotter-printer:
This completes our explanation of procedures for using the MZ-700 as you would a pocket calculator.
Note: PRINT
11
5 + 8
=
11
;
5 + 8 displays 5
+
8
=
13, while PRINT
11
5
-
8
=
11
;
5- 8 displays 5- 8
=
-3.
The reason for this is that o·ne space is always reserved for
a
symbol indicating whether the result is
positive or negative, but the symbol is only displayed in that space when the result is negative.
2.1.2 Programming
Let's try making a simple
program.
However, first let's make sure that the area in the computer's
memory which is used for storing programs is completely empty. Do this by typing in NEW and pressing
theiCRikey. (This instruction will be explained in more detail later; see page 32.)
Type in the following program exactly as shown.
1
0
A=31CRI
...
..
....
.
...
.
.......
Assigns the value 3 to A.
20
8=61CRI
....
.
.
...
.
.
.
...
.
.
.
...
Assigns the value 6 to
B.
30 C=A+BICRI
.
.
.
.
.....
...
.
.
.... Assigns the result of A+ B to C.
40
9
CICRI ............
.
..
.
...
.
.
Displays the value assigned to
C.
·
5
0
END
le RI
.
.
. .
.
.
. . . . .
.
.
.
.
. . .
.
.
.
Instruction indicating the end of the program.
The numbers 10, 20, 30, and so forth at the left end of each
line
are referred to as program line numbers,
or simply line numbers; these numbers indicate the order in which instructions are to be executed by the
computer. Instructions on the lowest numbered line are executed first, followed by those on the next
lowest numbered line, and so forth. Line numbers must be integers in the range from 1 to 65535.
The line numbers 1, 2, 3, and so
forth
could have been used
in
this program instead of 10, 20, 30.
However, it is common practice to assign line numbers in increments of 10 to provide room for later
insertion of other
lines.
Now let's check whether the lines have been correctly entered. Type in LIST and press the
I
CRI
key;
this causes a list of the program lines to be displayed. Notice that the question mark entered at the beginn-
ing of line 40 has been converted to PRINT, the full form of the command for displaying
data
on the
display screen.
18-------------------------------------------------------------------

Hide quick links:

Advertisement

Table of Contents
loading

Table of Contents