Intel 9800758-02 manuel d'utilisation
- Voir en ligne ou télécharger le manuel d’utilisation
- 118 pages
- 4.72 mb
Aller à la page of
Un bon manuel d’utilisation
Les règles imposent au revendeur l'obligation de fournir à l'acheteur, avec des marchandises, le manuel d’utilisation Intel 9800758-02. Le manque du manuel d’utilisation ou les informations incorrectes fournies au consommateur sont à la base d'une plainte pour non-conformité du dispositif avec le contrat. Conformément à la loi, l’inclusion du manuel d’utilisation sous une forme autre que le papier est autorisée, ce qui est souvent utilisé récemment, en incluant la forme graphique ou électronique du manuel Intel 9800758-02 ou les vidéos d'instruction pour les utilisateurs. La condition est son caractère lisible et compréhensible.
Qu'est ce que le manuel d’utilisation?
Le mot vient du latin "Instructio", à savoir organiser. Ainsi, le manuel d’utilisation Intel 9800758-02 décrit les étapes de la procédure. Le but du manuel d’utilisation est d’instruire, de faciliter le démarrage, l'utilisation de l'équipement ou l'exécution des actions spécifiques. Le manuel d’utilisation est une collection d'informations sur l'objet/service, une indice.
Malheureusement, peu d'utilisateurs prennent le temps de lire le manuel d’utilisation, et un bon manuel permet non seulement d’apprendre à connaître un certain nombre de fonctionnalités supplémentaires du dispositif acheté, mais aussi éviter la majorité des défaillances.
Donc, ce qui devrait contenir le manuel parfait?
Tout d'abord, le manuel d’utilisation Intel 9800758-02 devrait contenir:
- informations sur les caractéristiques techniques du dispositif Intel 9800758-02
- nom du fabricant et année de fabrication Intel 9800758-02
- instructions d'utilisation, de réglage et d’entretien de l'équipement Intel 9800758-02
- signes de sécurité et attestations confirmant la conformité avec les normes pertinentes
Pourquoi nous ne lisons pas les manuels d’utilisation?
Habituellement, cela est dû au manque de temps et de certitude quant à la fonctionnalité spécifique de l'équipement acheté. Malheureusement, la connexion et le démarrage Intel 9800758-02 ne suffisent pas. Le manuel d’utilisation contient un certain nombre de lignes directrices concernant les fonctionnalités spécifiques, la sécurité, les méthodes d'entretien (même les moyens qui doivent être utilisés), les défauts possibles Intel 9800758-02 et les moyens de résoudre des problèmes communs lors de l'utilisation. Enfin, le manuel contient les coordonnées du service Intel en l'absence de l'efficacité des solutions proposées. Actuellement, les manuels d’utilisation sous la forme d'animations intéressantes et de vidéos pédagogiques qui sont meilleurs que la brochure, sont très populaires. Ce type de manuel permet à l'utilisateur de voir toute la vidéo d'instruction sans sauter les spécifications et les descriptions techniques compliquées Intel 9800758-02, comme c’est le cas pour la version papier.
Pourquoi lire le manuel d’utilisation?
Tout d'abord, il contient la réponse sur la structure, les possibilités du dispositif Intel 9800758-02, l'utilisation de divers accessoires et une gamme d'informations pour profiter pleinement de toutes les fonctionnalités et commodités.
Après un achat réussi de l’équipement/dispositif, prenez un moment pour vous familiariser avec toutes les parties du manuel d'utilisation Intel 9800758-02. À l'heure actuelle, ils sont soigneusement préparés et traduits pour qu'ils soient non seulement compréhensibles pour les utilisateurs, mais pour qu’ils remplissent leur fonction de base de l'information et d’aide.
Table des matières du manuel d’utilisation
-
Page 1
BASIC-SO REFERENCE MANUAL Manual Order No. 9800758-02 Copyright © 1978, 1979 Intel Corporation I Intel Corporation, 3065 Bowers Avenue, Santa Clara, California 95051 r[...]
-
Page 2
ii Additional copies of this manual or other Intel literature may be obtained from: Literature Department Intel Corporation 3065 Bowers Avenue Santa Clara, CA 95051 The information in this document is subject to change without notice. Intel Corporation makes no warranty of any kind with regard to this material, including, but not limited to, the im[...]
-
Page 3
PREFACE This manual describes and explains the features and conventions of Intel Disk Ex- tended BASIC-80, as implemented on Intel Intellec microcomp~ter development systems using the Intel Systems Implementation Supervisor (ISIS-II), and on Intel Single Board Computer Systems using the Intel Real-Time Multitasking Executive (RMX-80). This manual i[...]
-
Page 4
iv • RMX-80 User's Guide, 9S00522, which describes how to operate the Intel Real-Time Mulitasking Executive (RMX-SO). • RMX-80 Installation Guide, 9803087-01, which describes installation and operation of the Intel Real-Time Multitasking Executive. The following manuals may be required if you intend to call subroutines written in other Int[...]
-
Page 5
CHAPTER! PAGE INTRODUCTION TO BASIC-SO Operating System Interface . . . . . . . . . . . . . . . . . . . . . .. 1-1 Invoking BASIC-80 ........................... 1-1 Manipulating Files from BASIC-80 .. . . . . . . . . . . .. 1-2 Listing the Directory of a Disk. . . . . . . . . . . . . . . .. 1-3 Renaming a File. . . . . . . . . . . . . . . . . . . .[...]
-
Page 6
FIGURE TITLE PAGE 5-1 Random 1/0 Characteristics ................. ' 5-5 E-l Intel Numeric Representation ................. E-3 E-2 8080/8085 Assembly Language Program ....... E-5 E-3 PL/M-80 Program. . . . . . . . . . . . . . . . . . . . . . . . .. E-6 E-4 FORT~AN-80 Program ..................... E-6 F-l Sample Configuration BQOPS.ASM Module [...]
-
Page 7
CHAPTER 1 INTRODUCTION TO BASIC-80 BASIC-SO is Intel's implementation of disk extended BASIC for Intellec and Intellec Series II Microcomputer Development Systems, which use the Intel Systems Im- plementation Supervisor (ISIS-II), and for Intel Single Board Computers, which use Intel's Real-Time Multitasking Executive (RMX/SO). It offers [...]
-
Page 8
Introduction to BASIC-80 1-2 To invoke BASIC-80 from ISIS-II, enter the name of the file that contains the BASIC interpreter. Options also allow you to specify the name of a file that contains a program to be loaded after BASIC-80 is running, and upper memory limit for BASIC-80's work area. The format of the command is: -BASIC [filename] [MEMT[...]
-
Page 9
BASIC-SO Introduction to BASIC-SO Listing the Directory of a Disk To list the directory of a disk, enter DIR followed by the drive number. BASIC-80 assumes drive 0 if you don't specify: DIR NAME.EXT RECS LENGTH ATTR ALPHA 31 3728 ATTRIB 38 4677 BASIC 178 22571 COpy 64 7967 DCOPY 32 3961 DELETE 37 4501 DIR 46 5728 DSORT 11 1264 EDIT .MAC 5 469 [...]
-
Page 10
Introduction to BASIC-80 1-4 Loading a Program The LOAD command loads a BASIC-SO program from disk. The program can be stored in either ASCII or internal format. To load a program named ANL YZE from a disk in drive 1: LOAD ":F1 :ANLYZE" OK You can now run, list, or edit the program. Saving a Program The SAVE command copies your program fr[...]
-
Page 11
CHAPTER 2 LANGUAGE ELEMENTS A BASIC-80 program consists of instructions, which tell BASIC-80 what to do, and data, which gives BASIC-80 the inform.ation necessary to do it. This chapter describes the different types of instructions and data, and shows how to represent them. Instructions BASIC-80 performs work by interpreting user-provided instructi[...]
-
Page 12
Language Elements BASIC-80 Table 2-1. BASIC-80 Commands (Cont'd.) Command Description Example MERGE Combines file program with current MERGE ":F1:TIME" program. NEW Deletes current program, clears NEW variables. NULL Specifies nulls added to a line. NULL 20 PRUN Executes program in ROM. PRUN 4EOOH RENAME Changes file name. RENAME &qu[...]
-
Page 13
BASIC-SO Statement LINE INPUT lSET ON ERROR ON-GOTO ON-GOSUB OPEN OPTION BASE OUT POKE PRINT PRINT USING PUT RANDOMIZE READ REM RESTORE RESUME RETURN RSET STOP SWAP WAIT Functions ABS ASC ATN COSl CHR$ CINT COS CSNG CVD CVI CVS Language Elements Table 2-2. BASIC-80 Statements (Cont'd.) Description Enters entire line from a disk file. left just[...]
-
Page 14
Language Elements 2-4 Functions DSKF EOF ERL ERR EXP FIX FRE HEX$ INP INPUT$ INSTR$ INT LEFT$ LEN LOC LOF LOG MID$ MKD$ MKI$ MKS$ OCT$ PEEK POS RIGHT$ RND SGN SIN SPACES SPC SQR STR$ STRING$ TAB TAN USR VAL VARPTR Table 2-3. BASIC-80 Functions (Cont'd.) Returns Number of 128-byte sectors free on disk or drive (X) -1 if end-of-file; 0 if not (f[...]
-
Page 15
BASIC-SO Language Elements Functions Functions are built-in routines that return a value based on the argument or arguments supplied. They can be used to form expressions with either commands or statements. BASIC-SO includes both numeric and string functions. Table 2-3 lists the BASIC-SO functions. In addition to these, up to 10 user-written functi[...]
-
Page 16
Language Elements 2-6 Constants Constants are numeric values that do not change during program execution. A con- stant can be a decimal integer, hexadecimal integer, octal integer, single-precision floating-point number, or double-precision floating-point number. Table 2-5. Numeric Data Types Numeric Type Range Storage Definition Suffix Examples Re[...]
-
Page 17
BASIC-80 Language Elements Octal Integer Constants Octal integer constants are identified by the suffix Q following the numeric value. The numerals 0-7 are used as octal digits. Each digit represents 3 bits of data. Some octal iQteger constants are: Octal Decimal Equivalent 7720 506 44440 2340 7Q 7 Single-Precision Floating-Point Constants Single-p[...]
-
Page 18
Language Elements 2-8 If a variable is referenced before it has been assigned a value, its value is zero. The NEW, RUN, CLEAR, LOAD, and MERGE instructions set all variables to zero. Individual variables can be specified by individual type identifier suffixes, which override group type identifiers used to specify blocks of variables. Table 2-5 show[...]
-
Page 19
BASIC-SO Language Elements Converting Data It is sometimes useful to convert one type of data into another. BASIC-SO suppo. I..., these conversions with the HEX$, OCT$, CHR$, STR$, VAL, CVD, CVI, CVS, CDBL, CSNG, CINT, MKS$, MKD$, and MKI$ functions. The HEX$ and OCT$ functions return a string of hexadecimal and octal digits, respectively, that rep[...]
-
Page 20
Language Elements 2-10 String Arrays Like numeric arrays, string arrays can be dimensioned with the DIM statement. The format for dimensioning a string array is the same as for numeric arrays: DIM A$(5,25,40) If you don't execute a DIM statement, a default of 10 for each subscript is assumed. If this value is then exceeded, an error message wi[...]
-
Page 21
BASIC-80 Language Elements Table 2-6. BASIC-SO Operators in Order of Precedence (Cont'd.) Order 9. 10. 11. 12. 13. 14. Operator Logical NOT, used to invert a given argument. Logical AND, used to test if the nth bit of X and the nth bit of Yare both on. Logical OR, used to test if the nth bit of X or Y equals 1. Logical exclusive OR, used to te[...]
-
Page 22
Language Elements 2-12 Logical Operators The logical operators NOT, AND, OR, XOR, IMP, and EQV are operators that compare the nth bit of argument X with the nth bit of argument Y. They are evaluated after the arithmetic and relational operators; therefore, arithmetic expres- sions resolve to a number which is compared with another number. A relatio[...]
-
Page 23
CHAPTER 3 ENTERING AND EDITING PROGRAMS With BASIC-80, you can create new programs by entering statements line by line, or you can access saved programs from disk storage. If you're using ISIS-II BASIC-80, you can use the ISIS-II BASIC-80 Text Editor to alter new or saved instruction lines. RMX/80 BASIC-80 does not have a Text Editor. The foll[...]
-
Page 24
Entering and Editing 3-2 In the Command Mode, the RUBOUT key deletes the last entered character each time you press it, and backspaces the cursor on a CRT. On a teletype, or with RMX/SO BASIC-SO, RUBOUT echoes the last-entered character. If you then press CR, the program statement is entered without the rubbed-out characters. If you enter new chara[...]
-
Page 25
BASIC-SO Entering and Editing Complete editing of a line replaces the old line with the edited line. This resets all variables to zero or null. To end editing without losing prior variable values, exit the editing mode with the Q subcommand after the line number has been printed. BASIC-80 returns to command level, variable values are unchanged and [...]
-
Page 26
Entering and Editing 3-4 L Subcommand The L subcommand prints the rest of the original line, and waits for further editing subcommands. The cursor is to the left of the first character. You can use the L sub- command to display previously edited text and restart editing at the beginning of the line: 40 IF A>B THEN 120 ELSE "NULL SET" 4[...]
-
Page 27
BASIC-SO Entering and Editing The syntax of the X subcommand is: X character [character] ... Returning to the previous example, if you wish to add text at the end of the given in- struction line, use the X subcommand: 40 • Enter (X) 40 IF A>B THEN 120 ELSE PRINT "UNDEFINED SET" • Enter new text at the cursor-;A; B (ESC) (L): 40 IF [...]
-
Page 28
Entering and Editing 3-6 C Subcommand The C subcommand changes the next n characters to the specified character(s). If no integer is specified, the character immediately to the right of the cursor is changed. The syntax of the C subcommand is: [integer] C character [character ... ] In our previous example, line 40 was reduced to: 40 PRINT "UND[...]
-
Page 29
CHAPTER 4 ERROR HANDLING If you enter improper instructions, syntax, or formats, BASIC-80 issues an error message. This chapter explains what these errors mean, how they may be trapped with the ON ERROR statement and pinpointed with the TRON, TROFF, ERR, and ERL instructions, and how errors may be simulated with the ERROR statement. BASIC-80 Error [...]
-
Page 30
Error Handling 4-2 Underflow. Single-precision floating-point underflow occurs when the magnitude of a single-precision numeric value is less than (±) 1.2 x 10- 38 (1.2E-38). Double- precision floating-point underflow occurs when the magnitude of a double- precision numeric value is less than (±) 2.2 x 10- 308 (2.2D-308). When a value of this mag[...]
-
Page 31
BASIC-80 Error Handling 10 ON ERROR GOTO 100 20 INPUT A 30 PRINT 521 A 40 GOTO 20 100 PRINT "Error";ERR;"at line";ERL 110 IF 11=ERR THEN PRINT "Division by zero" 120 RESUME NEXT RUN ? 13 4 ? 0 Error 11 at line 30 Division by zero ? Trace Facility The TRON and TROFF (trace on and trace off) commands are used to examine [...]
-
Page 32
Error Handling 4-4 Error Simulation BASIC-SO provides a statement that can simulate any errors which produce an error code. When the ERROR statement is encountered during program execution, BASIC-SO acts as if the specified error had occurred. The example below demonstrates how ERROR can be used to test an error handling routine. 10 ON ERROR GOTO 7[...]
-
Page 33
CHAPTER 5 DISK FILE INPUT/OUTPUT BASIC-SO includes two types of disk file Input/Output operations: sequential and random. Sequential I/O lets you read or write a file from the beginning to the end; random I/O lets you specify where in the file you read or write. Because BASIC-SO runs under ISIS-II and RMX/SO, filenames correspond to the ISIS-II and[...]
-
Page 34
Disk File Input/Output 5-2 String and numeric expressions can replace any of the parameters: OPEN M$,FN, DN$+ "OUTPUT" This statement opens a file for either input or output, depending on the value of M$ (it must be either "I" or "0") and assigns the file number represented by FN (it must be from 1 to 6). The name of t[...]
-
Page 35
BASIC-80 Disk File Input/Output LINE INPUT, on the other hand, ignores blanks, commas, and quotation marks, and reads everything between the current file position and the next carriage return- line feed, or up to 255 characters. If the last INPUT did not read to the end of a logical line, LINE INPUT will read to the end of that line before reading [...]
-
Page 36
Disk File Input/Output 5-4 Random File I/O Random I/O requires a bit more care and coding than sequential I/O, but is more flexible because you can move back and forth within a disk file. These are the key differences: • To get data from random disk files to BASIC-80 variables and vice-versa, you must understand how BASIC-80 uses 110 buffer space[...]
-
Page 37
BASIC-SO Disk File Input/Output The FIELD statement can precede or follow the GET statement, but N$ doesn't contain those first 20 bytes until the FIELD statement. (A similar definition of fields must be done when writing to a random file with the PUT statement; the FIELD statement, obviously, must precede the PUT statement so that BASIC-80 wi[...]
-
Page 38
Disk File Input/Output 5-6 Opening and Closing a Random Disk File As with sequential disk files, you must open random disk files before you can write to them or read from them, and close them when you're through. A random file isn't opened for either input or output, however; once it's open for random I/O, you can read from it or wri[...]
-
Page 39
BASIC-SO Disk File Input/Output It's not quite so simple to print or do calculations with numeric values from random I/O files, however, because they are represented as strings. You must convert each string that represents a number to its corresponding numeric value, either integer, single-precision floating-point, or double-precision floating[...]
-
Page 40
Disk File Input/Output 5~8 Remember that random disk files are stored as strings. Just as you must convert fields that represent numeric values when you read them (using eVI, CVS, or CVD), so must you convert numeric values to their corresponding strings when writing to a random file, using the MKI$, MKS$, and MKD$ functions. Again, you must be sur[...]
-
Page 41
ATTRIB CHAPTER 6 COMMANDS AND STATEMENTS The A TTRIB command changes certain specified attributes of BASIC-80 disk files. You can protect any file from writing or deleting or renaming by enabling the 'write protect' attribute, and you can later disable this attribute to alter or delete the specified file. The formats for these two operati[...]
-
Page 42
Commands and Statements 6-2 If a second expression is specified, it indicates the highest memory location available to BASIC. This number is similar to the MEMTOP option. If not specified, the highest memory location used is unchanged. At sign-on only 100 bytes of string storage space are available. CLEAR 2000, ODOOOH will reserve 2000 (decimal) by[...]
-
Page 43
BASIC-SO Commands and Statements DATA The DATA statement prefaces lines of data that are read sequentially by the READ command and assigned as values to variables. The data is separated by commas and may be numeric, strings, or quoted strings. If strings are not surrounded by quotes (" ") they may not contain commas (,) or semicolons (;) [...]
-
Page 44
Commands and Statements 6-4 DEFSNG DEFDBL DEFSTR DEFINT The DEFSNO, DEFDBL, DEFSTR, and DEFINT statements are used to specify that a given block of letters will designate a specific data type when used as the first letter of variable names. The DEFSNO, DEFDBL, DEFSTR, and DEFINT statements specify single precision floating point, double precision f[...]
-
Page 45
BASIC-SO Commands and Statements DELETE' The DELETE command removes specified instruction lines from program tex,t. A single line or block of lines may be deleted, as shown in the syntactic format and example below. Instruction lines prior to and including the specified line may be deleted by adding a dash (-) before a line number. When deleti[...]
-
Page 46
Commands and Statements 6-6 DIR The DIR command displays the names, number of blocks, and length (in bytes) of the files saved on the specified disk. If no drive number is specified, the default is drive O. DIR may be used as a command or as a statement. DIR [drive number] EDIT The EDIT command is used to modify single program lines. In this mode, [...]
-
Page 47
BASIC-SO Commands and Statements ERROR expression 10 INPUT A,B,C 12 IF B=O THEN ERROR 11 14 PRINT AlB 20 END RUN ? 40,0,17 DIVISION BY ZERO IN 12 Ok EXIT The EXIT command terminates operation of the BASIC-80 interpreter and returns control to ISIS-II. EXIT closes all open files, but does not automatically save pro- grams. If you EXIT without saving[...]
-
Page 48
Commands and Statements 6-8 If the TO expression is larger than the starting expression and the step expression is negative then the loop will not execute. Similarly, if the TO expression is less than the starting expression and the STEP expression is positive, then the loop will not execute. After the conclusion of the loop, variable A contains th[...]
-
Page 49
BASIC-SO Commands and Statements GOTO The GOTO (line number) statement transfers execution of instruction lines from the current line to the line number specified. There is no provision for a return to the branching point. GOTO line numberl GO TO line number The GO TO in line 270 causes a jump to line 100. 250 IF EOF(6) THEN 300 260 PRINT "FIL[...]
-
Page 50
Commands and Statements 6-10 KILL The KILL command deletes files from disk storage, and removes all references to the deleted file from the directory. Once a file has been killed, it cannot be reopened. KILL filename LET The LET statement is used to give a value to a variable. If a variable appears to the left of an equal sign not preceded by the w[...]
-
Page 51
BASIC-SO Commands and Statements In the example below, LIST 30 prints line 30 only; LIST -30 prints all lines up to and including 30; list 30- prints all lines after 30, including 30; LIST 30-50 prints lines 30, 40, and 50; LIST prints the entire program text. 10 PRINT CHR$(12) 20 INPUT A,B,C 30 PRINT (A + B + C)/3 40 PRINT 50 END LIST 30 30 PRINT([...]
-
Page 52
Commands and Statements 6-12 cannot later be assigned values with the LET statement. This is because strings are assigned new storage locations when given new values and this destroys the effect of the FIELD statement. Accordingly, the LSET and RSET statements must be used to assign new values. These commands may also be used with normal string sta[...]
-
Page 53
BASIC-80 Commands and Statements NEXT The NEXT statement is used with a previous FOR statement to end an iteration of a FOR-NEXT loop; when BASIC-SO encounters a NEXT statement, control passes back to the statement line containing the last FOR statement. If no index variable is specified, BASIC-SO increments the variable specified in the last FOR s[...]
-
Page 54
Commands and Statements 6-14 ON ... GOSUB The ON ... GOSUB statement transfers program control to one or one of a set of subroutines.The line numbers of the first lines of these subroutines follow sequen- tially, separated by commas. If the expression evaluates to 3, control transfers to the third line number following GOSUB. ON expression GOSUB li[...]
-
Page 55
BASIC-SO Commands and Statements The example below shows a typical use of OPEN in an 110 program.See Chapter 5 for further details of disk random 110. 10 OPEN "R" ,#3, "F1 :PERSON" 20 GET #3,1 30 FIELD #3,20 AS N$, 9 AS SS$ 40 PRINT N$,SS$ RUN JONES, JOHN J. 517317010 Ok OPTION BASE The OPTION BASE command is used to begin index[...]
-
Page 56
Commands and Statements 6-16 PRINT The PRINT statement returns the value of expressions or the text of strings to the console, or to any ISIS-II file. Literal strings must be enclosed in quotation marks ("); variables and expressions need no quotation marks. You can print data to any ISIS-II file by specifying a file number. If a comma (,) is [...]
-
Page 57
BASIC-80 Commands and Statements As can be seen, PRINT USING "!" prints a string consisting of the first letters of each string. PRINT USING 2 spaces prints a string consisting of four characters from X$ (3 plus a space) and four from Y$ (also 3 plus a space). If Y$="SEVEN", the result printed when line 40 is executed would [...]
-
Page 58
Commands and Statements 6-18 $$ The double dollar sign ($$) adds a single dollar sign to the immediate left of the number being formatted. PRINT USING "$$###.##"; -48.28; 364.90 -$48.28 $364.90 ($$) specifies space for two additional characters, but the $ added takes up one posi- tion. The exponential format cannot be used with ($$). **$ [...]
-
Page 59
BASIC-SO Commands and Statements PUT file number, [sector number] 10 OPEN "R", 1, ":F1:FILE.1" 20 FIELD 10 AS A$ 30 INPUT A$ 40 PUT 1,1 50 CLOSE 1 60 STOP RUN ? "A STRING" Ok RANDOMIZE The RANDOMIZE statement prompts the user for a new random number seed for the random number function RND. If the RANDOMIZE command is n[...]
-
Page 60
Commands and Statements 6-20 REM The REM statement is used to insert commentary remarks into program text. Any instruction line that begins with REM following its line number is passed over, and program control passes to the next line. Within a remark, : (colon) is simply another character, not a statement separator. REM 10 REM THIS PROGRAM FINDS T[...]
-
Page 61
BASIC-SO Commands and Statements RESTORE [line number] 10 DATA 48,49,51,53,58 20 DATA 104,108,116,132,164,5000,5000 30 READA,B 560 IF B<5000 THEN 30 570 RESTORE 580 READA,B RESUME The RESUME statement restarts program execution after an error has been detected and handled. Program execution begins at the line specified; or if no line number is s[...]
-
Page 62
Commands and Statements 6-22 RUN The RUN command starts the execution of a program or a set of programs. If you enter RUN alone, it executes the current program starting at the lowest line number. If you enter RUN followed by a line number, it executes the current program start- ing at the specified line number. If you enter RUN followed by a strin[...]
-
Page 63
BASIC-80 Commands and Statements SAVE string expression [,A] 10 INPUT A,B,C 20 PRINT (A + B + C)/3 30 END SAVE "AVER" OK RUN "AVER" ? 5,8,2 5 Ok STOP The STOP statement halts program execution and prints a BREAK IN (line number) message. Following this, BASIC-80 is in the command mode. After execution of a STOP, program variable[...]
-
Page 64
Commands and Statements 6-24 TRON TROFF 10 INPUT A,B,C 20 PRINT(A+B+C)/3 30 END TRON OK RUN [10]42, 48, 45 [20]45 [30] OK TROFF OK RUN 30, 18,12 20 Ok WAIT The WAIT statement instructs BASIC-80 to monitor incoming bytes from a specified port. These bytes are tested with a mask byte, which is an integer expres- sion in the range 0 to 255. The result[...]
-
Page 65
ABS CHAPTER 7 FUNCTIONS The ABS function returns the absolute value of the specified expression. The absolute value of an expression is its numeric value with a positive sign. ABS(expression) 10 INPUT A 20 A = ABS(A *2) 30 PRINT A 40 END RUN ?5 10 Ok RUN ? -5 10 Ok Ase The ASC function returns the ASCII code of the first character of the specified [...]
-
Page 66
Functions 7-2 COBl The CDBL(X) function changes the type of expression (X) into double precision floating-point representation. In this format, calculations are accurate to 16 decimal places, compared to an accuracy of 7 decimal places in single precision floating- point representation. Many fractions (such as 1/3 and .1) cannot be precisely repres[...]
-
Page 67
BASIC-80 cos The COS function returns the cosine value of the specified expression. The input is given in radians. The calculation is performed in single precision. COS(expression) 10 INPUT A 20 B = COS (A) 30 PRINT B 40 END RUN ?5 .2836621 Ok CSNG The CSNG(X) function changes the type of expression into single-precision floating- point representat[...]
-
Page 68
Functions 7-4 DSKF The DSKF function returns the number of 128-byte sectors that are free on the specified disk. The examples below signify that there are 50* 128, or 6.4 kilobytes of free space on disk 1. DSKF (drive number) PRINT DSKF (1) 50 OK EOF The EOF function detects when the end of the file is reached when reading a sequen- tial data file.[...]
-
Page 69
BASIC-SO The following program asks for a divisor and a dividend, and uses the error- trapping routine in lines 60-90 to prevent division by zero (which has code 11) from stopping the execution: 10 ON ERROR GOTO 60 20 INPUT "WHAT ARE THE NUMBERS TO DIVIDE";X,Y 30 Z = X/Y 40 PRINT "QUOTIENT IS";Z 50 GOTO 20 60 IF ERR <> 11 [...]
-
Page 70
Functions 7-6 HEXS The HEX$(X) function returns a string of hexadecimal digits which represents the hexadecimal value of the integer argument. In BASIC-SO, integers are from -3276S to 32767, but SOSO/SOS5 memory addresses go from 0 to 65535 decimal. HEX$ will handle arguments in both ranges correctly. HEX$ (expression) PRINT HEX$ (-1), HEX$ (65535)[...]
-
Page 71
BASIC-80 INSTR The INSTR function searches for the first occurrence of the second given string within the first given string, and returns the first position of the second string as an ordinal number. The optional argument, an expression I greater than 0 and less than 255, starts the search at I characters. The INSTR function returns a 0 under three[...]
-
Page 72
Functions 7-8 LEN The string function LEN(X$) returns the length, in number of characters, of string X$. All characters are counted, including non-printing characters and blanks. LEN (string expression) 10 X$ = "JOHN J. JONES" 20 PRINT LEN(X$) 30 END RUN 13 Ok LOC The LOC function has two uses. When used with a random file, LOC returns th[...]
-
Page 73
BASIC-SO MID$ The MID$(X$,1. [,J]) function examines string X$ and returns the rightmost characters starting at pointer 1. I and J are integers in the range 1-255. If argument J is specified, J characters are returned, starting at position 1. If I is greater than LEN(X$), the MID$ function returns the null string. If argument J is greater than the [...]
-
Page 74
Functions 7-10 PEEK The PEEK function reads a single byte from memory at the location specified. The corresponding POKE statement writes a byte into a specified memory location. PEEK (expression) PRINT PEEK(OFABH) 200 P~S The POS function returns the position of the cursor after the last PRINT statement. The argument I is a dummy argument. The left[...]
-
Page 75
BASIC-SO SGN The SON function returns the sign of the specified expression. If the expression is greater than 0, SON returns 1. If the expression is 0, SON returns a 0. If the expres- sion is less than 0, SON returns -1. SGN(expression) 10 INPUT A 20 LET B = 3.14159*SGN(A) 30 PRINT B 40 END RUN ? 44 3.14159 OK RUN ? -12 -3.14159 OK RUN ?O o Ok SIN [...]
-
Page 76
Functions 7-12 SPC The SPC function returns a string of spaces n characters long when used with a PRINT statement, as in the example below. SPC, unlike the SP ACE$ function, does not return an actual string, only a series of spaces. It may only be used with a PRINT statement. SPC (integer) 10 PRINT 20 PRINT SPC (10); "Question 1 ":PRINT:P[...]
-
Page 77
BASIC-SO STR$ The STR$ function returns a string of decimal digits that represent the value of the integer expression. STR$ (expression) 10 FOR 1=0 TO 9 20 A$ = A$ + MID$ (STR$ (I), 2) 30 NEXT 1 40 PRINT A$ RUN 0123456789 Ok TAB The TAB function spaces to the specified column position at the terminal. The left- most column is 1 and the rightmost is[...]
-
Page 78
Functions 7-14 Only integers can be used as arguments; other variables must be passed by reference. This is done with the V ARPTR function, which returns the address of the specified variable. USR[$I#l% I!][n] [(parameter ... )] Here is an example of how the USRn statement is used: 10 CLEAR 1000, ODFFFH 20 DEFUSR4 = OEOOOH 30 A$ = "A STRING&qu[...]
-
Page 79
APPENDIX A BASIC-SO ERROR CODES Table A-I. BASIC-80 Error Codes Error NEXT without FOR SYNTAX ERROR RETURN without GOSUB_ Outof DATA Illegal function call Overflow Out of memory Undefined line number Subscript out of range Duplicate Definition Division by zero Illegal direct Type mismatch Out of string space String too long String formula too compl[...]
-
Page 80
BASIC.80 Error Codes Table A-I. BASIC-SO Error Codes (Cont'd.) A-2 Error Missing operand line buffer overflow FOR without NEXT FIELD overflow Internal error Bad file number File not found Bad file mode File already open Disk 1/0 error File already exists Disk full Input past end Bad record number Bad file name Direct statement in file Too many[...]
-
Page 81
APPENDIX B BASIC-SO RESERVED WORDS The following list shows 126 words that cannot be used as names of variables. If you attempt to do so, errors, error messages, or both will result. A valid variable name is one or more alphanumeric characters, the first of which must be a letter. If more than two characters are given, the rest are ignored. ABS AND[...]
-
Page 82
[...]
-
Page 83
APPENDIX C BASIC-80 COMMAND CHARACTERS BASIC-80 has certain single control characters (characters produced by pressing the letter and the CONTROL key simultaneously) that cause something to happen immediately. These characters are listed below. To edit the last line entered: To halt program execution and return to command level: To tab across the l[...]
-
Page 84
[...]
-
Page 85
Table D-l. ASCII Code List Decimal Octal Hexadecimal Character Decimal 0 000 00 NUL 64 1 001 01 SOH 65 2 002 02 STX 66 3 003 03 ETX 67 4 004 04 EOT 68 5 005 05 ENQ 69 6 006 06 ACK 70 7 007 07 BEL 71 8 010 08 BS 72 9 011 09 HT 73 10 012 OA IF 74 11 013 08 VT 75 12 014 OC FF 76 13 015 00 CR n 14 016 OE SO 78 15 017 OF SI 79 16 020 10 OLE 80 17 021 11[...]
-
Page 86
ASCII Codes BASIC-SO Table D-2. ASCII Code Definition Abbreviation Meaning Decimal Code NUL NULL Character 0 SOH Start of Heading 1 STX Start of Text 2 ETX End of Text 3 EaT End of Transmission 4 ENQ Enquiry 5 ACK Acknowledge 6 BEL Bell 7 BS Backspace 8 HT Horizontal Tabulation 9 LF Line Feed 10 VT Vertical Tabulation 11 FF Form Feed 12 CR Carriage[...]
-
Page 87
APPENDIXE CALLING NON-BAStC-SO SUBROUTINES You can write a subroutine in FORTRAN-SO, PL/M':SO, or SOSO/SOS5 assembly language, convert it into relocatable code, load it into free memory, and access it directly from BASIC-SO. Any number of variables can be referenced, following PL/M conventions for passing parameters to subroutines. You will ne[...]
-
Page 88
Calling Non-BASIC-80 Subroutines E-2 When you have determined the optimum starting address for your subroutine, you can LOCATE it there with this command. LOCATE converts the relocatable object code to absolute object code, according to the starting address given. An example of giving the starting address for your subroutine code is shown below. LO[...]
-
Page 89
BASIC-80 Calling Non-BASIC-80 Subroutines To return a single-precision floating-point, double-precision floating-point, or string result, you must use the appropriate data type character (see table 2-5 for a list of these characters) before the subroutine number in the USR function. For example, to tell BASIC-SO that a user-written subroutine retur[...]
-
Page 90
Calling Non-BASIC-SO Subroutines E-4 Some Real Examples The three sample programs provided in Figures E-2, E-3, and E-4 show how the same subroutine- adding three integer arguments-can be coded in FORTRAN-SO, PL/M-SO, and SOSO/SOS5 assembly language. Notice that each program requires three parameters. Once you have processed your subroutine through[...]
-
Page 91
BASIC-SO Calling Non-BASIC-SO Subroutines ASN8B.OY3 :Fl:USRASH.ASH ISIS-II 8181/8185 "ACRO ASSEHBLER. Y2.1 USRAS" PACE Lce 09J BBIS El BBBI 229BBB BSB4 21BBBB BSB? COICBB BIBA 5B IBBB 59 BBBC COICBI BBBF 01 BBl8 CDICBB B813 EB BB14 El BUS 73 B81' 23 BB17 72 BU8 2AIBBB BBlB E9 BIIC E5 BII0 EB BIlE 5E BI IF 23 B82B 5' 8121 El B822[...]
-
Page 92
Calling Non-BASIC-SO Subroutines E-6 ISIS-II PL/H-8B Vl.l COMPILATION OF MODULE PLHHODULE OBJECT ",oDULE PLACED IN :Fl:USRPLM.OBJ COMPILER INVOKED BY: PLH8B :Fl:USRPLH.PLH 2 3 4 5 6 1 2 2 2 2 1 PLM:$HODULE: DO; USRPLH: PROCEDURE(PRESULT,PARGA;PARGB,PARGC); DECLARE (PRESULT,PARGA,PARGB,PARGC) ADDRESS; DECLARE (RESULT BASED PRESULT~ ARCA BASED P[...]
-
Page 93
APPENDIX F RMX/SO BASIC-SO This appendix describes the differences between the RMX/SO version of BASIC-SO and the ISIS-II version, and tells you the requirements and procedures for generating disk-based or ROM-based versions of RMX/SO BASIC-SO. It is recom- mended that you refer to the RMX/SO User's Guide and RMX/SO Installation Guide for supp[...]
-
Page 94
RMX/SO BASIC-SO F-2 • With RMX/SO BASIC-SO, you can create BASIC programs and program them into PROMs for permanent reference. • You can configure RMX/SO to execute a PROM-resident BASIC-SO program immediately on restart. • If you wish to interrupt program execution when BASIC-SO expects input from the console, you must enter CONTROL-C follow[...]
-
Page 95
BASIC-SO RMX/SO BASIC-SO Table F-l. Sample Configuration Jumper Wiring Board Connect Jumper Remove Jumpers iSBC 80/30 Interrupt 131-152 (INTERRUPT 2) Handling 141-132 (EVENT ClK-IR1) 123-138 (COUNT OUT-INTR 7.5) 47-51 (ClK 0-A12-11) 46-47 (ClK 1-ClK 0) 143-127 (RXR INTR-IR 6) 47-52 (ClK O-ClK 2) 142-126 (TXR INTR-IR 7) 145-140 (Ground INTR 5.5) 145[...]
-
Page 96
RMX/SO BASIC-SO F-4 When you have configured your system, follow these steps to initiate BASIC-80: 1. Insert the supplied PROMl in socket 0 and PROM2 in socket 1 of the iSBC 80/30. 2. Turn on power to the disk drives and iSBC system. 3. Insert your single density BASIC-80 disk into drive O. 4. Type an upper case U at the terminal keyboard until the[...]
-
Page 97
BASIC-80 RMX/80 BASIC-80 Drive 1: In drive I, you must have a disk with these modules: The RMX/SO nucleus, factory-configured for an iSBC SO/IO, SO/20,orSO/30. The RMX/SO extension files, including the Disk File System, and the RMX/SO Boot Loader files for the appropriate CPU board. Once these two disks are present in the proper drives, you can beg[...]
-
Page 98
· RMX/SO BASIC-SO F-6 CPU SET 30 ; MODEL OF CPU BOOTED SET 1 ; 1 IF BOOT VERSION, ELSE 0 TERMH SET 1 ; 1 FOR FULL TH,O FOR MINI RATE SET 0 ; BAUD RATE FACTOR CONTR SET 204 ; CONTROLLER NUMBER DFS SET 6 ; NUMBER OF DFS FILES USED UIO SET 0 ; 1 IF USER 110 DRIVERS ELSE 0 NFILES SET 6 ; TOTAL FILES HIRAM SET OFFFFH ; HIGHEST RAM LOCATION BOTMEM SET O[...]
-
Page 99
BASIC-SO RMX/SO BASIC-SO After you modify BQOPS.ASM and verify the contents of the BOOTCM.ASM and BQBMEM.ASM modules, you are ready to generate your boot loader. To do this, you must assemble BOOTCM.ASM and BQBMEM.ASM, and LINK and LOCATE the resultant object code. The GBOOT.CSD module will do this with the SUBMIT command. Figure F-2 is a listing o[...]
-
Page 100
RMX/80 BASIC-80 F-8 NOTE The RMX/80 Nucleus declares all interrupt exchanges except RQLIEX (us- ed for the system clock) as EXTERNAL. This is because user interrupt tasks must define the exchanges as needed. Any of these interrupt exchanges not used in a system, and therefore not declared in user code, is treated as an unresolved external reference[...]
-
Page 101
BASIC-SO RMX/SO BASIC-SO The configuration explained below does not use DFS. Accordingly, the CONTR, DFS, and NFILES options shown in the BQOPS.ASM module are set to 0, and there are no references to the DFS libraries in the GBASIC.CSD module shown. With this configuration, memory must be organized as follows (see the iSBC 80/20 Hardware Reference [...]
-
Page 102
RMX/SO BASIC-SO F-IO ASM80 :FO:BASCM.ASM MACROFILE (:FO:) NOLIST NOSYMBOLS ASM80 :FO:BOMEM.ASM MACROFILE(:FO:) NOLIST NOSYM BOLS LINK & :F1 :RMX820.L1B(START), & :FO:BASCM.OBJ,& :FO:RMXBAS.LlB,& :F1 :MTI820.LlB,& :F1 :MT0820.L1B,& :F1 :RMX820.L1B,& :F1 :DFSUNR.LlB,& :F1 :UNRSLV.L1B,& :F1 :PLM80.LlB,& :FO:BQME[...]
-
Page 103
BASIC-SO RMX/SO BASIC-SO 2. LiNK RMX810.LIB (START), BASCM.OBJ, and as many DFS and terminal handler system modules as will fit on on-board PROM into one module. Don't worry about unresolved external references-these will be resolved in step 6. 3. LOCATE the module LINKed in step 2 with CODE (0) and DATA (3COOH). This specifies that the progra[...]
-
Page 104
RMX/80 BASIC-SO F-12 Configuring DFS on an iSBC 80/10 If you're using DFS with a PROM-Based BASIC-80 on the iSBC 80/10, you must add a line of code to the GBASIC.CSD module distributed on diskette. This code specifies use of the iSBC 201,202,204, or 206 disk controller. For the iSBC 201,202 or 206, add : :Fl :DIOSI0.LIB(VI0HDI),& For the i[...]
-
Page 105
BASIC-SO RMX/SO BASIC-SO Public Variables An area of RAM as large as possible should be allocated for BASIC-80 work space. The user must supply two routines, BQSMEM and BQEMEM which return the ad- dress of the first byte of BASIC-80 work space in registers Hand L and the last byte of BASIC-80 work space, respectively. The HL register requirement is[...]
-
Page 106
RMX/80 BASIC-80 F-14 Adding User-Written I/O Drivers to RMX/SO BASIC-SO You can add your own 1/0 drivers to any configuration of RMX/80 BASIC-80, so that BASIC-80 input and output statements employ user-defined 110 drivers. BASIC-80 treats these drivers as files with the device label :Ll:. This is the proper syntax, as shown in opening a sequential[...]
-
Page 107
BASIC-80 USER TERMINAL HANDLER TO OUTPUT FOR FILE :L1: NAME PUBLIC EXTRN CSEG BQUSER BQUSER BQOPNX,RQSEND,RQWAIT,RQOUTX ; WAIT FOR MESSAGE AT BQOPNX ; OPEN AND CLOSE ARE IGNORED BQUSER: LXI B,BQOPNX :EXCHANGE FOR USER OPEN LXI 0,0 ;WAIT FOREVER CALL RQWAIT PUSH H ;MESSAGEADOR LXI 0,4 ;OFFSET OF TYPE DAD 0 MOV A,M LXI D,S DAD 0 ;MESSAGE TYPE ;STATUS[...]
-
Page 108
RMX/SO BASIC-SO F-16 Altering BASIC-80 Workspace The BASIC-80 work.space stores the current BASIC-80 program, variables, con- stants, file buffers, strings. It should be as large as is practical. Table F -2. Sample Configuration Memory Requirements Module PROM (bytes) RAM (bytes) RMXBAS.LlB 22287 1415 BOOTCM.OBJ 87 197 BASCM.OBJ 151 538 BOMEM.OBJ 1[...]
-
Page 109
BASIC-SO RMX/SO BASIC-SO BAPROM is a program (and the name of the file that contains it) that runs under ISIS-II. It converts an ASCII file to Intel SOSO/SOS5 relocatable object file format. It is not a compiler; it transforms ASCII data to a form that can be LOCATEd. It requires an Intellec or Intellec Series II microcomputer development system, a[...]
-
Page 110
[...]
-
Page 111
ABS, 7-1 arithmetic functions, ABS, 7-1 ATN,7-1 COS, 7-3 EXP, 7-5 INT,7-7 LOG,7-8 RND,7-10 SGN,7-11 SIN,7-11 SQR,7-12 TAN,7-13 arrays, 2-9 DIM,6-5 OPTION BASE, 6-15 strings, 2-10 variables, 2-9 ASC, 7-1 ASCII codes, D-l assembly language subroutines, E-l ATN,7-1 ATTRIB,6-1 AUTO, 6-1 boolean operators (see logical operators) built-in functions, 2-3 [...]
-
Page 112
Index Index-2 DEFDBL, 2-5, 6-4 DEFFN,6-3 DEFINT, 2-5, 6-4 DEFSNG, 2-5, 6-4 DEFSTR,6-4 DEFUSR, E-2, 6-4 DELETE,6-5 DIM, 2-9, 6-5 dimensioning, 2-9 numeric arrays, 2-9 string arrays, 2-10 DIR, 1-3,6-6 disk file 110,5-1 CLOSE, 5-3, 6-2 OPEN, 5-1, 6-14 random, 5~4 FIELD, 5-4, 6-7 GET, 5-6, 6-8 I/O buffers, 5-4 LSET, 5-7, 6-11 PUT, 5-7, 6-18 reading, 5-[...]
-
Page 113
BASIC-80 Index INPUT$,7-6 LIST,6-10 INSTR~ 7-7 LOAD, 1-4,6-11 INT,7-7 LOC, 5-8, 7-8 LEFT$,7-7 LOF, 5-8, 7-8 LEN,7-S LOG,7-8 LOC,7-S logical operators, 2-10 LOF,7-S AND, 2-11 LOG,7-S EQV, 2-11 MID$,7-9 IMP, 2-11 MKD$, 5-8,7-9 NOT,2-11 MKI$, 5-S, 7-9 OR,2-11 MKS$, 5-S, 7-9 XOR,2-11 OCT$, 2-9, 7-9 LSET, 5-7, 6-11 PEEK,7-1O POS, 7-10 MERGE, 6-12 RIGHT$[...]
-
Page 114
Index Index-4 SAVE, 1-4,6-22 SGN,7-11 SIN,7-11 single-precision floating-point constants, 2-7 SPACE$,7-11 SPC, 7-12 SQR,7-12 statements, CLOSE, 5-3, 6-2 DATA,6-3 DEFDBL, 2-5,6-4 DEFFN,6-3 DEFINT, 2-5, 6-4 DEFSNG, 2-5,6-4 DEFSTR,6-4 DEFUSR, E-2, 6-4 DIM, 2-9, 6-5 ELSE,6-9 END,6-6 FIELD, 5-4, 6-7 FOR-NEXT -STEP, 6-7 GET, 5-6, 6-8 GOSUB,6-8 GOTO, 6-9 [...]
-
Page 115
REQUEST FOR READER'S COMMENTS BASIC-80 Reference Manual 9800758-02 The Microcomputer Division Technical Publications Department attempts to provide documents that meet the needs of all Intel product users. This form lets you participate directly in the documentation process. Please restrict your comments to the usability, accuracy, readability[...]
-
Page 116
tlE'D LIKE YOUR COMMENTS ••• rhis document is one of a series describing Intel products. Your comments on the back of this form will help us produce better manuals. Each reply will be carefully reviewed by the responsible person. All ::omments and suggestions become the property of Intel Corporation. BUSIN ESS REPLY MAIL FIRST CLASS PERM[...]
-
Page 117
[...]
-
Page 118
INTEL CORPORATION, 3065 Bowers Avenue, Santa Clara, CA 95051 (408) 987·8080 Printed in U.S.A.[...]