background image

Summary of Contents for MZ-2Z009

Page 1: ...r r r r r r r r r r 1 Personal Computer IIIZ b illHID DISK BASIC MANUAL SHARP ...

Page 2: ...DISK BASIC Manual ...

Page 3: ...s 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 cove...

Page 4: ... 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...

Page 5: ... 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 th...

Page 6: ...pared 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 ...

Page 7: ...ote 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 bef...

Page 8: ...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 ...

Page 9: ...Y 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...

Page 10: ...ements 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...

Page 11: ... 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 fil...

Page 12: ...ame 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 of a series of decimal expressions used when producing machine language programs by BASIC POKE comm...

Page 13: ...C 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...

Page 14: ...utlines 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 ...

Page 15: ...c 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 loade...

Page 16: ... 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 IIIOB...

Page 17: ...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...

Page 18: ...nd 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 fi...

Page 19: ... 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 acc...

Page 20: ...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...

Page 21: ...e made as described below by INPUT command to substitute names and addresses alternately in string variables register each person s file individually prepare an ADDRESS LIST of a total of 50 people and then read out the prepared file and display on the screen the names and addresses of 10 persons at a time Write in 1 0 0 WO PEN 3 F D 1 ADD RES S LIS T Designation of drive number and file name 1 1 ...

Page 22: ...mes true i e if the end of the data is found the command after THEN will be executed Here use the practice problems to become sufficiently accustomed to the use of the BSD file Practice problems Problem 1 Using the program example on the previous page change the program assuming that the number of people registered is unknown read out the file 10 persons at a time until the end of the file is reac...

Page 23: ...a me 520 WOPEN 8 F D1 address 530 INPUT 6 NA AD 540 I F E OF 6 THEN 600 550 PRI NT 7 NA 560 PRI NT 8 AD 570 GOTO 530 600 CLOSE 6 7 8 610 END Problem 3 Register the string input by INPUT command in a BSD file But to close the file key input CLOSE and to cancel it key input KILL Example solution 100 WOPEN 30 FD1 DATA 110 I NPUT DATA A 120 IF A CLOSE THEN CLOSE 30 END 130 IF A KI LL THEN KI LL 30 END...

Page 24: ... statement INPUT 7 21 A means a command to read out to string variable AS the data registered as the 21st element of the data collected as the random access file opened by logical number 7 Note that random access files in which data such as this can be accessed have the condition that all data must be register d at a fixed length Le when numbers or string variables are registered in the file they ...

Page 25: ...to be made Each product is assigned a fixed number from 1 to 50 and the file will have four items product name unit price number in stock total price unit price x number in stock and comments In order to register the stock data for each product first the product number is input and then the information to be registered for each item is input The program execution is ended however when 0 is input R...

Page 26: ...cause data can be accessed at will it is also possible to easily rewrite data Use the practice problem to become accustomed to the use of the BRD file Problem Let s read out the random access file STORE LIST made here and read out the inventory data for a certain product The program execution is ended however when 0 is input Read out of inventory data 500 XOPEN 7 STORE LI ST 5 1 0 520 530 INPUT IN...

Page 27: ...T 2 file registered on the floppy disk in drive number 1 is to be overlaid that is to overlay text areas and be read out and control is moved to the heading of that text When this statement is executed control will move away from the BASIC text now running newly read out the TEXT 2 text and control will move to that heading When the program CHAIN is executed the variable and the function defined b...

Page 28: ...nother program is read in After the end of the other program the original program is read in The usual form of the SWAP command is SWAP FDn filename This is a command to SWAP the sub program designated by the filename registered on the floppy disk in drive number n n 1 4 and the shunting of the program prior to the read in of the other program is done on the floppy disk in the drive set by the def...

Page 29: ... r1r r I p LA Y E R I e OOD 1 8 Reserved Words The DISK BASIC text is composed of reserved words also called key words the operand separator and data The DISK BASIC the reserved words which are special words to execute certain determined functions and commands statements and functions are appropriate to these words Because the reserved words are certain words used in order to execute special comma...

Page 30: ...Z INPUT 51 CLR MZ INPUTrr MZ CLS MZ INT MZ COLOR MZ KI KEY LIST MZ CONSOLE MZ KILL 54 CONT MZ 1J LABEL 57 COS MZ LEFT MZ CURSOR MZ LEN MZ DATA MZ LET MZ DEFAULT 55 LIMIT MZ DEFFN MZ LINE MZ DEFKEY MZ LIST MZ DELETE 39 LIST P MZ DIM MZ LN MZ DIR 35 LOAD 37 END MZ LOCK 40 EOF 56 LOG MZ ERL MZ M MERGE 43 ERN MZ MID MZ ERROR MZ MODEGR MZ EXP MZ MODE TL MZ El FOR MZ MODETN MZ MODE TS MZ ...

Page 31: ...PEEK MZ SKIP MZ PHOME MZ SPC MZ PLOT OFF MZ SQR MZ PLOT ON MZ STOP MZ POKE MZ STR MZ PRINT MZ SWAP 45 PRINT 49 TAB MZ PRINT 52 TAN MZ PRINT USING MZ TEMPO MZ PRINT P MZ TEST MZ PRINTIT MZ THEN MZ PRINT x MZ TI MZ RI RAD MZ I1JJ UNLOCK 41 READ MZ USR 62 REM MZ IYI VAL MZ RENAME 42 VERIFY MZ RENUM MZ WOPEN 48 RESET MZ WAIT 58 RESTORE MZ IXI XOPEN 50 RESUME MZ XOR 65 RETURN MZ RIGHT MZ ...

Page 32: ... 0 0 XOPEN 0 x x OPEN limit Including RIW 1 file only OPEN is possible for as many as 10 devices Format of rde descriptor Composed of Device Name Filename Option 1 10 Initial Settings The default values of system variables etc are set as follows when the DISK BASIC is started by the IPL File descriptor Initialization is set for the device which started the DISK BASIC Keyboard related 1 Operation m...

Page 33: ...r display mode normal background black 2 Character display digit count 40 characters line 3 Character display scrolling area maximum from line 0 to line 24 Internal clock Starts at TI OOOOOO initialization Music functions 1 Tempo default value moderate tempo moderato 2 Default value quarter note J Other 1 Array variables All undefined 2 BASIC text area upper limit number FFFF i e LIMIT MAX conditi...

Page 34: ...Section 2 DISK BASIC EXPANSION NEW COMMANDS AND STATEMENTS ...

Page 35: ...description such as variables and data Describes the most generic meaning Notes variable includes array element variable includes numerical variables and character variable data includes variable and constant 1 Indicates that tlie part enclosed by 1can be omitted 1 Indicates that the part enclosed by 1 can be omitted or more than one repetition is possible AB Choose one A or B ...

Page 36: ...ignated by DEFAULT statement When JP is described the contents of the directory are output to the printer The devices designated by DIR are the same ones that have been explained in the DEFAULT statement Examples DI R F D1 or DIR FD1 Outputs on the screen the directory of the file registered in the floppy disk drive number 1 DIR P FD1 orDIR PFD1 Outputs to the printer the directory of the file reg...

Page 37: ...the heading is executed continuing to the floppy disk etc For RUN only the program within the text area is executed The specifying file is limited to the BTX or OBJ files If option A is applied BSD file is considered as ASCII format and is executed And if option R is applied read in is executed putting the memory in the same condition as read in from OBJ file IPL This R option is necessary when us...

Page 38: ...ice specified by the DEFAULT statement is designated the device name can be omitted If option A is applied BSD file is considered as ASCII format and is read in After read in time is required for conversion The filename must not be omitted but from cassette tape a call out is possible even when the filename is omitted Examples LOAD FD1 MZ 700 The file named MZ 700 is read out from the floppy disk ...

Page 39: ...vice name can be omitted If option A is applied the SAVE is as ASCiI format The file is saved as a BSD file so take care not to assign a filename which would be confused with the data file made by WOPEN and PRINT statements The file type created by the SAVE command is a BTX or BSD file The file name cannot be omitted Example SAVE FD1 PROG Puts the file name PROG in the program on the floppy disk d...

Page 40: ...evice name filename n Note Only FDn device name Abbreviated form D Explanation When the device name is omitted processing proceeds relative to device designated by DEFAULT statement Example DELETE FD1 SAMPLE Deletes SAMPLE file of floppy disk drive number 1 ...

Page 41: ...E commands and data write in are prohibited Put a lock on any file which you don t want to destroy or change The mark is displayed before the file specs in the directory display on locked files For example LOCK SAMPLE If the command above is executed the file is locked and the directory display is as follows SAMPLE L sign to indicate file locking Locking can be cancelled by the UNLOCK statement Ex...

Page 42: ...K unlock Unlocks the specified locked file Format UNLOCK device name filename Note Only FDn device name Explanation Unlocks the specified locked file Example UNLOCK SAMPLE releases the lock of file named SAMPLE ...

Page 43: ...ce name Abbreviated form RENA Explanation The filename change specifies the current filename and the new filename in that order The new filename becomes an error if a file of the same name exists in that device Example RENAME F01 OLOPROG NEWPROG The filename OLDPROG in the floppy disk file is changed to NEWPROG ...

Page 44: ...ated by the DEFAULT statement will be read in If line number of the program within the computer is the same as the line number of the program read in from the file the program from the file has priority and the former program will be deleted If option A is applied the BSD file is considered as ASCII format and is merged Examples Program in the memory PROG program on floppy disk 1 0 B 2 1 0 A 1 30 ...

Page 45: ...atement is also considered to be a file opening Although the CHAIN statement has a function similar to the execution of the RUN command in a program the variables arrays etc of the original program are transferred to the new program without change when there is a chain Example 1 0 A l 20 8 2 30 CHAI N F D 1 PROG 40 END The program of the file named PROG on the floppy disk in the floppy disk drive ...

Page 46: ... time is transferred to the called program See page 27 An error occurs if a write protect seal is put on the default drive floppy disk Example 1 0 A 1 B 2 20 30 40 PR I NT 11 A A 11 cf i SWAP 11 F D 2 PRO G j 11 11 11 i PR I NT A A B 1 ii 50 END 10 A A 10 B B 10 20 END SWAP FD2 PROG When this program is executed A 1 and B 1 are displayed on CRT screen when line 20 is executed At line 30 the SWAP c...

Page 47: ...and filename When the device name is omitted the device designated by the DEFAULT statement is specified When RS J 1 is specified input is specified to RS 232C 21 Examples 10 ROPEN 1 FD1 DATA The floppy disk s drive number 1 BSD file DATA is read out 1 0 ROPEN 1 ftSl I The input by INPUT commane is set to RS 232C 1 0 ROPEN 2 DATA 20 FOR I 1 TO 99 30 I NP UT 2 A 40 PR I NT A 50 NEXT I 60 CLOSE 2 70...

Page 48: ...the file set to logical number by ROPEN statement In the same way as for READ DATA statements error is generated if data and variable data type do not coincide The end of the file data can be determined by the EOF function However for FD device only Example 1 0 ROPEN 2 DATA 20 I NP UT 2 A B C 30 PRI NT A B C 40 CLOSE 2 50 END Reads out numerical data from BSD file opened for read out by logical nu...

Page 49: ... omitted processing occurs relative to the device specified by the DEFAULT statement When RS is specified for the device name the filename can be omitted Examples 1 0 WOP EN 1 F 01 OAT A Opens the DATA file defined to logical number 1 for write in 1 0 WOP EN 1 R S 1 Output by the PRINT command is set in RS 232C 1 0 WOPEN 2 DATA 20 FOR I 1 TO 99 30 PRI NT 2 40 NEXT 50 CLOSE 2 60 END 1 99 count is w...

Page 50: ...ment for write in Files into which data are to be written are to be correctly specified by the logical number when opened Data are numerical value data or character data Example 1 0 WOPEN 1 DATA 20 PRI NT 1 1 2 3 30 CLOS 1 40 END Numerical data 1 2 and 3 are written in the file that has been opened to write in logical number 1 References WOPEN page 48 CLOSE page 53 ...

Page 51: ...ead out from and new data write in to the BRD file and defines the logical number for file access Examples 10 XOPEN 1 FD1 DATA 20 NPUT pr oduct no K 30 F K O THEN 110 40 NPUT product name NS 50 NPUT unit price P 60 INPUT st ock amount S 70 I NPUT comment CS 80 T P S 90 PR I NT 1 K 5 4 N P S T C 100 GOTO 20 1 1 0 CL OS E 1 120 END Cross opens read out write in BRD files The 5 items of input product...

Page 52: ...tement In the same way as for the READ DATA statements an error will be generated if the data and the variable data type do not coincide The end of the file data can be detemined by EOF function The data element position is from 1 n Example 1 0 XOPEN 2 11 F D 1 DATA 11 20 Z 3 30 INPUT 2 Z 1 0 40 I F E OF 2 THEN 80 50 PRI NT S 60 Z Z 5 70 GOTO 30 80 CLOSE 2 Dataele i 11121 41516171 191101111121 llt...

Page 53: ...ble The file which writes in the data becomes the file specified to logical number by the XOPEN statement The data are numerical data or character data The possible write in data length is 32 bytes and the data element position is from 1 n Example 10 XOPEN 4 FD1 DATA 20 FOR Z 3 TO 13 STEP 5 30 PRINT 4 Z O 40 NEXT Z 50 CLOSE 4 Data ele 11121 41516171 191101111121 1141 When this program is executed ...

Page 54: ...ened for write in and returns the logical number used to the non defined condition CLOSE relative to ROPEN Closes the BSD file opened for data read out and returns the logical number used to the non defined condition When logical number not specified closes all currently open files and returns all logical numbers to non defined condition When do not specify logical number closes all currently open...

Page 55: ...t designated the formal registration of the file currently being made is stopped and in addition all files already opened are closed and all logical numbers are returned to the non defined condition Because the KILL command can be used as a direct execution command this command can be executed directly prior to exchange of the cassette tape floppy disk In order to thereby protect the contents of a...

Page 56: ...name is omitted by command statement The device name reading DISK BASIC is defined in FDl Device names are as follows F On C MT R S Examples floppy disk n 1 4 cassette tape RS 232C interface n 1 2 DEFAULT CMT Considered to be cassette tape if device name is omitted in each command DE F AUL T F 02 Considered to be floppy disk drive 2 if device name is omitted in each command ...

Page 57: ...rror generation and 0 or null is provided as the data value Error is generated however when data are read out from CMT This function is used in combination with the IF statement and placed after each INPUT statement Example 10 ROPEN 3 DATA 20 I NPUT 3 A 30 IF EOF 3 THEN END 40 PR I NT A 50 GOTO 20 With this program data are read out in sequence from the DATA file and are displayed on the screen An...

Page 58: ... the GOTO statement GOSUB etc In this way the program can be made easier to see and easier to understand Example 1 0 PRI NT SAMPLE 20 GOSUB ABC 30 PRI NT END 40 END 100 LABEL ABC 1 1 0 PRI NT LABEL SAMPLE 120 RE TURN The line number 20 GOSUB statement branch destination is set to the ABC label on line number 100 As a result the subroutine after the line number 100 is called out by the GOSUB statem...

Page 59: ...finite time Format WAIT numerical data Abbreviated form W Explanation Interrupts the program execution for the time period specified by numerical data The unit is 111000 second Example 1 0 WAI T 100 Interrupts the program execution for 0 1 100 1000 second ...

Page 60: ...ed again The execution is stopped by ISHIFTI IBREAKI Uflfler ease aRa lewsr esse llilulilfs eaRRet be disclimindled withIn character T tnts see aRe c BC anI gRsiQ F a te 88 the sl lft le ehalaetel el lta If double quotation marks are used CHRS 34 is used as the character data When IP is specified data are printed by the printer not displayed on the screen Example SEARCH ABC Searches for and finds ...

Page 61: ...toring DCD transmission monitoring CTS transmission monitoring Not used Usually O RTS OFF transmission enable All character transmission out monitoring 1 _ _ _ p 01 odd parity 1 00 non parity anty 10 non parity 11 even parity 01 1 stop bit 1 00 not used L _______ Stop bIt 10 _ 1 112 stop bit Not used Usually 0 Transmission reception character length 0 bitslCHR 1 bitslCHR ending code Values from 0 ...

Page 62: ... DCD Ground 1 8 1 8 Ground Both are used in the terminal mode Refer to RS 232C user s manual The following are programs to transmit receive numbers from 0 to 9 the contents of A when exchanging information between two MZ 700s Reception side transmission side 1 0 I NI T RS1 00 8C 1 0 I NI T RS1 00 8C 20 ROPEN 1 RS 1 DATA 20 A 0123456789 30 INPUT 1 A 30 l K PEN 1 RS 1 40 PRI NT A 40 PRI NT 1 A 50 CL...

Page 63: ...lue following the input character variable is set in the register DE register heading address of memory area of input character variable B register length of input character variable IX register address if error processing routine is announced At the point in time of return from the machine language program the value of the data indicated by the subsequent register becomes the output character var...

Page 64: ...l number From 0 to 127 00 7F in hexadecimal the port number can be determined freely From 128 to 255 FO 80 in hexadecimal the use is exclusively as ports for external devices Example 1 0 FOR I 0 TO 20 20 C 1 32 30 GOSUB SUB 40 NEXT 50 END 60 LABEL SUB 70 I NP FE A 80 I F NOT A AND OD 0 THEN 70 90 OUT FF C 100 OUT FE 80 1 1 0 I NP FE A 120 I F NOT A AND 0 D 1 THE N 1 1 0 130 OUT FE 0 140 RETURN Ref...

Page 65: ... for external devices For control of peripheral devices etc data are output to 110 ports Thus if there is a mistake of the port number etc by this OUT command there is the possibility that such a mistake will cause abnormal operation of the peripheral equipment etc so care must be taken in that regard Example 1 0 FOR 1 0 TO 20 20 C 1 32 30 GOSUB SUB 40 NEXT 1 50 60 70 80 90 100 1 1 0 120 1 30 140 ...

Page 66: ... NOT X o X OR Y logical addition inclusive or OR means either X or Y XY XORY 1 1 1 1 0 1 0 1 1 0 0 0 X XOR Y Exclusive logical addition exclusive or Means X and Y are not equal XY XXORY 1 1 0 1 0 1 0 1 1 0 0 0 The logical operation is usually used in IF THEN ELSE command explained before For instance it is used as follows IF 30 X AND Y 20 THEN 120 ELSE 100 The meaning above is if the X value is 30...

Page 67: ...Section 3 BASIC MONITOR FUNCTIONS ...

Page 68: ...dress designated by a four digit hexadecimal main memory address including heading data 0000 FFFF equal mark a separator used to distinguish address and data Data designated by two digit hexadecimal or semi colon character 8 bit data or specified character ASCII code is written into specified memory address as a rule a space is used for data intervals 3 2 PRINTER SWITCH P Command Directs D and F c...

Page 69: ...nged make the correction and then input ICRI Note The final 8 byte characters are displayed by data ASCII code and the control code is indicated by a period The display is stopped only by the IBREAKI key by ISHIFTI IBREAKI there is a return to a aiting a command 3 4 MEMORY SET CM Command IM heading addressJ Rewrites the memory content When the heading address is omitted rewrite is from the current...

Page 70: ... call address Stack pointer is at FFFE hexadecimal 3 7 TRANSFER T Command T heading address L J final address transfer heading address Transfers data between designated addresses from the transfer heading address 3 8 SAVE S Command 5 heading address L J final address L J execution heading address devica name filename Records data between designated addresses to the designated device name The execu...

Page 71: ...g command if no error appears returns to awaiting command 3 10 VERIFY V Command V fllename Reads designated file from cassette and compares with main memory Used to check whether correctly saved if not correct ERR is displayed 3 11 RETURN R Command Returns monitor to called system If from BYE command of DISK BASIC returns to DISK BASIC by this command SP stack pointer and HL register are stored so...

Page 72: ...Section 4 APPLICATION PROGRAMS ...

Page 73: ... from the top Choose the right item number from the menu area specification contents and make the key input The specification item and the initial screen become as follows Specification items Specification contents menu display area F i le Convert Ut i lit Y VX XX Source Syst em De v ice Fi I e Mode F i le Na me De s t i net i on Syst em MZ 700 BASI C De v ice Fi le Mo de Fi le Na me System Me n u...

Page 74: ...e program made for For instance if the program file converter is for the MZ SOK and moreover if it is made by double precision the DISK BASIC W PREC key input 3 Moreover the objects are the following systems MZ 700 Basic CASSETE TAPE BASIC DISK BASIC MZ SOKBasic p 60 s MZ SOK FDOS MZ 80K FODS S foI Pft8 JftAm Display contents Menu display area fSyst em Menu 1 MZ 7 0 0 B a sic 2 MZ 8 0 K Ba sic 3 M...

Page 75: ...mode conversion possibilities specified in the system menu and device However the destination file mode is made automatically possible file mode from the specification of source file mode Display contents Menu display area F i I e MOde 1 OBJ t 2 BTX 3 BSD 4 BRD r File name Inputs the file name of file to be conterted maximum 16 characters To display the disk directory from this condition key input...

Page 76: ...N Related to the message Funct i on and 1 Any key Returns to the file name input waiting condition when key input any key is performed Ne x t p age 1 An y key Display when one screen is not enough to display the directory The display of the Err 0 r 1 All Y f Q Q eO Icz r V N v 2 remaining directory is performed when once again a key is input IH Indicate hat beca se of so error directory display is...

Page 77: ...he memory of the MZ 700 When this read in is finished there will be a display meaning insert the destination disk Take out the source disk and insert the destination disk into the floppy disk drive in its place After insertion is completed press a key any key When the key input occurs the data in the memory of the MZ 700 will be written into the destination disk Display when conversion finishes 1 ...

Page 78: ... will conversion be made again or will conversion be ended If conversion will be made again input Y if the end input N When Y is input there will be a return to the initial screen used for convert execution and when N is input there will be a return to the monitor condition 4 ...

Page 79: ...Section 5 DISK BASIC SUMMARY ...

Page 80: ...is executed the system memorizes that drive number and thereafter the drive number can be omitted to designate direct execution commands and file access commands for that same floppy disk drive Displays the directory of the floppy disk in the floppy disk drive that was executed by the most recent DIR com mand DIR P FD1 Prints floppy directory on line printer LOAD FD1 DAY Reads out BASIC texqaofX w...

Page 81: ... heading Reads out program text G from volume number 7 of the floppy disk in drive number 3 and then executes program from the designated execution address In this instance the system is not controlled by BASIC Adds the program in the file to the program MERGE FDl PR Merges program currently in the memory and PROG OG 11 file in the floppy disk VERIFY H AUTO AUTO 200 20 LIST LlST 50D LlST P Compare...

Page 82: ...rom point of interruption by ISHIFf I IBREAK I keys or STOP statement during program CONT com mand becomes invalid when during a program break the BASIC text is edited Moves system control from DISK BASIC to monitor The return from monitor to DISK BASIC can be made by monitor ommand R Lists on the CRT display the definition condition of the definable function keys 5 1 2 File Control Statements LOC...

Page 83: ...ent is as a GOTO filename SWAP FD2 TEXT Swaps program execution to BASIC text TEXT S R in S R floppy disk drive number 2 In other words the text in execution is once shunted to the floppy disk in the default drive then TEXT S R is read out to the BASIC text area and program execution continues from that heading When the swapped program is finished the original text is then read out and the program...

Page 84: ...PEN statement WOPEN KILL 3 By closing the file one BSD with the file name specified by the WOPEN statement is made on the specified floppy disk and the logical number 3 in this instance becomes undefined once more Kills the BSD the file opened in logical number 3 by the WOPEN statement In other words it cancels or erases the BSD and the logical number 3 in this instance becomes undefined once more...

Page 85: ...nsional numerical array variable R l1 to element 11 of the BRD file opened in logical number 5 by the XOPEN statement PRINT 5 20 AR Writes in string variables AR and AS to respectively AS elements 20 and 21 of the same BRD as above Because all elements in the BRD are a fixed length of 32 bytes any part of the string length which exceeds 32 bytes will be invalid INPUT 5 21 R Reads out substitutes t...

Page 86: ...RN IF ERN 44 THEN If the error number is 44 this is a command to jump to 1050 statement number 1050 IF ERL IF ERL 350 THEN A command to jump to statement number 1090 if the RESUME 1090 error statement number is 350 IF ERN 53 ER A command to finish the program if the error number is L 700 THEN END 53 and the error statement number is 700 650 RESUME For the DISK BASIC if an error occurs during the p...

Page 87: ...Displays the content of numerical variable A on the CRT display Displays the content of string variable A on the CRT display Writes the ABC string in yellow on a light blue background Writes the DEF string in yellow on a green back ground Writes the OHI string in white on a green background New line if PRINT only PRINT USING PRINT USING A designation which lines up decimal point positions by a INl...

Page 88: ...y numerical variables A B and C by execution of the READ DATA statements at the left RESTORE 10 READ HS H SS The first data of the DATA statement i e string data S HEART is substituted for the first variable of the 30 DATA HEART 3READ statement i e for the string variable HS Next 35 DATA SPADE numerical data 3 is substituted for the second variable H 11 and read in continues one after the other 10...

Page 89: ...ubstitute for values 8 STEP 3 from 2 to 8 in steps of 3 statement number 10 It is also 20 PRINT B ble to make the STEP value negative and make the 30 NEXT variable smaller each time An example of an overlay of the FOR NEXT loops 10 FOR A 1 TO 3 variables A and B Note that B loop is placed inside A 20 FOR 8 S 1 0 TO 30 J I loop Nesting of loops doubling tripling is possible 30 PRINT A 8 ff 40 NEXT ...

Page 90: ...es next statement if A is less than B 30 IF A B 2 GO Branches to statement number 90 subroutine if value of SUB 90 variable A is equal to twice the value of B If not executes next statement If there is a multi statement following a conditional statement the ON statement is executed when the condition is not reached but the IF statement moves the execution to the next statement number if the condit...

Page 91: ...For one dimensional string array variable C1 11 array variables become available from C1 0 to C1 10 For two dimensional string array variable K 48 array variables become available from K O 0 to K 7 5 Considered to be floppy disk drive number 1 if device names are omitted by commands 100 DEF FNA X Statement number 100 defines X2 x to FNA X xt 2 X statement number 110 defines 10gJOX 1 to FN8 X and 1...

Page 92: ...0 STOP 2000 END 300 CLR Stops program execution and awaits command If CONT command given here program continues Indicates end of program Executes program end All numerical variables and character variables become 0 or vacant null all array variables return to undeter mined condition All DEF FN statements also become invalid 10 CLS Erases the secreen in the scroll range 50 CURSOR 25 15 Specifies th...

Page 93: ...22030 Sets the internal clock to 10 20 30 PM Time data are expressed as a 6 digit figure within quotation marks 5 1 12 Music Control Statements MUSIC TEMPO 300 TEMPO 7 Tempo 7 fastest speed is specified by statement number 310 MUSIC DE 300 By statement number 310 re miiJ I 1 la mid FGA range are played at tempo 7 U there is no TEMPO statement the music is played at the tempo of the default value 3...

Page 94: ...ry 120 POKE 49450 175 Sets data 175 decimal notation to the decimal notation address 49450 130 POKE AD DA Sets the value 0 255 indicated by variable DA to the address specified by variable AD 150 A PEEK 494 Changes the data at decimal notation address 49450 to a 50 decimal number and substitutes for variable A 160 B PEEK C Changes data entered at the decimal notation address specified by variable ...

Page 95: ...he size of the 26 digit mode of the TEXT mode Specifies the current pen position to a new starting point Valid in GRAPH mode Valid in GRAPH mode 10 LlNE 1 240 O Coordinates 240 0 240 240 0 240 and 0 0 are 240 240 O connected by a solid line from the current pen position 240 0 0 MODE TN Returns from the graphic mode to the text mode 4O characters per line MODE TL Returns from the graphic mode to th...

Page 96: ...tter printer as substitution for the display Valid in TEXT mode Cancels above function Valid in TEXT mode Outputs string variable A content after the numerical variable A content to printer 20 PRINT P I For form feed of printer Outputs format specified data to screen Format specifica tion is written after the word USING PRINT P USING Numerical variable A contents are output to printer A within 4 d...

Page 97: ...e is a positive integral number in parentheses such as in statement number 100 or 110 generates a random number using values from 0 00000001 to 0 99999999 sequentially each time the RND function is used This has no relationship to the positive integral number in parentheses 200 A RND 0 When there is a 0 or negative integral number in 210 B RND 3 parentheses such as in statement number 200 or 210 i...

Page 98: ...bstitutes N number of spaces for string variable D Converse to the ASC function substitutes ASCII code characters which are equivalent to the value of real number A for string variable F It doesn t matter whether A is a constant variable or numerical formula Substitutes the value of the ASCII code of the first character of st ng variable X for variable A Converse to the VAL variable substitutes th...

Page 99: ...tion Note however that an error occurs if Y is not an integral number when X is a negative number at X t Y 0 8 is a subtraction note that the of 8 is a minus sign Substitutes the multiplication result of X and Y for variable A Substitutes the division result of X and Y for variable A Substitutes the addition result of X and Y for variable A Substitutes the subtraction result of X and Y for variabl...

Page 100: ... onward 5 1 19 Other Symbols 200 A B A Can be used instead of PRINT Consequently statement B number 200 and 210 are the same 210 PRINT A B A B 220 A X B X t 2 A symbol to express punctuation of the command state lA B ment used in multiple commands There are 3 command statements used in the statement number 220 multiple command 230 PRINT AB C Executes PRINT continuously As a result line number 0 EF...

Page 101: ...nof avariable 3 6 320 AS DISK BA indicates a string content SIC 330 BS MZ 7oo 340 CS ABC Indicates a string variable CHRS 3 500 LIMIT SBFFF Indicates hexadecimal number 103 550 S SIN The approximate value of pi 3 1415927 is expressed by X nl180 l t ...

Page 102: ...ngth error Length of one line exceeds the limit 10 GOSUB nesting error GOSUB statement nesting over 11 FOR NEXT nesting error FOR NEXT statement nesting over 15 12 DEF FN nesting error Function definition by DEF FN statement nesting over 6 13 NEXT error NEXT statement without FOR statement 14 RETURN error RETURN statement without GOSUB statement 15 Un def function error Use of undefined function 1...

Page 103: ...ttempt to register already existing filename 43 Already open error Opening of file already open 44 not open error Referencing or CLOSE or KILL unopen file 46 Write protect file o rr0 r Write in prohibited file 50 DMk not ready Q fr r Floppy disk off as system 51 Too many files r r Attempt to register beyond maximum number 63 Sl D l c W _ fhrl f of files 53 No file space O rof Insufficient space on...

Page 104: ...or 63 Out of file error Out of file file data read in 64 Logical number error Non regulation logical number 65 LPT not ready Printer not connected 68 Dev mode error Error in device mode 69 Unprintable error Non defined error message 70 Check sum error Check sum error tape read in error ...

Page 105: ...ariable area String data buffer Temporary String Area t Free area Stack Calculation work area Free area for user Work area for IPL Start address when NEW command is executed 107 Text end code 00 00 I O work end code 00 Variable end code 00 LIMIT HlOO Address specified by LIMIT ...

Page 106: ... Storage temperature conditions around the floppy disk 4 C 53 C 39 F 127 F The jacket will become deformed if the temperature exceeds 53 C 127 F Please take care not to expose the floppy disk to direct sunlight for a long time and not to place it in an environment where the temperature is apt to exceed 53 C 127 F When the floppy disk is used please use it within the temperature range prescribed on...

Page 107: ...displays cassette recorders and household television sets all generate magnetism so floppy disks should always be kept away from these and similar equipment Be sure to store the floppy disk in its protective sleeve when it is not being used The habit should be formed to immediately insert the floppy disk in the sleeve when it is removed from the floppy disk drive By following this practice the maj...

Page 108: ...conditions stated above Avoid holding floppy disks with pager clips spring clips or any other similar instrument Never place any heavy item on top of a floppy disk Also do not carelessly place them on a desk top etc Be sure to always return all floppy disks to their prescribed place for storage immediately after use ...

Page 109: ...SHARP CORPORATION OSAKA JAPAN Printed In Japan Gedruckt In Japan Imprlme au Japon Stampato In Glapporf 4C ...

Reviews: