Sharp MZ-700 Series User manual

Personal Computer
lllZ·LlrnJOD
OWNER'S MANUAL
SHARP

IMPORTANT
The wires in this mains lead are coloured in accordance
with
the
following
code:
BLUE:
BROWN: Neutral
Live
As the colours
of
the wires in the mains lead
of
this apparatus may
not
correspond
with
the coloured markings
identifying
the terminals in
your
plug proceed
as
follows,
The
wire
which
is
coloured
BLUE
must
be
connected
to
the
terminal
which
is
marked
with
the
letter
Nor
coloured black.
The
wire
which
is
coloured BROWN must
be
connected
to
the ter-
minal
which
is
marked
with
the
letter
L
or
coloured red.
This
apparatus
complies
with
requirements
of
EEC directive
76/889/EEC.
Das Geriit
stimmt
mit
den Bedingungen
der
EG-Richtlinien
76/889/EWG
i.iberein.
Cet
appareil
n!pond
aux specifications
de
la
directive CCE
76/889/CCE
.
Dit
apparaat
voldoet
aan de vereisten van EEG-reglementen
76/889/EEG
.
Apparatet
opfylder
kravene i EF
direktivet
76/889/EF.
Ouest'apparecchio
e
stato
prodotto
in
conformita
alle
direttive
CEE
76/889/CEE
.

Personal
Computer
111Z·
u>rnJrnJ
·
owner's
Manual
© SHARP CORPORATION

NOT.ICE
*~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~*
+ This manual has been written for the MZ-700 series personal computers and
the
t
t BASIC
interpreter
which
is
provided with
the
MZ-700. +
+ +
+ +
t
(1)
All system software
for
the MZ-700 series computers is supported in software t
t packs(cassette tape, etc.) in file form.
The
contents
of
all system software and
the
t
+ material presented in this manual are subject to change
without
prior notice +
t
for
the
purpose
of
product
improvement and
other
reasons, and care should be t
t taken
to
confirm
that
the file version
number
of
the system software used matches t
t
that
specified in this manual. t
+ +
t (2) All system software for the Sharp MZ-700 series personal
computer
has been t
t developed
by
the Sharp Corporation, and all rights
to
such software are reserved. t
4 Reproduction
of
the system software
or
the contents
of
this book is prohibited. 4
+ +
4 (3) This computer and the contents
of
this manual have been fully checked for 4
4 completeness and correctness prior
to
shipment; however,
if
you
should encoun- 4
t
ter
any problems during operation
or
have any questions which cannot be resolv- t
+ ed
by
reading this manual, please
do
not
hesitate
to
contact
your
Sharp dealer +
4
for
assistance. 4
t
Not
withstanding the foregoing, .note
that
the Sharp Corporation and its repre- t
4 sentatives will
not
assume responsibility for any losses
or
damages incurred
as
4
+ a result
of
operation
or
use
of
this equipment. · +
i~~~~~~~~~~+~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~i

Preface
---------------
--
Congratulations on
your
purchase
of
a Sharp MZ-700 series personal computer. Before using
your
computer, please read and make sure you understand the operating procedures which
are described in this manual.
The
features and general operating procedures are described in
Chapters 1 and 3,
so
please read those chapters first.
All software for the MZ-700 series computers
is
distributed on cassette tape.
The cassette tape included with the
computer
contains BASIC 1Z-013B, a high level BASIC
interpreter which enables programming in the BASIC language and makes
it
possible
to
utilize
the full capabilities
of
the MZ-700.
The
BASIC 1Z-013B interpreter and procedures for its use
are fully described in this manual.
TillS
FIGURE DRAWN USING THE COLOR PLOTTER-PRINTER

MZ-700 OWNER'S MANUAL
Chapter
1
The
world
of
MZ-700 Series Personal
Computer
1. 1
Features
of
the
MZ-700 Series . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 10
1. 2 Using this Manual . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 12
1.
3
An
Introduction
to
the
World
of
Computers
. . . . . . . . . . . . . . . . . . . . . . .
13
Chapter
2 BASIC
2.
1
Introduction
to
Programming in BASIC . . . . . . . . . . . . . . . . . . . . . . . . . . . 16
2. 2
An
Outline
of
BASIC . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
21
2. 3
Frequently
Used BASIC
Commands
and
Statements
. . . . . . . . . . . . . . . . . 28
2. 4
Buil~inFunction
....
.
..
......
.....
. . . . .
... ...
....
..
.
...
..
.
..
71
2. 5 String
Function
.
.........
......
. .
......
... ...
..
.
..
. . .
......
.
76
2. 6
Color
display
state
ment
. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
80
2. 7 Color Plotter-Printer
Commands
.......
..
,_
. . .
..........
...
..
.. ..
82
2. 8 Machine Language Program
Control
Statements
.....................
91
2.
9
I/0
Statements
.....
. .
.. .. ..
.................
.
.............
. . 95
2.
10
Other
Statements
. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
96
2.
11
Monitor
Function
. . . . . . . . . . . . . . . . . . . . . . . . . . . . ... . . . . . . . . . . . . . .
99
Chapter
3 Operating
the
MZ-700
3. 1 Appearance
of
the
MZ-
700
Series Personal
Computers
...
.
....
.
...
.
...
104
3. 2
Connection
to
Display
Unit
. .
.............
.
...
...
...
.
.......
..
.106
3. 3
Data
Recorder
.
..
.
............
.
....
..
....
.....
.
...
.....
.
...
.1
08
3. 4
Color
Plotter-Printer
....
.
.........
.
.....
.
....
. .
...
.
...
. .
......
110
3. 5 Key
Operation
..........
. . .
..
.
.................
.
...
.
.......
.114
Chapter
4 Hardware
4. 1
MZ-700
System Diagram . .·
......
..
.........
.
............
...
..
.122
4. 2 Memory configuration .
............
.
.........
.
....
..
.
...
. .
....
123
4. 3 Memory Mapped
I/0
($EOOO-$E008)
................
.
.....
.....
..
130
4. 4 Signal System
of
Color V-RAM .
...
...
....
...
.
..
...........
..
...
133
4. 5 MZ-700 Circuit Diagrams
.........
.
..
..
...
....
..
....
...........
134
Chapter
5
Monitor
Commands
and
Subroutines
5. 1
Monitor
Commands
.......
..
.......
. . . . .
.................
.
...
146
5. 2
Functions
and Use
of
Monitor
Commands
..
.
.....
.
......
..........
147
5. 3
Monitor
Subroutines
..
......
.. ..
...
....
...
...
.......
.
.....
.
..
151

APPENDICES
A.
A.
2
A.
3
A.
4
A. 5
A.
6
A.
7
Code Tables
0.
0 0 0 . 0 • • 0 0 .
0.
0
••
0 0 0 . 0
•••
0
...
0
••
0
••••
0
••
0 0
•••••
154
MZ-700 Series Computer Specifications
..
.
..
. .
..
........
.
......
. 157
BASIC Error Message List . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 159
Z80A Instruction
Set
. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 160
Monitor Program Assembly List . . . . . . . . . . . . . . . . . . . . . • . . . . . . . . . 164
Color Plotter-Printer Control Codes . . . . . . . . . . . . . . . . . . . . . . . . . . . . 198
Notes Concerning Operation 201

INDEX
[BASIC COMMANDS] ) is abbreviated
format
~
(!!)
ABS
.
..
.
..
.
......
..
...
..
.....
. . . .
71
HSET
.......
..
. .
..
...
.. ..
(H.) . . . . 88
ASC
.
......
. .
..
...
.....
...
..
......
78
ATN
..
...
.......
.
.....
...
.. ..
.
..
71
AUTO
.........
. .
.....
..
. (A.) . . . . 31 [!)
AXIS
..
. .
..
. .
...
........
(AX.) . . . . 89 IF
ERL
.......
...
.
..
....
. . .
.......
97
IF ERN . .
... ...
.........
..
...
.
...
96
IF~GOSUB
. . . . . . . . . . .
(IF~GOS
.
)
53
(ID
IF~GOTO
.....
.
..
.
....
.
(IF~G.)
.
...
53
BYE
....
. .
..
.....
.
...
.
...
(B.) . . . . 35
IF~THEN
. . . . . . . . . . . . .
(IF~TH.)
. . . . 50
INP . . .
..
.
...
. .
.....
.
.......
.
..
. . 95
(9
INPUT
........
..
....
.
...
..
(I.) . . . . 42
INPUT
/T
. .
..
...
......
.
..
(1./T) . . . . 68
CHR$ .
...
.
...
..
..
.
...
..
.....
.
....
78 INT .
..
.
.. .. ..
....
.
...
. . .
..
......
71
CIRCLE .
....
...
....
....
..
(Cl.) . . . . 90
CLOSE
...
....
.. ..
.
..
. . . (CLO.)
...
. 68
CLR
..
.
........
. .
......
.
....
. . . . . 59
COLOR .
......
. .
..
...
..
(COL.) . . . . 80
CONSOLE
..
.
...
......
. (CONS.) . . . .
98
CONT
..
.. ..
.
.. ..
...
...
..
(C.) . . . .
34
00
cos . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
71
KEY LIST
...
....
...
.....
(K. L.) . . . . 35
CURSOR . .
...
.
.......
...
(CU.) . . . .
61
@
~
DEF FN . .
.......
.. ..
...
..
.....
...
56 LEFT$
..
.
......
. . .
.. ..
...
.
...
....
77
DEF KEY . . .
.. .. ..
.......
..
.....
..
57 LEN
...
....
.
....
. . .
.....
.. ..
. .
...
76
DELETE .
.......
...
.
....
. . (D.)
...
.
31
LET
......
.
......
,
...
...........
.
36
DIM . .
.....
. . .
....
.....
...
....
..
. 56 LIMIT . . . . . . . . . . . . . . . . . (LIM.) . . . . 92
LINE
.........
....
......
.
........
85
LIST
..
.
..
. .
......
...
..
. . (L.) . . . . 32
(ID
LIST/P . . . . . . . . . . . . . . . . . (L. /P) . . . . 84
END . . . . . . . . . . . . . . . . . . . . (E.) . . . . 59
LN
. . . .
....
.
...
...
.... .... ....
. . .
71
EXP ....
...........
.
..
....
.
...
...
71
LOAD
........
.
..
.
......
(LO.) . . . . 28
LOG
.......
.
..
. .
......
..
........
71
(£]
FOR~NEXT
....
........
(F
.
~N
.
)
....
47
(MJ
GET .
..
..
.....
..
.......
.
........
. 43
GO
SUB
~RETURN
...
.
..
. .
(GOS.~RET.)
49
GOTO .
....
..
.
..
. . . .
..
...
(G.) 48
GPRINT
.......
.
..
.......
(GP.)
88
MERGE
...
.
...
.
.........
(ME.) 32
MID$ . . . . . . . . . . . . . . . . . . . . . . . 77
MODE
GR
.
....
.
..
.
....
(M. GR) . . . . 83
MODE
TL
. . . . . . . . . . . . . .
(M.
TL) . . . . 83
MODE TN . . . . . . . . . . . . . .
(M
. TN) . . . . 83
MODE TS
.............
. . (M. TS) . .. . . 83
MOVE
...
. . .
...
.. ..
...
. .
..
....
.
..
87
MUSIC . . . .
....
.
.........
(MU.) . . . . 65

~
NEW
....
.. ..
. .
...
. .
..
......
.
...
.
32
[Q)
ON
ERROR
GOTO
......
..
..
(ON
ERR.
G.) 96
ON-GOSUB
... ...
..
. .
(ON-GOS.)
55
ON-GOTO
.....
.
...
..
..
(ON-G.)
. . . .
54
OUT
..
. . . . .
...
.
...
....
.
..
. .
..
...
95
[E)
PAGE
.............
. . .
....
..
......
84
PAl
. . .
.....
...
......
. .
..
........
71
PCOLOR . . . . . . . . . . . . . . . . (PC.) . . . . 83
PEEK
......
.
.........
..
.
..
. .
.....
93
PHOME . .
..
.
..
..........
(PH.) . . . . 87
PLOT
OFF
..
.
.....
.
...
(PL.
OFF)
. . . .
98
PLOT ON
.....
.
..
. .
....
(PL. ON) . . . .
98
POKE
.........
..
.................
92
PRINT . . .
.....
. .
.........
. (?) . .
..
37
PRINT USING
...........
. (?USI.) . . . .
38
PRINT
/P
. . . . . . . . . . . . . . . . . (?/P) . . . .
84
PRINT
/T
. . . . . . . . . . . . . . . . (?
/T)
. . . .
68
PRINT
[a,
J3]
. . . . . . . . . . . (?
[a,
!3])
. . . .
81
@
RAD
.........
.
........
...
...
.
...
71
READ-DATA
.
.....
. . (REA.
-DA.)
....
44
REM
..
.
...
......
.
..
. . . .
.........
58
RENUM
....
.
.. ..
.......
(REN.) .
...
33
RESET
.......
...
..
.. ..
...........
63
RESTORE . . . . . . . . . . . . . . (RES.) . . . .
46
RESUME
....
....
..
....
(RESU.) . . . .
97
RIGHT$
..
......
........
..
.
.......
77
RUNE
...
...
..
. .
.......
.
(RL.)
. . . .
86
RMOVE
...
...
.....
. .
.. ..
(RM.) . . . .
87
RND
......
..
. . . ·.
..
.
..
.
...
. .
.. ..
. 72
ROPEN
..
.
..
.
...
.
...
..
..
(RO.)
....
68
RUN
..
.
..
.
......
.
...
..
. .
(R.)
. . . .
34
®
SAVE
..
.
.....
. .
......
...
(SA.)
....
29
SET
...
.
.....
.
.........
. .
...
. .
...
63
SGN
................
...
...
..
...
. .
71
SIN
...
.
....
..
.
..
.
..
....
..
.
71
SIZE
......
....
.
........
.
..
. . . . . . 97
SKIP
..
.
..........
...
. .
...
.
.....
. 84
SPC
...
..
. ·.
......
.
........
.....
..
62
SQR
...
.
......
. .
.. ..
. .
...
. .
.....
.
71
STOP
...........
...
..
....
(S.) . . . . 59
STR$
................
. . .
..
.
...
..
. 79
0
TAB
..........
..
. .
....
.
..........
62
TAN
......................
. .
...
.
71
TEMPO
..
. . .
...
....
..
. : (TEM.)
....
67
TEST . . . . . . . . . . . . . . . . . . . (TE.) . . . .
84
TI$
....
.
....
.
..
..
.......
.. ..
....
60
@)
USR
..
. .
..
.
.....
.
........
(U.) . . . . 93
~
VAL
.....
.
.......
. . . . .
.. ..
.....
. 79
VERIFY
.
....
...
..
.....
..
.
(V
.)
30
~
WOPEN
..................
(W.)
....
68


THE
WORLD-
OF
MZ-700
SERIES
PERSONAL
COMPUTER
.
-M
r-----
E
~
C>

1.
1 Features of the MZ-700 Series
In the space
of
just
a few decades, the
computer
has undergone a dramatic transformation, changing
from an intricate, enormously expensive monster weighing several dozen tons
into
a compact, inexpensive
device wp.ich can be used by almost anyone. Whereas access
to
computers used
to
be limited
to
a few
privileged individuals with special training, the inexpensive, user-friendly machines
now
available make
the world
of
computing open
to
people in all different walks
of
life. The Sharp MZ-700 series computers
are
representative
of
such machines.
People use words and expressions to convey meanings.
Computers
of
the Sharp
MZ
-700 series, however, convey meaning through an ordinary television set
or
special printer.
Any
TV set can be used, either color
or
black-and-white; or,
you
may invest in one
of
the special display screens available
if
you
want greater resolution and sharpness;
you
will be surprised
at the beauty which
is
provided
by
such displays.
A tape recorder can be connected
to
computers
of
the Sharp MZ-700 series
to
record programs, the
instructions which control the operation
of
the computer. When printed records
of
such programs
or
of
the results
of
computer processing are desired,
they
can be obtained
on
the MZ-700's compact, elegantly
designed 4-color plotter-printer.
MZ-731
Note: In the remainder
of
this manual, the term "MZ-700" will be used
to
indicate any
of
the computers
of
the MZ-700 series (the MZ-711, MZ-721, and MZ-731).
10--
------
--
--------------
----------------
----
--
--------
----
--
---------

MZ-721
MZ-711
11

1.
2
Using
this Manual
Before starting to study programming, why
not
try playing with the MZ-700 a bit? We're sure
you
want
to
do
that
anyway, rather than waiting until after
you
have read this book. First, read "Operating
the MZ-700" in Chapter 3 (you need read only those parts which apply to the model which
you
are us-
ing). Connect the MZ-700
to
a television, read the explanation
of
procedures
for
using the keyboard,
and
learn which characters are
output
when each key is pressed.
If
you
are using the
MZ-
700 for the first time, read Chapters 1 and 2, in
that
order.
At
first,
you
may
find
it
difficult
to
grasp the meanings
of
the various commands and statements
of
the BASIC programming
language; however, even
if
you
don't
understand the explanations, be sure
to
key in the examples
as
they are encountered.
As
you
do
so,
you
will gradually develop a concept
of
what BASIC
is
all about.
You
may
skip over those portions
of
Chapter 2 which start with
2.
8 "Machine Language Program
Control Statements"; however, these sections will prove useful when
you
have completely mastered
programming in BASIC,
or
wish
to
become more familiar with
the
computer's internal operation.
If
you
have used the MZ-80K,
you
will find
that
the commands and statements
of
BASIC for the
MZ-700 are used in the same manner
as
those
of
the SP-5025 family, so
that
the MZ-700 can be used
in almost exactly the same
manner
as
the MZ-80K. The major difference between the two
is
in
the
color
statements (applicable
to
both
the
television screen and the color plotter-printer) which have been added;
however,
you
should find
it
easy
to
become familiar with these
by
reading sections
2.
6 "Color display
statement"
and
2.
7
"Color
Plotter-printer Commands." Having done this,
you
will quickly be captivated
by the power
of
expanded BASIC.
This manual also includes a discussion
of
"Operating the MZ-700" (Chapter 3), a reference section
entitled "Hardware" (Chapter 4), a discussion
of
the
"Monitor
Commands and Subroutines" (Chapter 5),
and appendices
of
other
information.
Now go ahead and learn everything
you
can
about
the MZ-700.
We
hope
that
you
will find this manual
helpful.
12--
--
--------------------------------------------------~------------------

1. 3 An Introduction to the World
of
Computers
1.3.1 What
is
BASIC?
People use language
to
communicate with each other, and specially designed languages are also used for
communication with computers. BASIC
is
one such language.
Beginner's All-purpose Symbolic Instruction Code
Just
as
human beings use languages such
as
English, French, German, and Japanese for communication,
there are also many different languages which are used for communication with computers. Among these
are BASIC, FORTRAN, COBOL, and PASCAL.
Of
these, BASIC is the
computer
language whose struc-
ture
is
closest to
that
of
the
languages used by humans, and therefore
is
the
easiest for humans
to
under-
stand.
1.3.2 Loading BASIC into the MZ-700
The BASIC language
must
be loaded
into
the MZ-700 before
it
can be used
to
do any work. A cassette
tape containing this language has been included in
the
case containing
the
MZ-700. Now let's teach
the
language
to
the computer; procedures for doing this are described below. (The explanation assumes
that
you
are using an MZ-731; however,
the
procedures are basically
the
same for all computers
of
the
MZ-
700
series.)
(I)
Connect the display
as
described on page I06.
(2)
Turn
on
the power switch located on the back
of
the computer.
(3)
The followil}g characters are displayed on the screen and a square, blinking
pattern
appears. This
pattern
is
referred
to
as
the cursor.
**
MONITOR
1Z-
0
13A
**
*
:::::
t
'---- Cursor
(
4)
Set the cassette tape
cont~ining
the
BASIC
h;mguage
in the computer's data recorder.
* I
*2
(5)
Type in the word
[][Q]!AJ[Q]
and press the I
CRI
key.
After
doing this, the message
..!.
PLAY appears
on
the
screen.
(6)
Press the data recorder's I PLAY I
button;
the cassette tape starts moving and loading
of
the BASIC
language begins.
(7)
After
loading has been completed, the message READY is displayed and the cursor starts
to
blink again.
Notes:
*1
[][Q]!AJ[Q]
. . . This
is
the
instruction
for
loading programs
or
data from cassette tape.
* 2 I
CRI.
.
..
. . . This
is
referred
to
as
the carriage return key, and
is
mainly used
to
indicate comple-
tion
of
entry
of
an instruction.
------
~----~------
------------
-----------------------------------13

.
~*
MIINITOR
1l·OUA~:tc
*
l..OAD
.!.
PL.AY
LZJAOING
\
BASIC
BASIC
INTER~R
U-Ol38
VX
.
)(X
COfYRl"HT
lq83
BY
SHARP
CORP
xxxxx
S'(TE.S
.
READY
'"
ril!l
This completes loading
of
the BASIC program. You can talk
to
the
computer
using BASIC, and the
computer will respond.
1
.3.3
Try Executing a Program
Loading BASIC
into
the
computer
doesn't cause
it
to
do anything; first,
it
must
be given instructions
in BASIC
as
to
what
it
is
to
do. Although
we
will
not
explain
the
instructions
of
BASIC until later, let's
go ahead and
try
executing a BASIC program right now.
Remove the cassette tape from the recorder and turn
it
over so
that
the "B" side
is
up. A sample
program
is
recorded
on
this side
of
the cassette tape. Using the following procedures, load this program
into
the
computer
and execute it.
(1)
After
turning the tape over and reloading
it
into
the recorder, press the REWIND
button
to
rewind it.
Next
, type in
[Q[Q][AJIQ)
and press the I
CRI
key; when the message .!. PLAY
is
display·
ed, press the I
PLAY
I
button
on the data recorder. This begins loading
of
the sample program.
(2) When loading
is
completed, the cassette tape stops, READY
is
displayed on the screen, and the
cursor starts
to
blink again.
(3)
Now
that
the program has been loaded
into
the computer's memory,
try
executing it. This
is
done
by typing in
[B][!l)~
and pressing
the
I
CRI
key.
(4)
Now let's take a peek
at
the program. Hold down the I SHIFT I key and press the I BREAK I
key. This stops program execution and displays the words BREAK and READY, then the cursor
starts
to
blink again.
(5)
Type
in
[11[][§][!]
and press the ICRI key. This lists the lines
of
the program
on
the screen one
after another.
(Output
of
the list can be temporarily stopped at any time
by
pressing the space
bar.)
(6) If
you
wish to resume program execution,
type
in
[B][!l)~
again and
hit
the I
CR
Ikey.
(7)
If
you
want
to
run a different program, set the cassette tape containing
that
program in the
recorder, LOAD the program, then RUN it. The previous program is automatically erased from
memory when the new one
is
loaded,
so
the
computer
contains only
the
BASIC language and
the last program loaded.
14--------------
--
--------
--
--------
----
------
---------------------------

BASIC
BASIC

2.
1 Introduction to Programming
in
BASIC
2.1.1
Direct Mode
Now
that
you
have made some key entries on the MZ-700,
you
have reached the
point
where
you
are ready
to
start learning
how
to
program. Before
you
start, however, try using the
MZ
-
700
as
you
would an ordinary
pocket
calculator. (This
is
called operating the MZ-700 in the
"direct
mode"
.) Key
in
the
following,
just
as
you
would on a
pocket
calculator.
As
you
can see, the
computer
doesn't do anything when
it
is
presented with a problem in this form;
your
computer
and an ordinary calculator are completely different in this respect, and instructions
must
be entered in a form which can be understood
by
the
computer
(i.e, in
the
form prescribed
by
the BASIC
language). Now
try
typing in
the
following.
If
you
have done this correctly, the
number
"13"
will be displayed and the screen will appear
as
shown
below.
READY
PRINT
4+9
1 3
READY
PRINT
is an instruction which tells
the
computer
to
display
something
on
the screen. Here,
the
computer
is instructed
to
display the sum
of
4 +
9.
Now let's
try
doing a somewhat more complex calculation.
With BASIC
for
the
MZ
-700,
the
operators (symbols) for the basic arithmetic operations are
as
follows.
Addition: +
Subtraction:
Multiplication: *
Division: /
Exponentiation: t
(the
asterisk)
(the
slash)
When symbols such a " *
",
"+
",
and " t " are mixed together in a single arithmetic expression,
the order in which calculations indicated
by
the symbols are performed
is
referred
to
as
their priority.
Just
as
with ordinary algebra, operations can be included in parentheses, so operations within the inner-
most
set
of
parentheses are performed first. Within a set
of
parentheses, exponentiation
is
performed
first, followed
by
multiplication and division (which have equal priority, and therefore are performed
as
they are encountered in the expression, from left
to
right), and
then
by
addition and subtraction.
For
example,
to
obtain the answer
to
the expression 3 x 6 x (6 + 3 x
19-
2 x
(4-
2) +
If
J,
enter
the
following.
Now
try
using the
computer
to
do
a variety
of
other
problems in arithmetic.
16
------------------------------------------------------
--------
--
-------

[EXERCISE]
1
6+4
. 6
-4
2.
3X
15+9X
(9
-2
)
3.
(
3+4)
X
C5+6)
4.
10
~
20
X
C2
+3)
10+20
5·
6X
C
2+3
)
6
4-2
1
+5
[ANSWER]
PRIN
T (
6+4
)/(6
-4
)
5
PRINT
3::tC5+9::t
C
9-2)-6
/C4
-2
)}
+5
200
PRINT
C3
+4
)::t
C5
+6
)
77
PRINT
C1
0+20)
/
6.:KC2+3)
25
PRI
NT
C1
0+20)
/
C6::tC2+3))
1
After
going through the exercises, try typing in
[]~[!][§]
and pressing the I
CRI
key; the answer
"40"
is
displayed.
The
reason for this is
that
BASIC interprets the question mark in
the
same manner as
the
instruction PRINT. Remember this
as
a convenient, abbreviated form
of
the PRINT instruction.
Now try entering the following. (The
quotation
marks are entered by holding down I SHIFT Iand
pressing
the
[1]
key.)
IBIBJ[O!NJITJ[ij@J[±]IBJEJ[ij
Ic
RI
As
you
can see, the characters within
quotation
marks are displayed
on
the screen,
but
the answer
is
not.
Now
try
entering the following.
This causes ABCDEFG
to
be displayed
on
the screen.
In
other
words, using the PRINT instruction together with
quotation
marks tells the MZ-700 to display
characters
on
the screen exactly
as
they are specified between
quotation
marks. The characters within
any set
of
quotation
marks are referred
to
as
a "character string"
or
"string".
Now go
on
to
enter
the following.
This causes the following to be displayed
on
the
screen.
4+
9=
'-' 1 3
......
.
........
(The
"'-'"
symbol indicates a space. Actually, nothing
is
display-
ed
on
the
TV
screen in the position indicated
by
this symbol.)
In
other
words, the instruction above tells the
computer
to display
both
the character string
"4
+ 9
="
and the result
of
the arithmetic expression
11
4 + 9 =
11
• Now
try
entering the following.
After typing in this entry, the following should be displayed on the screen.
The
reason
the
screen appears different this time
is
because
the
PRINT instruction displays items
of
information (character strings
or
the
results
of
arithmetic expressions) differently depending
on
whether
they are separated from each
other
by
semicolons
or
commas.
Semicolon ( ; )
......
Instructs
the
computer
to display items immediately adjacent
to
each other.
Comma ( , )
........
Instructs the
computer
to display the item
at
the position which
is
10
spaces (columns) from the beginning
of
the display line.
--------------------------------------------
----
--~-------------------------17

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=61
CRI
....
. .
...
. . .
...
. . .
...
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 leftend
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--------------------
------
----------------------------------
-------
Other manuals for MZ-700 Series
3
Table of contents
Other Sharp Desktop manuals

Sharp
Sharp MZ-800 User manual

Sharp
Sharp MZ-700 Series User manual

Sharp
Sharp PC-7200 User manual

Sharp
Sharp PC-6220 User manual

Sharp
Sharp SCR3042FB User manual

Sharp
Sharp MZ-700 Series Installation guide

Sharp
Sharp MZ-80A User manual

Sharp
Sharp ZQ-4450M User manual

Sharp
Sharp Mobilon HC-4000 User manual

Sharp
Sharp MZ-80B Installation guide

Sharp
Sharp PN-L602B User manual

Sharp
Sharp MZ-3500 User manual

Sharp
Sharp MZ-3500 User manual

Sharp
Sharp PC-1500A User manual

Sharp
Sharp CE-159 User manual

Sharp
Sharp MZ-80B User manual

Sharp
Sharp MZ-3500 Instruction manual

Sharp
Sharp YO-250M User manual

Sharp
Sharp MZ-700 Series User manual

Sharp
Sharp MZ-800 User manual