Sharp MZ-700 Series Installation guide

r::
r::
r::
r:::
r:::
r:::
r:::
r:::
r:::
r:::
-
• -
-
1
Personal Computer
IIIZ
-
b'illHID
DISK BASIC MANUAL
SHARP

DISK BASIC
Manual

Introductory Note
This manual
is
based upon the DISK BASIC Interpreter MZ-2Z009, the system
software of the MZ-700 personal computer.
(1) The DISK BASIC interpreter MZ-2Z009 includes all commands
of
the
MZ-700 BASIC 1Z-013B. In
other
words, the DISK BASIC
is
an expansion
of
the BASIC 1Z-013B.
(2) For the multi-purpose MZ-700 personal computer, the system software
is
completely supported by a software pack (cassette tape, floppy disk, etc.) in
the
file
form.
This system software and the contents
of
this manual are subject to upgrading
changes for improvement, and for that reason the user
is
urged to particularly
note the file version number. Please understand that
we
cannot be responsible
for damage incurred during,
or
as a result
of
operation.
(3) All system software for the MZ-700 series personal computer
is
original
software of
SHARP
Corporation, and
is
covered by applicable copyrights. The
copying
or
reproduction
of
this software and/or this manual and its contents, in
whole
or
in part, and by whatever means and for whatever reason,
is
expressly
forbidden without the written permission by
SHARP
Corporation.

Introduction
We want to take this opportunity to thank you for purchasing the Sharp DISK BASIC
system software.
The manual provides a general explanation
of
the use and programming of the DISK
BASIC system software for the personal computer.
This system software
is
provided in the floppy disk format, and careful attention
should be given to the proper use and handling of the disk drive and the disks
themselves. Please refer to page
108
of
this manual for information regarding the
proper handling
of
the floppy disks.
When the floppy disk
is
to be used, it
is
recommended that the disk, a copy which
is
packed together with the original master disk (DISK BASIC), be used instead of the
master disk. This
is
for protection
of
the master disk in the event of some unexpected
trouble which might make the master disk useless. Please store the master disk in a
safe place.
Before using the DISK BASIC please carefully and completely read this manual in
order to assure its correct use.

• Difference between the
CASSETTE
TAPE
BASIC
and
DISK
BASIC.
The following commands are extended and supplemented in the difference between
the CASSETIE TAPE BASIC and DISK BASIC.
Extension Page Supplement Page Supplement Page
RUN
.......................
36
DIR
........................
35
XOR
.......................
65
LOAD
.....................
37 LOCK
.....................
40
N()T
.......................
65
SAVE
......................
38 UNLOCK
................
41
OR
.........................
65
DELETE
.................
39
RENAME
................
42
AND
.......................
65
MERGE
..................
43
CHAIN
...................
44
ROPEN #
................
46
SWAP
.....................
45
INPUT #
.................
47
XOPEN #
................
50
WOPEN #
...............
48
KILL #
....................
54
PRINT#
.................
49
DEFAULT
...............
55
INPUT # ( )
...........
51
EOF#
....................
56
PRINT # ( ) ...........
52
LABEL
...................
57
CLOSE #
................
53
WAIT
......................
58
USR
.......................
62
SEARCH
.................
59
INP@
.....................
63
INIT
........................
60
OUT@
...................
64
In
addition to the above, there are the following differences:
CASSETIE
TAPE
BASIC DISK BASIC
If
the space key
is
pressed, the LIST Once the space key
is
pressed, the LIST
display stops, and if it
is
not pressed, display stops, and, if it
is
pressed for a
the LIST display continues. second time, the LIST display con-
tinues.
Relative to the data file, the CASSET- Relative to the data file, the DISK
TE TAPE BASIC takes the format BASIC takes the format INPUT
#n,
INPUTrr, etc. etc
....
If,
for any reason, the program execu-
If
CONT
is
possible, Ready
is
dis-
tion
is
interrupted, Ready
is
always played.
displayed.

CAS·SETTE
TAPE
BASIC DISK BASIC
CONT
is
possible after execution
of
CONT
is
not possible after execution
of
END statement. END statement.
IcrRLI
+
I]]
has not effect.
IcrRLI
+
I]]
initialize the color and con-
sole,
aaQ
il!iIlIilW~iI
PbS:;r
8~.
Neglects space between reserved words; Does not neglect space between re-
considers
GO~TO~lO
as
GOTO~
10.
served words.
Does not consider
GO~TO~lO
as
GOTO~lO.
Compared to the CASSETI'E
TAPE
BASIC, the user area
of
DISK BASIC
is
slightly reduced so there are some instances in which a program made in
CASSETTE
TAPE
BASIC cannot be read in (LOAD) and executed
(RUN,
GOTO).
Because
of
extension, there are some instances that programs using BASIC
MONITOR with the USR function do not operate normally.The introduction
of
file descriptor changes the error display partially.
• Notes concerning
the
control of
the
floppy disk
drive in
MZ-
700
• System composition
t:J-
Display CPU MZ-700
• Can be controlled also by MZ-700 by setting up the ROM explained on the next
page.

• Increase of floppy
'disk
interface-
ROM
•
Floppy
disk
drive
control
ROM
If
the DISK BASIC controls the floppy disk drive (MZ-1F02), connect the ROM chip
(see below) which
is
packed together with the DISK BASIC to the socket of the
floppy disk interface (MZ-IEOS: optional).
If
this ROM
is
not connected to the floppy
disk interface, the floppy disk drive cannot be controlled.
Note the following points when connecting the ROM to the interface:
• Take care not to drop, scratch or otherwise damage the ROM. Do not expose it to
a strong magnetic field.
• Take special care not to break
or
bend the pins of the ROM.
• Before pressing the ROM into the socket, be sure that its pins are correctly aligned
with the socket holes.
Be sure that the notches in the ROM and socket match each other before pressing
the ROM in.
Do not remove the seal attached to the ROM.
• Do not touch the pin of the ROM, because static electricity may destroy the ROM
contents.
Seal
N_-ctn

Contents
What
the DISK BASIC
is
....................................................................
:.......
10
Section
1:
DISK BASIC Outline
.................................................................
13
1.1 Starting the DISK BASIC
.................................................................
14
1.2 How to Copy the DISK BASIC
.........................................................
15
1.3 File Control
...................................................................................
17
1.4 Sequential Access File Control
..........................................................
18
1.5
Random Access File Control
.............................................................
23
1.6
PROGRAM
CHAIN (CHAIN)
.........................................................
26
1.7
PROGRAM
SWAP (SWAP)
............................................................
27
1.8 Reserved Words
.............................................................................
28
1.9 List
of
File Input/Output Devices
.....................................................
31
1.10 Initial Settings
................................................................................
31
Section 2: DISK BASIC Expansion,
New
Commands and Statements
...........
33
DIR
........................................................................................................
35
RUN
.......................................................................................................
36
LOAD
....................................................................................................
37
SAVE
.....................................................................................................
38
DELETE
.................................................................................................
39
LOCK
.....................................................................................................
40
UNLOCK
................................................................................................
41
RENAME
...............................................................................................
42
MERGE
..................................................................................................
43
CHAIN
...................................................................................................
44
SWAP
.....................................................................................................
45
ROPEN #
...............................................................................................
46
INPUT #
.................................................................................................
47
WOPEN #
...............................................................................................
48
PRINT #
.................................................................................................
49
XOPEN #
...............................................................................................
50
INPUT # ( )
........................................................................................
51
PRINT # ( )
...........................................................................................
52

CLOSE #
................................................................................................
53
KILL #
...................................................
:
...............................................
54
DEFAULT
..............................................................................................
55
EOF(#)
..................................................................................................
56
LABEL
...................................................................................................
57
WAIT
.....................................................................................................
58
SEARCH
................................................................................................
59
INIT
........................................................................................................
60
USR
......................................................................................................
62
INP@
.....................................................................................................
63
OUT@
................................................................................................
64
Logical Operation
......................................................................................
65
Section
3:
BASIC Monitor Functions
.........................................................
67
3.1
Editing Format
.............................................................................
68
3.2 Printer Switch (P Command)
...........................................................
68
3.3 DUMP (D Command)
...................................................................
69
3.4 MEMORY SET (M Command)
.......................................................
69
3.5 FIND (F Command)
........................................................................
70
3.6 GOSUB (G Command)
...................................................................
70
3.7 TRANSFER (T Command)
..............................................................
70
3.8 SAVE
(S
Command)
.......................................................................
70
3.9 LOAD (L Command)
......................................................................
71
3.10 VERIFY (V Command)
...................................................................
71
3.11
RETURN (R Command)
.................................................................
71
Section
4:
Application Programs
.............................................................
73
Use of the File Converter
..........................................................................
74
Section
5:
DISK BASIC Summary
..............................................................
81
5.1
Summary of DISK BASIC Commands, Statements, Functions and
Operations
....................................................................................
82
5.1.1 Commands
....................................................................................
82
5.1.2 File control statements
.....................................................................
84
5.1.3 BSD control statements
....................................................................
86

5.1.4 BRD control statements
...................................................................
87
5.1.5 Error processing statements
..............................................................
88
5.1.6 Substitution statements
....................................................................
89
5.1.7 Input/output and color control statements
............................................
89
5.1.8 Loop statements
..........................................................................
:..
91
5.1.9 Branch statements
...........................................................................
92
5.1.10 Definition statements
.......................................................................
93
5.1.11 Comment statements and control statements
.......................................
94
5.1.12 Music control statements
..................................................................
95
5.1.13 Machine language program control statements
......................................
96
5.1.14 Printer control statements
.................................................................
97
5.1.15 String control function
...................................................................
100
5.1.16 Tab function
................................................................................
101
5.1.17 Arithmetic operators
.....................................................................
101
5.1.18 Comparison logic operators
.............................................................
101
5.1.19 Other symbols
..............................................................................
102
•
5.2 Error Message List (DISK BASIC)
.................................................
104
5.3 Memory
Map........................................................
.....................
107
5.4 Use of the Floppy Disk
..................................................................
108

10
What the
DISK
BASIC
is
The DISK BASIC has a strong
file
control function relative to the cassette base
. BASIC. For example, it makes the most of the features of a disk base which has
high-speed read-outlwrite-in capabilities, and, more than simply serving for data
storage, the
file
makes it possible to use the data area directly connected to the
computer system.
Moreover, because this DISK BASIC also includes the control functions related to the
RS-232C
interface, it makes
it
possible to control various devices, by using the
MZ-SBI03
serial interface (optional).
Thus, it can be said that the DISK BASIC
is
a new system software which permits the
expansion of the software range of the personal computer.
By
understanding this DISK BASIC and making full use of its many functions, the
user can create a higher level system.
• File
The computer can exchange data and programs between peripheral devices (floppy
disk, cassette recorder, printer, etc.). The units of these data and programs are called
files.
• File cl.ssificatlon
There are two types of files: data files and program files.
1
Data files ..... These files store numbers, characters, etc.
as
data.
(BASIC sequential access data files .....
BSD)
Files BASIC random access data files ..... BRD
Program files ..... These files store programs just
as
they are.
(BASIC text programs ..... BTX )
Machine language programs ..... OBJ
Computer systems can be thought of as either of two fundamental types of systems:
logical internal systems composed of data-processing equipment and main memories,
and external filing systems composed of processed data and program banks.

11
• Data file control
There are two types of data files, depending upon the format offile access (the method
of data read-out and write-in). One is called the sequential access
file
and the other
is
called the random access file.
With the sequential access file, the file data access
is
treated as one sequential block.
The
file
name
is
specified for one group of data, and such data are accessed
in
order
from the heading at the time of registration
or
read-out of the file.
For the random access file on the other hand, the filed data are accessed at random.
One random access file is composed of one data group designated
by
its own
file
name. Each group of data
is
registered
in
the
file
in
a parallel arrangement, and
write-in and read-out of each data group
is
possible
by
using the number (expression)
assigned to that data.
If,
for example, a collection of certain data can be handled
as
a connected group (such
as, for example, data consisting ofa series ofdecimal expressions used when producing
machine language programs by BASIC POKE command and elements of tables that
can be presented in order from the heading, etc.), collection of such data
in
a
sequential access
file
can be useful and effective. The registration of data
in
a random
access file, on the other hand, can be useful when it
is
necessary to not only consider
the group of overall data but to read-out and/or write-in each element (when it
is
necessary, for example, to rewrite data or to search, arrange, delete, etc.).

12
• Program file control
The BASIC program file control commands CHAIN (page 44) and SWAP (page 45)
are for read-out of another program in the memory during the execution of one
program and moving the control to that program.
As shown in the figure below, CHAIN has the same function as the
<goto
"filename">. (For detailed information, please refer to page 26.)
file
"ABC" file "DEF"
10
PRINT "MZ-700"
,.-
10
PRINT "DISK BASIC"
20
20
, ,
,
,
100
CHAIN "DEF" -
100
END
CHAIN
SWAP has the same function as the <gosub "filename">. After execution of
movement from the currently executing program to a separate program, it
is
then
possible to return to the first program. (For detailed information, refer to page 27.)
file
"GHI" file "JKL"
10
PRINT "MZ-700"
,---
10
INPUT A, B
20
!
20
FOR
A=B
TO
A*B
50
SWAP "JKL"
f---
,
IL-
i
200
END
150
END
SWAP
In addition it
is
also possible to control the various files as utility programs files and
commands of the machine language program files.

Section 1
DISK BASIC OUTLINE
This section explains the features
of
the DISK BASIC and outlines the file
controls. First
of
all
is
an explanation
of
the DISK BASIC starting method.
Section 2 includes a syntax explanation
of
the new commands and statements
which the DISK BASIC has, and Section 5 includes a summary
of
all commands,
statements, functions and operations which it has.

14
1.1
Starting the DISK
BASIC
To make the DISK BASIC run, first perform initial loading by the IPL (Initial
Program Loader). The initial loading
is
easily executed. With the floppy disk drive
connected to the computer, switch the power supply ON and then set the disk in which
the DISK BASIC
is
included to drive number 1
(FDl).
After making the setting, the DISK BASIC
will
start when the power supply of the
computer
is
switched ON and F
is
input.
The figure below shows that DISK BASIC
is
started, and the BASIC command level
condition
is
indicated by the flashing of the cursor.
Disk
Basic
Co
p y
rig
ht
nt
er
pr
et
er
MZ-
XXXXX
VX.
XX
(C)
1984
by
SHARP
Corp.
XXXXX
bytes
free
Note:
Ready
•
Please specify the default device
as
a cassette during write-in or read-in of a program
from a cassette tape, thus starting the DISK BASIC.
DEFAULT
"CMT:"
(Refer to page 55.)
• Automatic execution of BASIC
text
AUTO RUN
The execution of AUTO RUN
is
included in the functions noted above. When the
DISK BASIC
is
loadeQ and the byte size which indicates the size of the text area
is
displayed, the master disk
is
accessed once again. When the initial loading finished,
the DISK BASIC automatically executes the RUN"
AUTO
RUN
n command, Le., the
program text with the "AUTO RUN"
file
name
is
read out from the same master disk,
and execution
is
from that heading. The program which defines the definable function
•

15
,
key
is
registered by this file name on the supported master disk.
In addition, because the NEW command
is
at the end of this program,
"READY"
is
displayed after execution, and the text
is
erased before the cursor begins flashing.
(Here, try the execution of
LOAD
"AUTO
RUN"
and check the list.)
If
you want to start a certain program after the start of the DISK BASIC, the file
name
of
that program should be saved on the master disk as
"AUTO
RUN."
1.2 How to Copy the Disk
Basic
Start the DISK BASIC and prepare a new floppy disk for copying.
Execute the directory
of
DISK BASIC (DIR: refer to page 35) and "FDCOPY".
01 R
"F
0 1 : "
ICRI
.........
Perform the directory
of
floppy disk drive number
1.
The screen becomes
as
follows when this com-
mand
is
executed:
OIR
"F01:"
01
RECTORY
OF
F01:
XXKB
FREE.
OBJ*"OISK
BASIS
Ul
XXX)H(
i:)e.\'\.;'t>~.
-IIIOBJ
*
"F
OCOPY"
I
iOBJ*
"TRANS"
r--J
BTX*
"AUTO
RUN"
I1
Ready
L_III
• Using the
ill
key, move the cursor to the position of the -sign and press the
~
key.
(RUN
"FOCOPY")
When "FDCOPY"
is
executed, the screen becomes as follows.

16
FD
For
mat
I
Copy
Ut
i
lit
Y
VX.
xx
[
Funct
i
on
I
F
For
mat
d i s k
C
Copy
d i s k
I
Bo
ot
[
Co
mma n d
are
a I
*-
Insert the floppy disk prepared into drive number
2.
When "F"
is
pressed, the screen
becomes
as
follows and the drive number
is
asked, so specify number
2.
*F
..............................
..
Drive
No.?2
OKI
Input the drive number. In this instance, the drive
number
is
2.
When the drive number
is
input, the
floppy disk in this drive
is
initialized.
*_
.. ...... .... ..
..
.
..
..
.. ..
.
..
.
..
..
Indicates the end of floppy disk initialization and
the waiting condition for the next command.
If
there
is
SYSTEM software in the floppy disk inserted into the floppy disk drive, the
display
is
as
follows and confirmation
is
asked.
This
is
Master-Disk
For
ma t
[Y
I
NI?
N The meaning
of
display
is
as follows:
The floppy disk inserted into the
1>pecified
drive
contains the SYSTEM software;
is
initialization
and erasure OK?
If
it's OK, input Y; if it's not OK, input N.

17
*111....................................
If
N
is
input, changes to the condition of awaiting
the next command, and, if Y
is
input, the floppy
disk
is
initialized and changes to the condition of
awaiting the next command.
If
C
is
input, the screen becomes as follows:
*C
.............................
Copies the entire floppy disk.
Source
Drive
NO.?1
............
Specifies the drive of the inserted source disk (original
disk) (drive number 1, in this instance).
De
s t n a t
ion
Dr i
ve
No.?
2
...........
" Specifies the drive
of
the inserted destination disk
(new disk) (drive number 2, in this instance).
*III
..............................
Indicates the end of the entire floppy disk copying and
awaiting the next command.
Then the copying of the DISK BASIC
is
finished. The DISK BASIC
is
started when
" ! "
is
input.
Note:
If
the source drive and the destination drive are the same, refer to REFERENCE
(page 78).
1.3
File
Control
There are, as mentioned in the "File" section, 3 types
of
files produced by the DISK
BASIC: the 2 types
of
data files, sequential access files (BSD) and random access files
(BRD), and the BASIC text (BTX) program files. The other type
of
file: the machine
language program files (OBJ),
is
a file which registers programs prepared in the
MONITOR mode, etc. on the floppy disk. This can be a program by itself
or
it can be
linked to a BASIC text as a BASIC machine language area. Thus, even though it can
be used with the DISK BASIC, it
is
not a
file
to prepare and to change its contents
with the DISK BASIC.

18
DISK BASIC
Sequential Access File }
data file
BASIC Text Files }
L
..
__
--:---r-------. program file.
_ Machine Language
Program Files
As
the various
file
control commands are explained, first the preparation method, the
use, and the features of the 2 types of data files
will
be explained, followed
by
an
explanation of the use of the CHAIN and SWAP commands of the program files.
1.4 Sequential
Access
File Control
Sequential access files are data files
in
which the registration or read-out of data
is
in
the sequential access format. The sequential access format is,
as
mentioned previously,
a format
in
which
access to the data
is
in sequential order from the heading.
The method of making a data
file
on a cassette
file
has already been explained
in
the
BASIC manual for the MZ-IZ013B. Sequential access for the DISK BASIC
is
exactly
the same except that the
file
is
made on the disk rather than a cassette. Naturally, the
access speed
is
much faster, and, because several new
file
control commands can be
used for disk access, the breadth of useful functions for
file
management
is
also
enlarged.
First,
we
will
compare the composition of sequential access commands for DISK
BASIC and for CASSETTE BASE BASIC.
File registration (data write-in)
DISK BASIC CASSETTE BASE BASIC
File open command WOPEN
#n,
"fjJename" WOPEN "filename"
Data write-in command PRINT
#n,
data
PRINTIT data
File close command CLOSE
#n
CLOSE
Cancel command KILL
#n
--

19
i
File call (data read-out)
DISK BASIC
CASSETIE
BASE BASIC
File open command ROPEN
#n,
"fjJename" ROPEN "fjJename"
Data read-out command INPUT
#n,
variable INPUTfT variable
File close command CLOSE
#n
CLOSE
File end detection
IF
EOF
(#n)
THEN
--
As you can see, comparison of the various commands shows an almost I-to-l
relationship. Note, however, that DISK BASIC commands always include elements
#n.
These numbers are called logical numbers, and must always be designated for
DISK BASIC file access.
For
CASS~TIE
BASE BASIC, file access for data write-in or read-out
is
limited to
one file. For DISK BASIC, however, contains several files in order to make the best
use of its random access feature at will, so that it
is
possible to simultaneously control
several (maximum 10) files. And, if a file
is
opened, optionally selected logical
numbers can be defined and thereafter used for designation of the pertinent file,
thereby eliminating the necessity
of
using the file name each time.
Example:
As a simple example, let's consider the registration of a person's name and address
in
the sequential access file. Thus, all available addresses can be stored one after the
other in the file.
Take, for example, the following file:
filename =
If
ADDRESS LIST"
Name I
Address I
Name I
Address I
Name I
Address I
Other manuals for MZ-700 Series
3
This manual suits for next models
1
Table of contents
Other Sharp Desktop manuals

Sharp
Sharp YO-250M User manual

Sharp
Sharp Shuttle PN-SPCi5W7 User manual

Sharp
Sharp PN-TPC1W User manual

Sharp
Sharp PC-7200 User manual

Sharp
Sharp PC-4741 User manual

Sharp
Sharp MZ-700 Series User manual

Sharp
Sharp MZ-700 Series User manual

Sharp
Sharp PC-AX40 User manual

Sharp
Sharp ZQ-4400 User manual

Sharp
Sharp PC-6220 User manual

Sharp
Sharp MZ-80B Installation guide

Sharp
Sharp PC7000A User manual

Sharp
Sharp SCR3042FB User manual

Sharp
Sharp MZ-800 User manual

Sharp
Sharp PC-1500A User manual

Sharp
Sharp MZ-80A User manual

Sharp
Sharp ZQ-4450M User manual

Sharp
Sharp MZ-80B User manual

Sharp
Sharp MZ-3500 User manual

Sharp
Sharp MZ-808 User manual