@m100/core 0.8.2 → 0.9.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/data/keywordCategories.json +69 -0
- package/dist/data/keywordDataset.json +1935 -0
- package/dist/diagnostics/diagnostics.d.ts +15 -0
- package/dist/diagnostics/diagnostics.js +368 -0
- package/dist/diagnostics/diagnostics.js.map +1 -0
- package/dist/diagnostics/formatMessage.d.ts +19 -0
- package/dist/diagnostics/formatMessage.js +96 -0
- package/dist/diagnostics/formatMessage.js.map +1 -0
- package/dist/index.d.ts +5 -1
- package/dist/index.js +5 -1
- package/dist/index.js.map +1 -1
- package/dist/keywords.d.ts +28 -0
- package/dist/keywords.js +188 -0
- package/dist/keywords.js.map +1 -0
- package/dist/languageFeatures.d.ts +24 -0
- package/dist/languageFeatures.js +195 -0
- package/dist/languageFeatures.js.map +1 -0
- package/dist/utils/programAnalysis.d.ts +18 -6
- package/dist/utils/programAnalysis.js +102 -4
- package/dist/utils/programAnalysis.js.map +1 -1
- package/package.json +1 -1
|
@@ -0,0 +1,1935 @@
|
|
|
1
|
+
{
|
|
2
|
+
"generatedAt": "2025-12-07T23:24:53.073Z",
|
|
3
|
+
"keywords": [
|
|
4
|
+
{
|
|
5
|
+
"name": "'",
|
|
6
|
+
"variants": [
|
|
7
|
+
"'"
|
|
8
|
+
],
|
|
9
|
+
"documentation": [
|
|
10
|
+
{
|
|
11
|
+
"variant": "'",
|
|
12
|
+
"description": "",
|
|
13
|
+
"syntax": "'",
|
|
14
|
+
"longDescription": ""
|
|
15
|
+
}
|
|
16
|
+
]
|
|
17
|
+
},
|
|
18
|
+
{
|
|
19
|
+
"name": "*",
|
|
20
|
+
"variants": [
|
|
21
|
+
"*"
|
|
22
|
+
],
|
|
23
|
+
"documentation": [
|
|
24
|
+
{
|
|
25
|
+
"variant": "*",
|
|
26
|
+
"description": "",
|
|
27
|
+
"syntax": "*",
|
|
28
|
+
"longDescription": ""
|
|
29
|
+
}
|
|
30
|
+
]
|
|
31
|
+
},
|
|
32
|
+
{
|
|
33
|
+
"name": "+",
|
|
34
|
+
"variants": [
|
|
35
|
+
"+"
|
|
36
|
+
],
|
|
37
|
+
"documentation": [
|
|
38
|
+
{
|
|
39
|
+
"variant": "+",
|
|
40
|
+
"description": "",
|
|
41
|
+
"syntax": "+",
|
|
42
|
+
"longDescription": ""
|
|
43
|
+
}
|
|
44
|
+
]
|
|
45
|
+
},
|
|
46
|
+
{
|
|
47
|
+
"name": "-",
|
|
48
|
+
"variants": [
|
|
49
|
+
"-"
|
|
50
|
+
],
|
|
51
|
+
"documentation": [
|
|
52
|
+
{
|
|
53
|
+
"variant": "-",
|
|
54
|
+
"description": "",
|
|
55
|
+
"syntax": "-",
|
|
56
|
+
"longDescription": ""
|
|
57
|
+
}
|
|
58
|
+
]
|
|
59
|
+
},
|
|
60
|
+
{
|
|
61
|
+
"name": "/",
|
|
62
|
+
"variants": [
|
|
63
|
+
"/"
|
|
64
|
+
],
|
|
65
|
+
"documentation": [
|
|
66
|
+
{
|
|
67
|
+
"variant": "/",
|
|
68
|
+
"description": "",
|
|
69
|
+
"syntax": "/",
|
|
70
|
+
"longDescription": ""
|
|
71
|
+
}
|
|
72
|
+
]
|
|
73
|
+
},
|
|
74
|
+
{
|
|
75
|
+
"name": "<",
|
|
76
|
+
"variants": [
|
|
77
|
+
"<"
|
|
78
|
+
],
|
|
79
|
+
"documentation": [
|
|
80
|
+
{
|
|
81
|
+
"variant": "<",
|
|
82
|
+
"description": "",
|
|
83
|
+
"syntax": "<",
|
|
84
|
+
"longDescription": ""
|
|
85
|
+
}
|
|
86
|
+
]
|
|
87
|
+
},
|
|
88
|
+
{
|
|
89
|
+
"name": "=",
|
|
90
|
+
"variants": [
|
|
91
|
+
"="
|
|
92
|
+
],
|
|
93
|
+
"documentation": [
|
|
94
|
+
{
|
|
95
|
+
"variant": "=",
|
|
96
|
+
"description": "",
|
|
97
|
+
"syntax": "=",
|
|
98
|
+
"longDescription": ""
|
|
99
|
+
}
|
|
100
|
+
]
|
|
101
|
+
},
|
|
102
|
+
{
|
|
103
|
+
"name": ">",
|
|
104
|
+
"variants": [
|
|
105
|
+
">"
|
|
106
|
+
],
|
|
107
|
+
"documentation": [
|
|
108
|
+
{
|
|
109
|
+
"variant": ">",
|
|
110
|
+
"description": "",
|
|
111
|
+
"syntax": ">",
|
|
112
|
+
"longDescription": ""
|
|
113
|
+
}
|
|
114
|
+
]
|
|
115
|
+
},
|
|
116
|
+
{
|
|
117
|
+
"name": "ABS",
|
|
118
|
+
"variants": [
|
|
119
|
+
"ABS"
|
|
120
|
+
],
|
|
121
|
+
"documentation": [
|
|
122
|
+
{
|
|
123
|
+
"variant": "ABS",
|
|
124
|
+
"description": "Absolute value",
|
|
125
|
+
"syntax": "ABS(numeric expression)",
|
|
126
|
+
"longDescription": ""
|
|
127
|
+
}
|
|
128
|
+
]
|
|
129
|
+
},
|
|
130
|
+
{
|
|
131
|
+
"name": "AND",
|
|
132
|
+
"variants": [
|
|
133
|
+
"AND"
|
|
134
|
+
],
|
|
135
|
+
"documentation": [
|
|
136
|
+
{
|
|
137
|
+
"variant": "AND",
|
|
138
|
+
"description": "Logical AND",
|
|
139
|
+
"syntax": "expression AND expression",
|
|
140
|
+
"longDescription": ""
|
|
141
|
+
}
|
|
142
|
+
]
|
|
143
|
+
},
|
|
144
|
+
{
|
|
145
|
+
"name": "ASC",
|
|
146
|
+
"variants": [
|
|
147
|
+
"ASC"
|
|
148
|
+
],
|
|
149
|
+
"documentation": [
|
|
150
|
+
{
|
|
151
|
+
"variant": "ASC",
|
|
152
|
+
"description": "ASCII code of first character",
|
|
153
|
+
"syntax": "ASC(string expression)",
|
|
154
|
+
"longDescription": ""
|
|
155
|
+
}
|
|
156
|
+
]
|
|
157
|
+
},
|
|
158
|
+
{
|
|
159
|
+
"name": "ATN",
|
|
160
|
+
"variants": [
|
|
161
|
+
"ATN"
|
|
162
|
+
],
|
|
163
|
+
"documentation": [
|
|
164
|
+
{
|
|
165
|
+
"variant": "ATN",
|
|
166
|
+
"description": "Arctangent",
|
|
167
|
+
"syntax": "ATN(numeric expression)",
|
|
168
|
+
"longDescription": "This function returns the arctangent of numeric expression (in radians). The resulting value ranges from - \u010e\u20ac to \u010e\u20ac. Example ARC = ATN(TH) If TH contains the value 0.5, then this statement sets ARC equal to 0.46364760900081."
|
|
169
|
+
}
|
|
170
|
+
]
|
|
171
|
+
},
|
|
172
|
+
{
|
|
173
|
+
"name": "BEEP",
|
|
174
|
+
"variants": [
|
|
175
|
+
"BEEP"
|
|
176
|
+
],
|
|
177
|
+
"documentation": [
|
|
178
|
+
{
|
|
179
|
+
"variant": "BEEP",
|
|
180
|
+
"description": "Emit a Tone",
|
|
181
|
+
"syntax": "BEEP",
|
|
182
|
+
"longDescription": "This command causes the sound generator to emit a tone for approximately 1/2 second. Example 10 BEEP emits a \\\"beep.\\\""
|
|
183
|
+
}
|
|
184
|
+
]
|
|
185
|
+
},
|
|
186
|
+
{
|
|
187
|
+
"name": "CALL",
|
|
188
|
+
"variants": [
|
|
189
|
+
"CALL"
|
|
190
|
+
],
|
|
191
|
+
"documentation": [
|
|
192
|
+
{
|
|
193
|
+
"variant": "CALL",
|
|
194
|
+
"description": "Call a Machine Level Subroutine",
|
|
195
|
+
"syntax": "CALL address, expression1, expression2",
|
|
196
|
+
"longDescription": "Calls a machine level subroutine beginning at address. Upon entry to the subroutine, the A register contains the value of expressionl and the HL register contains the value of expression2. expressionl is optional and may range from 0 to 255, expression2 is also optional and may range from -32768 to 65535. Example 100 CALL 60000,10,VARPTR(AZ) calls a subroutine beginning at address 60000. Upon entry to the subroutine, register A contains 10, and register HI. contains the address of the variable A%."
|
|
197
|
+
}
|
|
198
|
+
]
|
|
199
|
+
},
|
|
200
|
+
{
|
|
201
|
+
"name": "CDBL",
|
|
202
|
+
"variants": [
|
|
203
|
+
"CDBL"
|
|
204
|
+
],
|
|
205
|
+
"documentation": [
|
|
206
|
+
{
|
|
207
|
+
"variant": "CDBL",
|
|
208
|
+
"description": "Convert to Double-Precision",
|
|
209
|
+
"syntax": "CDBL (numeric expression)",
|
|
210
|
+
"longDescription": "This function converts the value of numeric expression to a double-precision number according to the conversion rules given under \\\"Data Types and Data Manipulation.\\\" Example 10 A# = CDBL(AZ) if A% contains 34, then A# contains 34.000000000000."
|
|
211
|
+
}
|
|
212
|
+
]
|
|
213
|
+
},
|
|
214
|
+
{
|
|
215
|
+
"name": "CHR$",
|
|
216
|
+
"variants": [
|
|
217
|
+
"CHR$"
|
|
218
|
+
],
|
|
219
|
+
"documentation": [
|
|
220
|
+
{
|
|
221
|
+
"variant": "CHR$",
|
|
222
|
+
"description": "Character Value",
|
|
223
|
+
"syntax": "CHR$(numeric expression)",
|
|
224
|
+
"longDescription": "The CHR$ function returns the ASCII character for the value of numeric expression. numeric expression must lie in the range of 0 to 255. CHR$ is the inverse of the function ASC. For a list of ASCII codes, see the Appendices. Examples PRINT CHR$(65) prints the character A. PRINT \\\"He said \\\"CHR$(34);\\\"Hello\\\";CHR$(34) prints the message He said \\\"Hello\\\" (Note: 34 is the ASCII code for the double quote mark, \\\".\\\")"
|
|
225
|
+
}
|
|
226
|
+
]
|
|
227
|
+
},
|
|
228
|
+
{
|
|
229
|
+
"name": "CINT",
|
|
230
|
+
"variants": [
|
|
231
|
+
"CINT"
|
|
232
|
+
],
|
|
233
|
+
"documentation": [
|
|
234
|
+
{
|
|
235
|
+
"variant": "CINT",
|
|
236
|
+
"description": "Convert to Integer",
|
|
237
|
+
"syntax": "CINT(numeric expression)",
|
|
238
|
+
"longDescription": "CINT truncates the decimal portion of numeric expression. The resulting valuc must lie in the range -32768 to 32767. Examples 10 A% = CINT(45.67) sets A% equal to 45. 10 A% = CINT(-2343.55823) sets A% equal to -2343."
|
|
239
|
+
}
|
|
240
|
+
]
|
|
241
|
+
},
|
|
242
|
+
{
|
|
243
|
+
"name": "CLEAR",
|
|
244
|
+
"variants": [
|
|
245
|
+
"CLEAR"
|
|
246
|
+
],
|
|
247
|
+
"documentation": [
|
|
248
|
+
{
|
|
249
|
+
"variant": "CLEAR",
|
|
250
|
+
"description": "Clear Variables and Allocate String Space",
|
|
251
|
+
"syntax": "CLEAR string space, high memory",
|
|
252
|
+
"longDescription": "This command clears the values in all numeric and string variables, and closes all open files. string space is a numeric expression and is optional. If present, BASIC allocates the specified number of bytes of memory for string storage. If you omit string space, BASIC allocates 256 bytes by default. high memory is a numeric expression and is also optional. If present, BASIC sets the top of its memory at the given value. You may use the word MAXRAM to specify the maximum value available RAM (dependent on the configuration of your Model 100). If high memory isn't used, then BASIC defaults to MAXRAM. If you intend on using machine-language subroutines, you need to use CLEAR to protect high memory space for the subroutines. Note that when you enter BASIC, it always resets the string space allocation to 256 bytes. However, if you have protected a portion of high memory in a previous program, BASIC keeps this part of memory protected until you CLEAR it. Examples 10 CLEAR clears all variables, closes open files, sets the available string space to 256 bytes, and releases all of available memory to BASIC: CLEAR 100,50000 clears all variables, closes open files, sets the available string space to 100 bytes, and set 50000 as the highest memory address available to BASIC."
|
|
253
|
+
}
|
|
254
|
+
]
|
|
255
|
+
},
|
|
256
|
+
{
|
|
257
|
+
"name": "CLOAD",
|
|
258
|
+
"variants": [
|
|
259
|
+
"CLOAD"
|
|
260
|
+
],
|
|
261
|
+
"documentation": [
|
|
262
|
+
{
|
|
263
|
+
"variant": "CLOAD",
|
|
264
|
+
"description": "Load a Program From Cassette",
|
|
265
|
+
"syntax": "\u00e2\u20ac\u201d CLOAD \\\"filename\\\", R",
|
|
266
|
+
"longDescription": "The CLOAD command clears the current BASIC program and loads a BASIC program from cassette tape. filename consists of a string of one to six characters, the first of which is a letter. filename is optional; if used, BASIC searches the tape until it finds filename. If not used, BASIC loads the first BASIC program it finds. R is also optional; if used, BASIC executes the new program as soon as the load is complete. As BASIC searches the tape, it prints out the names of any files it skips over. (Note: CLOAD is identical to LOAD \\\"CAS:) Examples `CLOAD \\\"ACCT\\\",R` loads and runs the BASIC program ACCT stored on cassette tape. `CLOAD` loads the first BASIC program found on the cassette tape."
|
|
267
|
+
}
|
|
268
|
+
]
|
|
269
|
+
},
|
|
270
|
+
{
|
|
271
|
+
"name": "CLOSE",
|
|
272
|
+
"variants": [
|
|
273
|
+
"CLOSE"
|
|
274
|
+
],
|
|
275
|
+
"documentation": [
|
|
276
|
+
{
|
|
277
|
+
"variant": "CLOSE",
|
|
278
|
+
"description": "Close Open Files",
|
|
279
|
+
"syntax": "CLOSE file number list",
|
|
280
|
+
"longDescription": "This command closes the files specified in file number list. file number is the number under which the file was opened (See OPEN), and is optional; if omitted, BASIC closes all open files. Example CLOSE 1,2,3 closes the files associated with file numbers 1, 2, and 3."
|
|
281
|
+
}
|
|
282
|
+
]
|
|
283
|
+
},
|
|
284
|
+
{
|
|
285
|
+
"name": "CLS",
|
|
286
|
+
"variants": [
|
|
287
|
+
"CLS"
|
|
288
|
+
],
|
|
289
|
+
"documentation": [
|
|
290
|
+
{
|
|
291
|
+
"variant": "CLS",
|
|
292
|
+
"description": "Clear Screen",
|
|
293
|
+
"syntax": "CLS",
|
|
294
|
+
"longDescription": "CLS turns off all of the LCD pixels on the Screen and moves the Cursor to the upper-left corner of the Screen. Example 100 CLS: PRINT \\\"The old screen is gone!\\\" This clears the Screen and prints out the message in the upper-left corner."
|
|
295
|
+
}
|
|
296
|
+
]
|
|
297
|
+
},
|
|
298
|
+
{
|
|
299
|
+
"name": "COM",
|
|
300
|
+
"variants": [
|
|
301
|
+
"COM ON/OFF/STOP"
|
|
302
|
+
],
|
|
303
|
+
"documentation": [
|
|
304
|
+
{
|
|
305
|
+
"variant": "COM ON/OFF/STOP",
|
|
306
|
+
"description": "Enable/Disable Communications Interrupt",
|
|
307
|
+
"syntax": "COM ON or OFF or STOP",
|
|
308
|
+
"longDescription": "This enables or disables the ON COM interrupt. ON enables the interrupt so that if a character is received via the RS-232C port, BASIC jumps to the subroutine defined in the ON COM command OFF disables the interrupt. STOP disables the interrupt. However, BASIC \\\"remembers\\\" that a character was received, so that if you issue a COM ON command, BASIC jumps immediately to the interrupt subroutine. Examples 10 COM ON enables the communications interrupt."
|
|
309
|
+
}
|
|
310
|
+
]
|
|
311
|
+
},
|
|
312
|
+
{
|
|
313
|
+
"name": "CONT",
|
|
314
|
+
"variants": [
|
|
315
|
+
"CONT"
|
|
316
|
+
],
|
|
317
|
+
"documentation": [
|
|
318
|
+
{
|
|
319
|
+
"variant": "CONT",
|
|
320
|
+
"description": "Continue Execution",
|
|
321
|
+
"syntax": "CONT",
|
|
322
|
+
"longDescription": "CONT resumes execution of a program after you have pressed (BREAK) or after BASIC has encountered a STOP command in the program. This command is primarily for debugging purposes. After you press (BREAK) or BASIC encounters a STOP command, you can examine any of the variables with the PRINT command, as well as change variable values. To continue, simply type CONT and press (ENTER). (Note: You cannot resume execution if you change any of the lines of the program, either through editing, deletion, or insertion. Example CONT resumes execution of the BASIC program."
|
|
323
|
+
}
|
|
324
|
+
]
|
|
325
|
+
},
|
|
326
|
+
{
|
|
327
|
+
"name": "COS",
|
|
328
|
+
"variants": [
|
|
329
|
+
"COS"
|
|
330
|
+
],
|
|
331
|
+
"documentation": [
|
|
332
|
+
{
|
|
333
|
+
"variant": "COS",
|
|
334
|
+
"description": "Cosine",
|
|
335
|
+
"syntax": "COS(numeric expression)",
|
|
336
|
+
"longDescription": "This function returns the cosine of angle given by numeric expression. You must give this angle in radians. Example 10 Y = COS(60*0.01745329) assigns Y the value 0.50000013093981."
|
|
337
|
+
}
|
|
338
|
+
]
|
|
339
|
+
},
|
|
340
|
+
{
|
|
341
|
+
"name": "CSAVE",
|
|
342
|
+
"variants": [
|
|
343
|
+
"CSAVE"
|
|
344
|
+
],
|
|
345
|
+
"documentation": [
|
|
346
|
+
{
|
|
347
|
+
"variant": "CSAVE",
|
|
348
|
+
"description": "Save a Program on Cassette",
|
|
349
|
+
"syntax": "CSAVE \\\"filename\\\", A",
|
|
350
|
+
"longDescription": "CSAVE stores the current BASIC program on cassette tape. filename consists of a string of one to six characters, the first of which is a letter. A is optional; if used, BASIC saves the program in ASCII format. If omitted, BASIC stores the program in a compressed form. To perform certain commands, such as MERGE, programs must be stored in ASCII format. However, for most uses, you'll want your programs stored in a compressed format to save space on the tape. (Note: This command functions identically to SAVE \\\"CAS:\\\") CSAVE \\\"TANDY\\\" This example saves the current program onto cassette tape (in compressed format) under the name \\\"TANDY.\\\" CSAVE \\\"TANDY\\\", A This line saves the current program onto cassette tape (in ASCII format) under the name \\\"TANDY.\\\""
|
|
351
|
+
}
|
|
352
|
+
]
|
|
353
|
+
},
|
|
354
|
+
{
|
|
355
|
+
"name": "CSNG",
|
|
356
|
+
"variants": [
|
|
357
|
+
"CSNG"
|
|
358
|
+
],
|
|
359
|
+
"documentation": [
|
|
360
|
+
{
|
|
361
|
+
"variant": "CSNG",
|
|
362
|
+
"description": "Convert to Single Precision",
|
|
363
|
+
"syntax": "CSNG(numeric expression)",
|
|
364
|
+
"longDescription": "CSNG returns the single-precision form of numeric expression, according to the conversion rules listed under \\\"Data Conversion.\\\" Example 10 A! = CSNG(0.66666666666) sets A! equal to 0.666667."
|
|
365
|
+
}
|
|
366
|
+
]
|
|
367
|
+
},
|
|
368
|
+
{
|
|
369
|
+
"name": "CSRLIN",
|
|
370
|
+
"variants": [
|
|
371
|
+
"CSRLIN"
|
|
372
|
+
],
|
|
373
|
+
"documentation": [
|
|
374
|
+
{
|
|
375
|
+
"variant": "CSRLIN",
|
|
376
|
+
"description": "Vertical Cursor Position",
|
|
377
|
+
"syntax": "CSRLIN",
|
|
378
|
+
"longDescription": "This function returns the vertical position (line number) of the Cursor, where 0 is the top line and 7 is the bottom line. Example 10 CLS: AZ = CSRLIN clears the Screen and assigns A% the value 0."
|
|
379
|
+
}
|
|
380
|
+
]
|
|
381
|
+
},
|
|
382
|
+
{
|
|
383
|
+
"name": "DATA",
|
|
384
|
+
"variants": [
|
|
385
|
+
"DATA"
|
|
386
|
+
],
|
|
387
|
+
"documentation": [
|
|
388
|
+
{
|
|
389
|
+
"variant": "DATA",
|
|
390
|
+
"description": "Define a Data Set",
|
|
391
|
+
"syntax": "DATA constant list",
|
|
392
|
+
"longDescription": "DATA defines a set of constants (numeric and/or string) to be accessed by a READ command elsewhere in the program. See also READ and RESTORE. Example DATA 10,25.50,15,\\\"Probabilities\\\",\\\"Total\\\" stores the given values."
|
|
393
|
+
}
|
|
394
|
+
]
|
|
395
|
+
},
|
|
396
|
+
{
|
|
397
|
+
"name": "DATE$",
|
|
398
|
+
"variants": [
|
|
399
|
+
"DATE$"
|
|
400
|
+
],
|
|
401
|
+
"documentation": [
|
|
402
|
+
{
|
|
403
|
+
"variant": "DATE$",
|
|
404
|
+
"description": "Current Date",
|
|
405
|
+
"syntax": "DATE$",
|
|
406
|
+
"longDescription": "DATE$ keeps track of the current date, in string form. You may access it like any string variable, including setting a new date. Date string has the form MM/DD/YY where 01<MM\u00e2\u2030\u00a413, 01<DD\u00e2\u2030\u00a439, and 00\u00e2\u2030\u00a4YY\u00e2\u2030\u00a499. BASIC automatically updates DATE$ when the clock changes from 23:59:59 to 00:00:00. Examples PRINT DATE$ prints the current date. DATE$ = \\\"11/02/82\\\" sets the current date to November 11, 1982."
|
|
407
|
+
}
|
|
408
|
+
]
|
|
409
|
+
},
|
|
410
|
+
{
|
|
411
|
+
"name": "DAY$",
|
|
412
|
+
"variants": [
|
|
413
|
+
"DAY$"
|
|
414
|
+
],
|
|
415
|
+
"documentation": [
|
|
416
|
+
{
|
|
417
|
+
"variant": "DAY$",
|
|
418
|
+
"description": "Current Day of Week",
|
|
419
|
+
"syntax": "DAY$",
|
|
420
|
+
"longDescription": "This string variable keeps track of the current day of the week, in string form. You may access DAY$ like any string variable, including setting a new day. DAY$ consists of a three letter string made up of the first three letters of the day name (for example, Thu signifies Thursday). BASIC automatically updates DAY$ when the clock changes from 23:59:59 to 00:00:00. Examples PRINT DAY$ prints the current day of the week. DAY$ = \\\"Fri sets the current day as Friday. (Note that BASIC doesn't care whether the DAY$ string is in upper- or lowercase \u00e2\u20ac\u201d it automatically converts the string to one uppercase letter followed by two lowercase letters.) Valid strings include: Mon Tue Wed Thu Fri Sat Sun and all upper- and lowercase combinations of each."
|
|
421
|
+
}
|
|
422
|
+
]
|
|
423
|
+
},
|
|
424
|
+
{
|
|
425
|
+
"name": "DEF",
|
|
426
|
+
"variants": [
|
|
427
|
+
"DEF"
|
|
428
|
+
],
|
|
429
|
+
"documentation": [
|
|
430
|
+
{
|
|
431
|
+
"variant": "DEF",
|
|
432
|
+
"description": "",
|
|
433
|
+
"syntax": "DEF",
|
|
434
|
+
"longDescription": ""
|
|
435
|
+
}
|
|
436
|
+
]
|
|
437
|
+
},
|
|
438
|
+
{
|
|
439
|
+
"name": "DIM",
|
|
440
|
+
"variants": [
|
|
441
|
+
"DIM"
|
|
442
|
+
],
|
|
443
|
+
"documentation": [
|
|
444
|
+
{
|
|
445
|
+
"variant": "DIM",
|
|
446
|
+
"description": "Define Array Size",
|
|
447
|
+
"syntax": "DIM variable name(dimensions) list",
|
|
448
|
+
"longDescription": "DIM defines variable name as an array with the given dimensions, dimensions is a list of one or more numeric expressions, defining the \\\"height,\\\" \\\"width,\\\" and so on for the array. The expressions must evaluate to positive values. Since BASIC arrays begin with the \\\"zeroth\\\" clement, the actual size in any dimension is one plus the given dimension. The number of dimensions you may list depends only on the amount of available memory. To redimension an array, you must first use the command CLEAR (this destroys all variable values). Examples DIM A$(10), BALZ(10,10) defines a string array, A$, which consists of 11 elements, A$(0) through A$(10), and an integer array, BAL%, which consists of 121 elements, BAL%(0,0) through BAL%(10,10)."
|
|
449
|
+
}
|
|
450
|
+
]
|
|
451
|
+
},
|
|
452
|
+
{
|
|
453
|
+
"name": "DSKI$",
|
|
454
|
+
"variants": [
|
|
455
|
+
"DSKI$"
|
|
456
|
+
],
|
|
457
|
+
"documentation": [
|
|
458
|
+
{
|
|
459
|
+
"variant": "DSKI$",
|
|
460
|
+
"description": "",
|
|
461
|
+
"syntax": "DSKI$",
|
|
462
|
+
"longDescription": ""
|
|
463
|
+
}
|
|
464
|
+
]
|
|
465
|
+
},
|
|
466
|
+
{
|
|
467
|
+
"name": "DSKO$",
|
|
468
|
+
"variants": [
|
|
469
|
+
"DSKO$"
|
|
470
|
+
],
|
|
471
|
+
"documentation": [
|
|
472
|
+
{
|
|
473
|
+
"variant": "DSKO$",
|
|
474
|
+
"description": "",
|
|
475
|
+
"syntax": "DSKO$",
|
|
476
|
+
"longDescription": ""
|
|
477
|
+
}
|
|
478
|
+
]
|
|
479
|
+
},
|
|
480
|
+
{
|
|
481
|
+
"name": "EDIT",
|
|
482
|
+
"variants": [
|
|
483
|
+
"EDIT"
|
|
484
|
+
],
|
|
485
|
+
"documentation": [
|
|
486
|
+
{
|
|
487
|
+
"variant": "EDIT",
|
|
488
|
+
"description": "Edit a BASIC Program",
|
|
489
|
+
"syntax": "EDIT line number range",
|
|
490
|
+
"longDescription": "EDIT enters the text editor using the lines given by line number range, line number range may be: null edit the entire program. line1-line2 edit from line1 to line2, inclusive. -line2 edit from beginning of the program to line2. line1- edit from line1 to the end of the program. edit last accessed line number (last edited, entered, listed, and so on). To exit Edit, press F8. Note that while in the Edit Mode, you may insert and delete lines. However, if you insert a line which already exists in the program, the new line replaces the old line. If you edit a line in such a way that it is not a valid program line (for example, longer than 255 characters, no line number, invalid line number), the Editor tells you Text Ill-formed Press Space bar for TEXT Pressing the space bar returns you to the Text Editor. For more information on the Text Editor, see Part II of this manual. Examples EDIT lets you edit the entire program. EDIT 100-500 lets you edit lines 100 through 500. EDIT 100- lets you edit from line 100 to the end of the program."
|
|
491
|
+
}
|
|
492
|
+
]
|
|
493
|
+
},
|
|
494
|
+
{
|
|
495
|
+
"name": "ELSE",
|
|
496
|
+
"variants": [
|
|
497
|
+
"ELSE"
|
|
498
|
+
],
|
|
499
|
+
"documentation": [
|
|
500
|
+
{
|
|
501
|
+
"variant": "ELSE",
|
|
502
|
+
"description": "Used with IF to specify false branch",
|
|
503
|
+
"syntax": "IF condition THEN commands ELSE commands",
|
|
504
|
+
"longDescription": ""
|
|
505
|
+
}
|
|
506
|
+
]
|
|
507
|
+
},
|
|
508
|
+
{
|
|
509
|
+
"name": "END",
|
|
510
|
+
"variants": [
|
|
511
|
+
"END"
|
|
512
|
+
],
|
|
513
|
+
"documentation": [
|
|
514
|
+
{
|
|
515
|
+
"variant": "END",
|
|
516
|
+
"description": "End Execution",
|
|
517
|
+
"syntax": "END",
|
|
518
|
+
"longDescription": "END terminates execution of the BASIC program. END statements may be placed anywhere in the program. If omitted, BASIC executes up to the physical end of the program. Example 10 INPUT S1, S2 20 GDSUB 100 . . . 90 END 100 H=SQR(S1*S1+S2*S2) 110 RETURN The END statement in line 90 prevents BASIC from entering the subroutine in line 100 from anywhere but a GOSUB call."
|
|
519
|
+
}
|
|
520
|
+
]
|
|
521
|
+
},
|
|
522
|
+
{
|
|
523
|
+
"name": "EOF",
|
|
524
|
+
"variants": [
|
|
525
|
+
"EOF"
|
|
526
|
+
],
|
|
527
|
+
"documentation": [
|
|
528
|
+
{
|
|
529
|
+
"variant": "EOF",
|
|
530
|
+
"description": "Test for End-of-File",
|
|
531
|
+
"syntax": "EOF (file number)",
|
|
532
|
+
"longDescription": "EOF tests for an end-of-file condition on RAM, cassette, or communications files. file number is the buffer number assigned when the file was OPEN'ed. The function returns a \\\"logical\\\" answer, either \\\"true\\\" (-1) if you have reached the end of the file, or else \\\"false\\\" (0) if you have not reached the end of the file. Example 100 IF EOF(1) THEN 200 checks the file assigned to buffer 1 for end of file If true, then the program jumps to line 200."
|
|
533
|
+
}
|
|
534
|
+
]
|
|
535
|
+
},
|
|
536
|
+
{
|
|
537
|
+
"name": "EQV",
|
|
538
|
+
"variants": [
|
|
539
|
+
"EQV"
|
|
540
|
+
],
|
|
541
|
+
"documentation": [
|
|
542
|
+
{
|
|
543
|
+
"variant": "EQV",
|
|
544
|
+
"description": "",
|
|
545
|
+
"syntax": "EQV",
|
|
546
|
+
"longDescription": ""
|
|
547
|
+
}
|
|
548
|
+
]
|
|
549
|
+
},
|
|
550
|
+
{
|
|
551
|
+
"name": "ERL",
|
|
552
|
+
"variants": [
|
|
553
|
+
"ERL"
|
|
554
|
+
],
|
|
555
|
+
"documentation": [
|
|
556
|
+
{
|
|
557
|
+
"variant": "ERL",
|
|
558
|
+
"description": "Get Line Number of Error",
|
|
559
|
+
"syntax": "ERL",
|
|
560
|
+
"longDescription": "ERL returns the line number of the last error. If the last error which occured was not in a program line but trom a direct mode command, ERL returns the value 65535. This command is useful in conjunction with the ON ERROR GOTO command. Example 100 ON ERROR GOTO 2000 . . . 2000 IF ERR = 23 THEN RESUME ELSE PRINT \\\"Error\\\";ERR; \\\"in line\\\";ERL: STOP If an error occurs in the program, execution jumps to line 2000. If the error was an I/O error (ERR = 23), then BASIC simply retries the I/O (RESUME). If there was some other type of error, say a syntax error in line 1000, then BASIC displays the message: Error 2 in line 1000 and stops the program. See also ON ERROR and ERR."
|
|
561
|
+
}
|
|
562
|
+
]
|
|
563
|
+
},
|
|
564
|
+
{
|
|
565
|
+
"name": "ERR",
|
|
566
|
+
"variants": [
|
|
567
|
+
"ERR"
|
|
568
|
+
],
|
|
569
|
+
"documentation": [
|
|
570
|
+
{
|
|
571
|
+
"variant": "ERR",
|
|
572
|
+
"description": "Get Error Code Number",
|
|
573
|
+
"syntax": "ERR",
|
|
574
|
+
"longDescription": "This function returns the error code number of the last error. This command is useful in conjunction with the ON ERROR GOTO command. Example 100 ON ERROR GOTO 2000 2000 IF ERR = 18 THEN PRINT \\\"I/O Error \\\" ELSE STOP 2010 INPUT \\\"Continue(Y/N)\\\"; A$ 2020 IF A$ = \\\"Y\\\" THEN RESUME ELSE STOP If an error occurs in the program, then BASIC jumps to line 2000. If the error was an I/O error (error 18), then BASIC prints out the message and prompt and waits on your response"
|
|
575
|
+
}
|
|
576
|
+
]
|
|
577
|
+
},
|
|
578
|
+
{
|
|
579
|
+
"name": "ERROR",
|
|
580
|
+
"variants": [
|
|
581
|
+
"ERROR"
|
|
582
|
+
],
|
|
583
|
+
"documentation": [
|
|
584
|
+
{
|
|
585
|
+
"variant": "ERROR",
|
|
586
|
+
"description": "Simulate an Error",
|
|
587
|
+
"syntax": "ERROR numeric expression",
|
|
588
|
+
"longDescription": "This command simulates the error specified by numeric expression. BASIC behaves just as if your program had committed the error. Example ERROR 4 prints OD Error. 100 ERROR 10 prints DD Error in 100 and stops execution of the program."
|
|
589
|
+
}
|
|
590
|
+
]
|
|
591
|
+
},
|
|
592
|
+
{
|
|
593
|
+
"name": "EXP",
|
|
594
|
+
"variants": [
|
|
595
|
+
"EXP"
|
|
596
|
+
],
|
|
597
|
+
"documentation": [
|
|
598
|
+
{
|
|
599
|
+
"variant": "EXP",
|
|
600
|
+
"description": "Exponential (Antilog)",
|
|
601
|
+
"syntax": "EXP (numeric expression)",
|
|
602
|
+
"longDescription": "EXP returns the exponential (or \\\"natural\\\" antilog) of numeric expression. numeric expression must be in the range \u0013 87.3365 or an overflow error occurs. EXP is the opposite of the function LOG. Example PRINT EXP(14) prints 1202604.2841644, the natural antilog of 14."
|
|
603
|
+
}
|
|
604
|
+
]
|
|
605
|
+
},
|
|
606
|
+
{
|
|
607
|
+
"name": "FILES",
|
|
608
|
+
"variants": [
|
|
609
|
+
"FILES"
|
|
610
|
+
],
|
|
611
|
+
"documentation": [
|
|
612
|
+
{
|
|
613
|
+
"variant": "FILES",
|
|
614
|
+
"description": "Display File Names",
|
|
615
|
+
"syntax": "FILES",
|
|
616
|
+
"longDescription": "This command will cause BASIC to display all of the files currently stored in RAM without exiting BASIC. Example FILES"
|
|
617
|
+
}
|
|
618
|
+
]
|
|
619
|
+
},
|
|
620
|
+
{
|
|
621
|
+
"name": "FIX",
|
|
622
|
+
"variants": [
|
|
623
|
+
"FIX"
|
|
624
|
+
],
|
|
625
|
+
"documentation": [
|
|
626
|
+
{
|
|
627
|
+
"variant": "FIX",
|
|
628
|
+
"description": "Truncate Real Numbers",
|
|
629
|
+
"syntax": "FIX (numeric expression)",
|
|
630
|
+
"longDescription": "FIX returns the whole number portion of numeric expression. (Note: The difference between FIX and INT is that for negative numbers, FIX simply truncates numeric expression while INT returns the whole number not greater than numeric expression. Examples 10 A = FIX(1440.43) sets A equal to 1440. 10 A = FIX(-33494123.4442) sets A equal to -33494123."
|
|
631
|
+
}
|
|
632
|
+
]
|
|
633
|
+
},
|
|
634
|
+
{
|
|
635
|
+
"name": "FOR",
|
|
636
|
+
"variants": [
|
|
637
|
+
"FOR...NEXT"
|
|
638
|
+
],
|
|
639
|
+
"documentation": [
|
|
640
|
+
{
|
|
641
|
+
"variant": "FOR...NEXT",
|
|
642
|
+
"description": "Establish Program Looping",
|
|
643
|
+
"syntax": "FOR counter variable = initial value TO final value STEP increment ... NEXT counter variable",
|
|
644
|
+
"longDescription": "These commands execute the statements between the FOR and NEXT loop repetitively, varying counter variable from initial value to final value, adding increment to it each time BASIC ends the loop. initial value, final value, and increment are all numeric expressions. STEP increment is optional; if omitted, BASIC assumes STEP 1. BASIC executes the loop at least once, even if variable exceeds final value the first time the FOR statement is read. Also, BASIC evaluates initial value, final value, and increment the first time it executes the line. If these expressions are variables, changing the values of these variables later in the loop has no effect on the execution of the loop. You may \\\"nest\\\" FOR...NEXT loops with other FOR...NEXT loops. The number of nested loops is dependent only on the size of remaining memory. Note that all inner loops must be contained entirely within the next outer loop. For example: 10 FOR I=1 TO 100 20 FOR J=1 TO 20 30 B(I,J) = A(I,J) 40 NEXT J 50 NEXT I Legal 10 FOR I=1 TO 100 20 FOR J=1 TO 20 30 B(I,J) = A(I,J) 40 NEXT I 50 NEXT J Illegal Examples 10 FOR I=10 TO 1 STEP -1 20 PRINT I; 30 NEXT prints the numbers 10 through 1. (Note that you may use negative values for increment.) 10 FOR K=B TO E 20 PRINT K 30 NEXT If B equals 4 and E equals 2, this routine prints out the number 4. Since no STEP is specified, STEP 1 is assumed. BASIC then increments K by 1 to the value 5. Since 5 is greater than 2, the loop ends. 10 FOR I=1 TO 3 20 PRINT \\\"OUTER LOOP\\\" 30 FOR J=1 TO 2 40 PRINT \\\" INNER LOOP\\\" 50 NEXT J 60 NEXT I prints: OUTER LOOP INNER LOOP INNER LOOP OUTER LOOP INNER LOOP INNER LOOP OUTER LOOP INNER LOOP INNER LOOP Note that lincs 50 and 60 could be condensed to NEXT J,I (but not NEXT I,J). You may also simply say NEXT and BASIC will \\\"know\\\" which loop it is in."
|
|
645
|
+
}
|
|
646
|
+
]
|
|
647
|
+
},
|
|
648
|
+
{
|
|
649
|
+
"name": "FRE",
|
|
650
|
+
"variants": [
|
|
651
|
+
"FRE"
|
|
652
|
+
],
|
|
653
|
+
"documentation": [
|
|
654
|
+
{
|
|
655
|
+
"variant": "FRE",
|
|
656
|
+
"description": "Free Memory Space",
|
|
657
|
+
"syntax": "FRE(dummy expression)",
|
|
658
|
+
"longDescription": "FRE returns the current amount of unused numeric memory in bytes when dummy expression is numeric and the current total amount of unused string space when dummy expression is string type. Examples PRINT FRE(0) prints out the current free numeric memory space. ?FRE (\\\" \\\") prints out the current free string space."
|
|
659
|
+
}
|
|
660
|
+
]
|
|
661
|
+
},
|
|
662
|
+
{
|
|
663
|
+
"name": "GOSUB",
|
|
664
|
+
"variants": [
|
|
665
|
+
"GOSUB"
|
|
666
|
+
],
|
|
667
|
+
"documentation": [
|
|
668
|
+
{
|
|
669
|
+
"variant": "GOSUB",
|
|
670
|
+
"description": "Call a BASIC Subroutine",
|
|
671
|
+
"syntax": "GOSUB line number",
|
|
672
|
+
"longDescription": "This command transfers program control to the subroutine beginning at line number. When BASIC encounters a RETURN command in the subroutine, it jumps back to the command immediately following the GOSUB. You must always terminate a subroutine with a RETURN command. Example 100 GOSUB 1000 110 PRINT \\\"Average = \\\"; AV . . . 990 END 1000 'Averaging Subroutine 1010 FOR I=1 TO 20 1020 SM = A(I) 1030 NEXT I 1040 AV = SM / 20 1050 RETURN Line 100 calls the subroutine at line 1000. BASIC executes lines 1000 through 1040, and then jumps back to line 110 and begins execution there."
|
|
673
|
+
}
|
|
674
|
+
]
|
|
675
|
+
},
|
|
676
|
+
{
|
|
677
|
+
"name": "GOTO",
|
|
678
|
+
"variants": [
|
|
679
|
+
"GOTO"
|
|
680
|
+
],
|
|
681
|
+
"documentation": [
|
|
682
|
+
{
|
|
683
|
+
"variant": "GOTO",
|
|
684
|
+
"description": "Branch Program Execution",
|
|
685
|
+
"syntax": "GOTO line number",
|
|
686
|
+
"longDescription": "GOTO branches program control to the specified line number. Used alone, GOTO line number results in an \\\"unconditional\\\" (or automatic) branch. You may also use GOTO in conjunction with conditional expressions, such as IF and ON ERROR. This results in \\\"conditional\\\" branching. You can use GOTO in the Immediate Mode to cause execution to begin at the specified line number, without an automatic CLEAR. This allows you to enter a program at a specific point, without destroying any old variables (the command RUN tells BASIC to first clear all of memory before beginning execution). Examples 200 GOTO 10 branches control unconditional to line 10. 100 IF AN$ = \\\"Y\\\" GOTO 1000 ELSE GOTO 2000 if ANS equals \\\"Y,\\\" then BASIC branches to line 1000; otherwise BASIC branches to line 2000. A=1.32 : GOTO 1000 assigns A the value 1.32 and begins execution at line 1000."
|
|
687
|
+
}
|
|
688
|
+
]
|
|
689
|
+
},
|
|
690
|
+
{
|
|
691
|
+
"name": "HIMEM",
|
|
692
|
+
"variants": [
|
|
693
|
+
"HIMEM"
|
|
694
|
+
],
|
|
695
|
+
"documentation": [
|
|
696
|
+
{
|
|
697
|
+
"variant": "HIMEM",
|
|
698
|
+
"description": "Get High Memory Address",
|
|
699
|
+
"syntax": "HIMEM",
|
|
700
|
+
"longDescription": "This function returns the top address of memory available to BASIC. You may change this value with the CLEAR command. Example PRINT HIMEM prints the current top address of BASIC memory."
|
|
701
|
+
}
|
|
702
|
+
]
|
|
703
|
+
},
|
|
704
|
+
{
|
|
705
|
+
"name": "IF",
|
|
706
|
+
"variants": [
|
|
707
|
+
"IF...THEN...ELSE"
|
|
708
|
+
],
|
|
709
|
+
"documentation": [
|
|
710
|
+
{
|
|
711
|
+
"variant": "IF...THEN...ELSE",
|
|
712
|
+
"description": "Test Relational Expression",
|
|
713
|
+
"syntax": "IF relational or logical expression THEN command(s)1 ELSE command(s)2",
|
|
714
|
+
"longDescription": "The IF/THEN statements test the logical \\\"truth\\\" of relational or logical expression (relational and logical expressions are defined under \\\"Expressions,\\\" earlier in this section). If the expression is \\\"true,\\\" then BASIC executes command(s)1. If the expression is \\\"false,\\\" BASIC cxecutes command(s)2. If THEN command(s)/ is a THEN GOTO line number, BASIC also accepts THEN line number and GOTO line number as equivalent terms. ELSE command(s)2 is optional; if omitted, BASIC assumes the ELSE clause is the next line. If ELSE command(s)2 is a GOTO line number, then ELSE line number is an equivalent term. In numeric terms, \\\"false\\\" has the value zero, and \\\"true\\\" is any value except zero. Example 10 IF A < 100 THEN 100 20 tests the condition A < 100 \u00e2\u20ac\u201d if true, then BASIC jumps to line 100; if false, then BASIC continues execution at line 20. 10 IF A = 10 OR A = 20 THEN B$ = \\\"Paid\\\" ELSE B$ = \\\"Not Paid\\\" tests the condition A = 10 OR A = 20 --- if true, then BASIC assigns B$ the string \\\"Paid\\\"; if false, then BASIC assigns B$ the string \\\"Not Paid\\\"."
|
|
715
|
+
}
|
|
716
|
+
]
|
|
717
|
+
},
|
|
718
|
+
{
|
|
719
|
+
"name": "IMP",
|
|
720
|
+
"variants": [
|
|
721
|
+
"IMP"
|
|
722
|
+
],
|
|
723
|
+
"documentation": [
|
|
724
|
+
{
|
|
725
|
+
"variant": "IMP",
|
|
726
|
+
"description": "",
|
|
727
|
+
"syntax": "IMP",
|
|
728
|
+
"longDescription": ""
|
|
729
|
+
}
|
|
730
|
+
]
|
|
731
|
+
},
|
|
732
|
+
{
|
|
733
|
+
"name": "INKEY$",
|
|
734
|
+
"variants": [
|
|
735
|
+
"INKEY$"
|
|
736
|
+
],
|
|
737
|
+
"documentation": [
|
|
738
|
+
{
|
|
739
|
+
"variant": "INKEY$",
|
|
740
|
+
"description": "Poll Keyboard",
|
|
741
|
+
"syntax": "INKEY$",
|
|
742
|
+
"longDescription": "This function returns the string value of the key currently pressed, if any. If no key is pressed, the function returns a null character (\\\"\\\"). In either case, BASIC doesn't wait for keyboard input, but goes to the next statement. (Note: If you press an undefined Function Key, PASTE or LABEL, INKEY$ returns an ASCII 0 with a length of 1.) Example 10 A$ = INKEY$ 20 IF A$ = \\\"\\\" THEN 10 30 . . . sets A$ equal to the string value of any key pressed. If you haven't pressed a key, then A$ contains the null character (\\\" \\\") and BASIC jumps back to line 10. If you have pressed a key, A$ contains the character representation of the key you pressed, and hence BASIC continues execution at line 30"
|
|
743
|
+
}
|
|
744
|
+
]
|
|
745
|
+
},
|
|
746
|
+
{
|
|
747
|
+
"name": "INP",
|
|
748
|
+
"variants": [
|
|
749
|
+
"INP"
|
|
750
|
+
],
|
|
751
|
+
"documentation": [
|
|
752
|
+
{
|
|
753
|
+
"variant": "INP",
|
|
754
|
+
"description": "Input From a Port",
|
|
755
|
+
"syntax": "INP (port number)",
|
|
756
|
+
"longDescription": "INP returns a byte from the specified port. port number must be a numeric expression in the range of 0 to 255. INP is the complement function to the OUT command. Example A% = INP(5) sets A% equal to the byte value at port 5."
|
|
757
|
+
}
|
|
758
|
+
]
|
|
759
|
+
},
|
|
760
|
+
{
|
|
761
|
+
"name": "INPUT",
|
|
762
|
+
"variants": [
|
|
763
|
+
"INPUT",
|
|
764
|
+
"INPUT #"
|
|
765
|
+
],
|
|
766
|
+
"documentation": [
|
|
767
|
+
{
|
|
768
|
+
"variant": "INPUT",
|
|
769
|
+
"description": "Input Data From Keyboard",
|
|
770
|
+
"syntax": "INPUT \\\"prompt\\\";variable list",
|
|
771
|
+
"longDescription": "INPUT stops execution of your program until you enter data from the keyboard. The values you enter must be constants and must correspond in both number and type to the variables in variable list. variable list consists of any number of variable names, both string and numeric, separated by commas. The optional \\\"prompt\\\" is any valid string expression. BASIC displays prompt prior to accepting your input. While BASIC is awaiting your input, it displays a question mark. At this point, you may enter enough data, separated by commas, for all of the variables in variable list, terminated with ENTER. Alternatively, you may enter each data item separately, pressing (ENTER) after each. In the latter case, after accepting the first value, BASIC displays two question marks as a prompt for subsequent input. For string input, you may enclose the data in quotes, although BASIC doesn't require this. However, if the input string contains any leading blanks, commas, or colons, you must use quote marks. BASIC lets you input numeric data into string variables. (BASIC stores the ASCII value --- not the numeric value!) For numeric input, BASIC performs any necessary conversion to the numbers so that they fit into the variable. This conversion is identical to other data conversions in the program. If you attempt to input string data into a numeric variable, BASIC displays the message ?Redo from start followed by another?, and lets you try again. See \\\"Data Conversion,\\\" earlier in this section for the data conversion rules. Examples 10 INPUT \\\"X and Y Coordinates\\\";X,Y BASIC displays: X and Y Coordinates? If you type 10,20 and press ENTER, then BASIC assigns X the value 20 and Y the value 30. If you type 10 and press (ENTER), then BASIC assigns X the value 20, and then displays: ?? You may then type in the value for Y and press (ENTER). 100 INPUT A$, B%, C$, D This statement calls for you to input a string, a number, a string, and finally another number. BASIC prompts you with a ?. You may then type in: Fort Worth, 5641.321, Texas, 76109 [ENTER] This assigns \\\"Fort Worth\\\" to AS, 5641 to B% (note the conversion), \\\"Texas\\\" to CS, and 76109 to D. The following is equivalent: \\\"Fort Worth\\\" (ENTER) 5641 (ENTER) Texas (ENTER) 76109 (ENTER)"
|
|
772
|
+
},
|
|
773
|
+
{
|
|
774
|
+
"variant": "INPUT #",
|
|
775
|
+
"description": "Input From a File",
|
|
776
|
+
"syntax": "INPUT # file number, variable list",
|
|
777
|
+
"longDescription": "This command inputs data sequentially from the file opened under file number. You may input data with this command from RAM, cassette tape, the RS-232C port, or the modem. INPUT # functions identically to INPUT from the keyboard, except that the data comes from a file, and BASIC displays no question mark prompt. The data in the file must be separated by commas. See also OPEN. Example 10 INPUT #1,A$,B$,C inputs values for A$, B$ and C from the file opened as file #1."
|
|
778
|
+
}
|
|
779
|
+
]
|
|
780
|
+
},
|
|
781
|
+
{
|
|
782
|
+
"name": "INSTR",
|
|
783
|
+
"variants": [
|
|
784
|
+
"INSTR"
|
|
785
|
+
],
|
|
786
|
+
"documentation": [
|
|
787
|
+
{
|
|
788
|
+
"variant": "INSTR",
|
|
789
|
+
"description": "Search a String",
|
|
790
|
+
"syntax": "INSTR (start position,search string,match string)",
|
|
791
|
+
"longDescription": "INSTR searches search string for the first occurrence of match string, beginning at start position. If the string is found, INSTR returns the position in the string where it occurs. If string isn't found, then INSTR returns a zero. start position is optional; if omitted INSTR starts the search at position one. Also, if start position is greater than the length of search string, INSTR returns a zero. Example PRINT INSTR(\\\"dimethylsulfate\\\", \\\"sulfate\\\") prints 9 on the Screen (\\\"sulfate\\\" begins at position 9 of \\\"dimethylsulfate\\\") AX = INSTR(5,NM$,\\\"Jim\\\") If NMS contains the string \\\"JimBob\\\", then this line sets A% equal to 0 (\\\"Jim\\\" does not occur past position 5 of \\\"JimBob\\\")."
|
|
792
|
+
}
|
|
793
|
+
]
|
|
794
|
+
},
|
|
795
|
+
{
|
|
796
|
+
"name": "INT",
|
|
797
|
+
"variants": [
|
|
798
|
+
"INT"
|
|
799
|
+
],
|
|
800
|
+
"documentation": [
|
|
801
|
+
{
|
|
802
|
+
"variant": "INT",
|
|
803
|
+
"description": "Get Whole Number Representation",
|
|
804
|
+
"syntax": "INT(numeric expression)",
|
|
805
|
+
"longDescription": "INT returns the whole number representation of numeric expression, not greater than numeric expression. (Note: The difference between the functions INT and FIX is that for negative numbers, FIX simply truncates numeric expression while INT returns the whole number not greater than numeric expression.) Examples A# = INT(21444331113.443) sets A# equal to 21444331113. A# = INT(-214.995) sets A# equal to -215."
|
|
806
|
+
}
|
|
807
|
+
]
|
|
808
|
+
},
|
|
809
|
+
{
|
|
810
|
+
"name": "IPL",
|
|
811
|
+
"variants": [
|
|
812
|
+
"IPL"
|
|
813
|
+
],
|
|
814
|
+
"documentation": [
|
|
815
|
+
{
|
|
816
|
+
"variant": "IPL",
|
|
817
|
+
"description": "Define Warm Start Program",
|
|
818
|
+
"syntax": "IPL \\\"filename\\\"",
|
|
819
|
+
"longDescription": "IPL defines filename as the warm-startup program. filename is the name of a current RAM file. After executing this command, this program runs whenever you turn on your Model 100. Example IPL \\\"TIMSET.BA\\\" Now whenever you turn on the Computer, it will execute the program TIMSET.BA. IPL will execute properly only if the Computer is turned off while in BASIC with the proper IPL program loaded."
|
|
820
|
+
}
|
|
821
|
+
]
|
|
822
|
+
},
|
|
823
|
+
{
|
|
824
|
+
"name": "KEY",
|
|
825
|
+
"variants": [
|
|
826
|
+
"KEY",
|
|
827
|
+
"KEY LIST",
|
|
828
|
+
"KEY ON/OFF/STOP"
|
|
829
|
+
],
|
|
830
|
+
"documentation": [
|
|
831
|
+
{
|
|
832
|
+
"variant": "KEY",
|
|
833
|
+
"description": "Define Function Keys",
|
|
834
|
+
"syntax": "KEY function key number,string expression",
|
|
835
|
+
"longDescription": "KEY defines function key number as string expression. function key number is a numeric expression from 1 to 8 and string expression must be 15 or less characters. Example KEY 6,\\\"TIME$\\\" + CHR$(13) defines Function Key 6 as ?TIMES followed by a carriage return. Now whenever you press Function Key 6, BASIC returns the time. (Remember that \\\"?\\\" is an abbreviation for PRINT. and that ASCII character 13 is the code generated when you press ENTER.) To reset the function keys to the cold start default, you must \\\"call\\\" two subroutines with the following commands: CALL 23164,23366 CALL 27795 This resets the function keys to their original value."
|
|
836
|
+
},
|
|
837
|
+
{
|
|
838
|
+
"variant": "KEY LIST",
|
|
839
|
+
"description": "List Function Key Definitions",
|
|
840
|
+
"syntax": "KEY LIST",
|
|
841
|
+
"longDescription": "Lists on the Screen the current definitions for the Function Keys, in the format: key 1 key 2 key 3 key 4 key 5 key 6 key 7 key 8 Example KEY LIST Unless you have altered the function key definitions, BASIC displays: Files Load \\\" Save Run List Menu"
|
|
842
|
+
},
|
|
843
|
+
{
|
|
844
|
+
"variant": "KEY ON/OFF/STOP",
|
|
845
|
+
"description": "Enable/Disable Function Key Interrupts",
|
|
846
|
+
"syntax": "KEY (function key number) ON/OFF/STOP",
|
|
847
|
+
"longDescription": "This statement enables or disables the function key interrupt. ON enables the interrupt so that if you press a Function Key, BASIC branches to the ON KEY subroutine. OFF disables the interrupt. STOP disables the interrupt, however, BASIC \\\"remembers\\\" that you pressed a Function Key, so that if you issue a KEY ON command, BASIC jumps immediately to the interrupt subroutine. See ON KEY GOSUB. Examples 100 KEY (2) ON enables Function Key 2. 100 KEY ON enables all Function Keys. 100 KEY (4) OFF disables Function Key 4."
|
|
848
|
+
}
|
|
849
|
+
]
|
|
850
|
+
},
|
|
851
|
+
{
|
|
852
|
+
"name": "KILL",
|
|
853
|
+
"variants": [
|
|
854
|
+
"KILL"
|
|
855
|
+
],
|
|
856
|
+
"documentation": [
|
|
857
|
+
{
|
|
858
|
+
"variant": "KILL",
|
|
859
|
+
"description": "Delete a RAM File",
|
|
860
|
+
"syntax": "KILL \\\"filename\\\"",
|
|
861
|
+
"longDescription": "KILL deletes a RAM file. filename is a string of one to six characters, the first of which must be a letter. plus a two character extension. You must include the file's extension. If you have 200 bytes or less of free memory, KILL may not delete a file. If this situation occurs, delete program lines \\\"manually\\\" or go to TEXT, \\\"select\\\" a file, and put it in the PASTE Buffer. Then return to BASIC and KILL the unwanted files. Example KILL \\\"BILLS.BA\\\" deletes the RAM file BILLS.BA."
|
|
862
|
+
}
|
|
863
|
+
]
|
|
864
|
+
},
|
|
865
|
+
{
|
|
866
|
+
"name": "LCOPY",
|
|
867
|
+
"variants": [
|
|
868
|
+
"LCOPY"
|
|
869
|
+
],
|
|
870
|
+
"documentation": [
|
|
871
|
+
{
|
|
872
|
+
"variant": "LCOPY",
|
|
873
|
+
"description": "Copy Screen to Printer",
|
|
874
|
+
"syntax": "LCOPY",
|
|
875
|
+
"longDescription": "Prints the text on the Screen onto the printer. LCOPY ignores non-text data. Example LCOPY prints the text on the Screen onto the printer."
|
|
876
|
+
}
|
|
877
|
+
]
|
|
878
|
+
},
|
|
879
|
+
{
|
|
880
|
+
"name": "LEFT$",
|
|
881
|
+
"variants": [
|
|
882
|
+
"LEFT$"
|
|
883
|
+
],
|
|
884
|
+
"documentation": [
|
|
885
|
+
{
|
|
886
|
+
"variant": "LEFT$",
|
|
887
|
+
"description": "Return Left Portion of a String",
|
|
888
|
+
"syntax": "LEFT$(string expression, length)",
|
|
889
|
+
"longDescription": "LEFT returns the first length characters of string expression. length is a numeric expression. Example 10 AC$ = LEFT$(PN$,3) If PNS contains the string \\\"81755552161,\\\" then after execution of this command ACS contains the string \\\"817\\\"."
|
|
890
|
+
}
|
|
891
|
+
]
|
|
892
|
+
},
|
|
893
|
+
{
|
|
894
|
+
"name": "LEN",
|
|
895
|
+
"variants": [
|
|
896
|
+
"LEN"
|
|
897
|
+
],
|
|
898
|
+
"documentation": [
|
|
899
|
+
{
|
|
900
|
+
"variant": "LEN",
|
|
901
|
+
"description": "Get Size of a String",
|
|
902
|
+
"syntax": "LEN(string expression)",
|
|
903
|
+
"longDescription": "LEN returns the number of characters in string expression. Example 100 INPUT NM$ 110 IF LEN(NM$) < 20 THEN NM$ = NM$ + \\\" \\\": GOTO 110 adds spaces to the end of NM$ so that it is at least 20 characters long. This \\\"left justifies\\\" the input string, while \\\"padding\\\" on the right with spaces."
|
|
904
|
+
}
|
|
905
|
+
]
|
|
906
|
+
},
|
|
907
|
+
{
|
|
908
|
+
"name": "LET",
|
|
909
|
+
"variants": [
|
|
910
|
+
"LET"
|
|
911
|
+
],
|
|
912
|
+
"documentation": [
|
|
913
|
+
{
|
|
914
|
+
"variant": "LET",
|
|
915
|
+
"description": "Assignment Statement",
|
|
916
|
+
"syntax": "LET variable = expression",
|
|
917
|
+
"longDescription": "This statement assigns value of expression to variable, variable must be of the same data type as expression (that is, numeric or string). For numeric expressions, BASIC performs any conversion necessary to fit expression into variable (see \\\"Data Conversion,\\\" for the conversion rules). LET is optional --- it is included in Model 100 BASIC to be compatible with older forms of BASIC. LET A$ = \\\"The\\\" and A$ = \\\"The\\\" both assign the string \\\"The\\\" to A$."
|
|
918
|
+
}
|
|
919
|
+
]
|
|
920
|
+
},
|
|
921
|
+
{
|
|
922
|
+
"name": "LFILES",
|
|
923
|
+
"variants": [
|
|
924
|
+
"LFILES"
|
|
925
|
+
],
|
|
926
|
+
"documentation": [
|
|
927
|
+
{
|
|
928
|
+
"variant": "LFILES",
|
|
929
|
+
"description": "",
|
|
930
|
+
"syntax": "LFILES",
|
|
931
|
+
"longDescription": ""
|
|
932
|
+
}
|
|
933
|
+
]
|
|
934
|
+
},
|
|
935
|
+
{
|
|
936
|
+
"name": "LINE",
|
|
937
|
+
"variants": [
|
|
938
|
+
"LINE",
|
|
939
|
+
"LINE INPUT"
|
|
940
|
+
],
|
|
941
|
+
"documentation": [
|
|
942
|
+
{
|
|
943
|
+
"variant": "LINE",
|
|
944
|
+
"description": "Draw a Line on the Screen",
|
|
945
|
+
"syntax": "LINE (x1,y1) - (x2,y2), switch, BF",
|
|
946
|
+
"longDescription": "LINE draws a line from coordinates x1,y1 to x2,y2. x1 and x2 are numeric expressions which range from 0 to 239, and y1 and y2 are numeric expressions which range from 0 to 63. (x1,y1) is optional; if not used, BASIC starts the line from the x,y coordinates of the last LINE command, or from 0,0 if this is the first LINE command. You must always include the hyphen. switch is a numeric expression and is optional, if used, odd values of switch tell BASIC to set the points of the line, and even values of switch tell BASIC to reset (that is, erase) the points on the line. If not present, BASIC assumes you mean to set the points of the line. B tells BASIC to draw a box with corners at (x1,y1) and (x2,y2). BF tells BASIC to fill in the box with switch. Both B and BF require that you specify switch. Examples 10 LINE (20,20)-(50,63) 20 LINE - (30,30) draws lines from (20,20) to (50,63), and from (50,63) to (30,30). 10 LINE (20,20)-(50,63),0 erases (resets) all points on a line from (20,20) to (50,63) 10 LINE (0,0)-(239,63),1,B draws a box with corners at (0,0) and (239,63). 10 LINE (0,0)-(239,63),1,BF draws a box with corners at (0,0) and (239,63) and then sets all of the points inside the box."
|
|
947
|
+
},
|
|
948
|
+
{
|
|
949
|
+
"variant": "LINE INPUT",
|
|
950
|
+
"description": "Input a String from the Keyboard",
|
|
951
|
+
"syntax": "LINE INPUT \\\"prompt\\\", string variable",
|
|
952
|
+
"longDescription": "This statement stops execution of your program until you enter a string from the keyboard, then assigns that string to string variable. The optional \\\"prompt\\\" is any valid string constant which BASIC displays prior to accepting your input. LINE INPUT differs from INPUT in that: * BASIC doesn't display a question mark prompt * You may have only one variable name * BASIC assigns all input (including commas, leading blanks, and quote marks) to string variable Example 10 LINE INPUT \\\"Enter Name and Address:\\\"!NA$ displays: Enter Name and Address: and waits for you to enter data. If you typed: John \\\"Rocky\\\" Smith, 5641 Lancaster, East Pearoe, Ohio ENTER BASIC assigns NA$ the string John \\\"Rocky\\\" Smith, 5641 E. Lancaster, East Pearoe, Ohio."
|
|
953
|
+
}
|
|
954
|
+
]
|
|
955
|
+
},
|
|
956
|
+
{
|
|
957
|
+
"name": "LIST",
|
|
958
|
+
"variants": [
|
|
959
|
+
"LIST"
|
|
960
|
+
],
|
|
961
|
+
"documentation": [
|
|
962
|
+
{
|
|
963
|
+
"variant": "LIST",
|
|
964
|
+
"description": "List Program on the Screen",
|
|
965
|
+
"syntax": "LIST line number range",
|
|
966
|
+
"longDescription": "This command lists the line number range of the current program on the Screen, line number range may be: null lists the entire program. line1-line2 lists from linel to line2, inclusive. -line2 list from beginning of the program to line 2. line1- list from linel to the end of the program. lists the last accessed line number (last edited, entered, listed, and so on) Example LIST displays the entire program. LIST 100-300 displays from line 100 to line 300 LIST .- displays from the current line to the end of the program."
|
|
967
|
+
}
|
|
968
|
+
]
|
|
969
|
+
},
|
|
970
|
+
{
|
|
971
|
+
"name": "LLIST",
|
|
972
|
+
"variants": [
|
|
973
|
+
"LLIST"
|
|
974
|
+
],
|
|
975
|
+
"documentation": [
|
|
976
|
+
{
|
|
977
|
+
"variant": "LLIST",
|
|
978
|
+
"description": "List Program on the Printer",
|
|
979
|
+
"syntax": "| LLIST line number range",
|
|
980
|
+
"longDescription": "LLIST lists the line number range of the current program onto the printer. line number range may be: null lists the entire program. linel-line2 lists from linel to line2, inclusive. -line2 list from beginning of the program to line2. linel- list from linel to the end of the program. lists last accessed line number (last edited, entered, listed, and so on) Example `LLIST` prints out the entire program. `LLIST 100-300` prints out line 100 to line 300. `LLIST .-` prints out from the first line of the program to the current line."
|
|
981
|
+
}
|
|
982
|
+
]
|
|
983
|
+
},
|
|
984
|
+
{
|
|
985
|
+
"name": "LOAD",
|
|
986
|
+
"variants": [
|
|
987
|
+
"LOAD"
|
|
988
|
+
],
|
|
989
|
+
"documentation": [
|
|
990
|
+
{
|
|
991
|
+
"variant": "LOAD",
|
|
992
|
+
"description": "Load a BASIC Program",
|
|
993
|
+
"syntax": "LOAD \\\"device:filename or configuration\\\", R",
|
|
994
|
+
"longDescription": "LOAD loads a BASIC program from device. filename consists of a string of one to six characters, the first of which is a letter. device may be RAM, CAS, COM, or MDM. If device is RAM, then you may include the optional extension .BA or .DO. If device is CAS, then you use no extension. For COM, configuration consists of a five character string of the pattern rwpbs, where r Baud Rate This is a number from 1 to 9, where 1=75; 2=110; 3=300; 4=600; 5=1200; 6=2400; 7=4800; 8=9600; 9=19200. w Word Length This is a number from 6 to 8, where 6=6 bits; 7=7 bits; 8=8 bits. p Parity Either E,O,I, or N, where E=Even; O=Odd, I=Ignore; N = None. b Stop Bits Either 1 or 2, where 1=1 stop bit; 2=2 stop bits. s XON/XOFF Status Either E or D, where E = Enable; D = Disable. For MDM, configuration consists of a four character string of the pattern wpbs, defined above. (BASIC automatically sets the baud rate to 300 baud.) R is optional; if used, BASIC runs the incoming program as soon as it has been read in. Note that for MDM and COM, the person on the other end of the communications line must be ready to send the program using the same configurations, after you enter the LOAD command. Cassette loads have several features not found in other load forms: * You may omit filespec, in which case BASIC loads the BASIC program it finds. * If filespec isn't the first program on the tape, BASIC prints the message Skip: followed by the name of the file it is skipping over. * The command CLOAD \\\"filespec\\\" functions identically to LOAD \\\"CAS:filespec\\\".) See also SAVE. Examples LOAD \\\"RAM:TIMSET\\\" loads the BASIC program TIMSET.BA from memory. LOAD \\\"CAS:ACCT\\\",R loads and runs the BASIC program ACCT from cassette tape. (Note: The program could have been SAVE'd in either ASCII or binary format.) LOAD \\\"COM:78N1E\\\" loads a BASIC program from the RS-232C Communications Line, using 4800 baud, eight bit words, no parity, one stop bit, and line enable. LOAD \\\"MDM:702E\\\",R loads a BASIC program from the modem, using seven bit words, odd parity, two stop bits, and line enable."
|
|
995
|
+
}
|
|
996
|
+
]
|
|
997
|
+
},
|
|
998
|
+
{
|
|
999
|
+
"name": "LOC",
|
|
1000
|
+
"variants": [
|
|
1001
|
+
"LOC"
|
|
1002
|
+
],
|
|
1003
|
+
"documentation": [
|
|
1004
|
+
{
|
|
1005
|
+
"variant": "LOC",
|
|
1006
|
+
"description": "",
|
|
1007
|
+
"syntax": "LOC",
|
|
1008
|
+
"longDescription": ""
|
|
1009
|
+
}
|
|
1010
|
+
]
|
|
1011
|
+
},
|
|
1012
|
+
{
|
|
1013
|
+
"name": "LOF",
|
|
1014
|
+
"variants": [
|
|
1015
|
+
"LOF"
|
|
1016
|
+
],
|
|
1017
|
+
"documentation": [
|
|
1018
|
+
{
|
|
1019
|
+
"variant": "LOF",
|
|
1020
|
+
"description": "",
|
|
1021
|
+
"syntax": "LOF",
|
|
1022
|
+
"longDescription": ""
|
|
1023
|
+
}
|
|
1024
|
+
]
|
|
1025
|
+
},
|
|
1026
|
+
{
|
|
1027
|
+
"name": "LOG",
|
|
1028
|
+
"variants": [
|
|
1029
|
+
"LOG"
|
|
1030
|
+
],
|
|
1031
|
+
"documentation": [
|
|
1032
|
+
{
|
|
1033
|
+
"variant": "LOG",
|
|
1034
|
+
"description": "Natural Logarithm",
|
|
1035
|
+
"syntax": "LOG (numeric expression)",
|
|
1036
|
+
"longDescription": "LOG returns the natural logarithm (base \\\"e\\\") of numeric expression. numeric expression must be greater than zero. Example 10 A = LOG(10) sets A equal to 2.302585092994."
|
|
1037
|
+
}
|
|
1038
|
+
]
|
|
1039
|
+
},
|
|
1040
|
+
{
|
|
1041
|
+
"name": "LPOS",
|
|
1042
|
+
"variants": [
|
|
1043
|
+
"LPOS"
|
|
1044
|
+
],
|
|
1045
|
+
"documentation": [
|
|
1046
|
+
{
|
|
1047
|
+
"variant": "LPOS",
|
|
1048
|
+
"description": "Printer Column Position",
|
|
1049
|
+
"syntax": "LPOS (dummy numeric expression)",
|
|
1050
|
+
"longDescription": "This command returns the current position of the printer print head within the printer buffer. Example LPRINT \\\"Printer head position:\\\"ILPOS(0) prints the message followed by the number."
|
|
1051
|
+
}
|
|
1052
|
+
]
|
|
1053
|
+
},
|
|
1054
|
+
{
|
|
1055
|
+
"name": "LPRINT",
|
|
1056
|
+
"variants": [
|
|
1057
|
+
"LPRINT",
|
|
1058
|
+
"LPRINT USING"
|
|
1059
|
+
],
|
|
1060
|
+
"documentation": [
|
|
1061
|
+
{
|
|
1062
|
+
"variant": "LPRINT",
|
|
1063
|
+
"description": "Print Data on Printer",
|
|
1064
|
+
"syntax": "LPRINT expression list",
|
|
1065
|
+
"longDescription": "LPRINT prints out the values of expression list on the printer. If the expressions are separated by commas, then the printer prints a value and advances to the next \\\"print zone\\\" before printing the next value. The print zones are defined every 14 columns (at column 0, column 14, column 28, and so on). If the expressions are separated by semicolons, the printer prints each value with no space between. All numbers are printed with a trailing blank. If the number is negative, the sign precedes the number, otherwise a blank precedes the number. No blanks precede or follow strings. (Note: You may not substitute L? for LPRINT.) Examples LPRINT \\\"The total for \\\";A$;\\\" was \\\"; TT If AS contains the string \\\"April\\\" and TT contains the value 1332.44, this statement prints: The total for April was 1332.44 LPRINT X,Y,Z prints the value of X beginning in column 0, Y in column 14, and Z in column 28. LPRINT X,,Z prints the value of X beginning in column 0, and Z in column 42 (two columns are skipped because of the two commas.)"
|
|
1066
|
+
},
|
|
1067
|
+
{
|
|
1068
|
+
"variant": "LPRINT USING",
|
|
1069
|
+
"description": "Print Formatted Data on Printer",
|
|
1070
|
+
"syntax": "LPRINT USING \\\"format string\\\"; expression list",
|
|
1071
|
+
"longDescription": "This command formats and prints out the values of expression list using format string. For examples and a description of format string, see PRINT USING."
|
|
1072
|
+
}
|
|
1073
|
+
]
|
|
1074
|
+
},
|
|
1075
|
+
{
|
|
1076
|
+
"name": "MAX",
|
|
1077
|
+
"variants": [
|
|
1078
|
+
"MAX"
|
|
1079
|
+
],
|
|
1080
|
+
"documentation": [
|
|
1081
|
+
{
|
|
1082
|
+
"variant": "MAX",
|
|
1083
|
+
"description": "",
|
|
1084
|
+
"syntax": "MAX",
|
|
1085
|
+
"longDescription": ""
|
|
1086
|
+
}
|
|
1087
|
+
]
|
|
1088
|
+
},
|
|
1089
|
+
{
|
|
1090
|
+
"name": "MDM",
|
|
1091
|
+
"variants": [
|
|
1092
|
+
"MDM ON/OFF/STOP"
|
|
1093
|
+
],
|
|
1094
|
+
"documentation": [
|
|
1095
|
+
{
|
|
1096
|
+
"variant": "MDM ON/OFF/STOP",
|
|
1097
|
+
"description": "Enable/Disable Modem Interrupt",
|
|
1098
|
+
"syntax": "MDM ON/OFF/STOP",
|
|
1099
|
+
"longDescription": "This command enables or disables the ON MDM interrupt. ON enables the interrupt so that if a character is received via the modem, BASIC jumps to the subroutine defined in the ON MDM command. OFF disables the interrupt. STOP disables the interrupt, however, BASIC \\\"remembers\\\" that a character was received, so that if you issue a MDM ON command, BASIC jumps immediately to the interrupt subroutine. Examples 1\u0102\u0098 MDM ON enables the communications interrupt."
|
|
1100
|
+
}
|
|
1101
|
+
]
|
|
1102
|
+
},
|
|
1103
|
+
{
|
|
1104
|
+
"name": "MENU",
|
|
1105
|
+
"variants": [
|
|
1106
|
+
"MENU"
|
|
1107
|
+
],
|
|
1108
|
+
"documentation": [
|
|
1109
|
+
{
|
|
1110
|
+
"variant": "MENU",
|
|
1111
|
+
"description": "Return to Menu",
|
|
1112
|
+
"syntax": "MENU",
|
|
1113
|
+
"longDescription": "MENU exits BASIC and returns you to the Model 100 Main Menu. If you were editing a current RAM filc, BASIC rewrites the file before returning to the Menu (unless you entered NEW before entering MENU). Example 1000 PRINT \\\"Press Any Key to Return to Menu\\\" 1010 A$ = INKEY$: IF A$ = \\\"\\\" GOTO 1010 1020 MENU prints the message and returns to the Menu when you press any key."
|
|
1114
|
+
}
|
|
1115
|
+
]
|
|
1116
|
+
},
|
|
1117
|
+
{
|
|
1118
|
+
"name": "MERGE",
|
|
1119
|
+
"variants": [
|
|
1120
|
+
"MERGE"
|
|
1121
|
+
],
|
|
1122
|
+
"documentation": [
|
|
1123
|
+
{
|
|
1124
|
+
"variant": "MERGE",
|
|
1125
|
+
"description": "Merge Two Programs",
|
|
1126
|
+
"syntax": "MERGE \\\"device: filename or configuration\\\"",
|
|
1127
|
+
"longDescription": "This command merges the lines from the ASCII formatted file called filename with the lines of the current program. If BASIC finds a duplicate line number, the line from filename replaces the current line. device may be RAM, CAS, COM, or MDM. If you don't specify a device, BASIC assumes RAM. filename consists of a string of one to six characters, the first of which is a letter. For RAM files, you may include the optional extension. DO; if omitted, BASIC assumes that extension. unless there is Basic file of same name. For example if there are \\\"PROG.DO\\\" and \\\"PROG.BA\\\", \\\"MERGE PROG\\\" will cause to merge PROG.BA, and result error. If device is CAS, then filename has no extension. filename is optional; if omitted, BASIC merges the first ASCII formatted cassette file it finds. For COM, configuration consists of a five character string of the pattern rwpbs, where: r r Baud Rate This is a number from 1 to 9, where 1=75; 2=110; 3=300; 4=600; 5=1200; 6=2400; 7=4800; 8=9600; 9=19200. w Word Length This is a number from 6 to 8, where 6=6 bits; 7=7 bits; 8=8 bits. p Parity Either E,O,I or N, where E=Even; O=Odd; I=Ignore; N=None. b Stop Bits Either 1 or 2, where 1=1 stop bit; 2=2 stop bits. s XON/XOFF Status Either E or D, where E=Enable; D=Disable. For MDM, configuration consists of a four character string of the pattern wpbs, defined above. (BASIC automatically sets the baud rate to 300 baud.) For information on storing files in ASCII format, see SAVE and CSAVE. Examples If the current program is: 10 FOR I=1 TO 100 20 PRINT AVE(I), BAL(I) 30 NEXT I and the file ACT.DO contains the lines: 20 PRINT CD$,BAL(I) 25 PRINT PD$ 40 MENU then after the command MERGE \\\"RAM:ACT.DO\\\" the current program reads: 10 FOR I=1 TO 10 20 PRINT CDS, BAL(I) 25 PRINT POS 30 NEXT I 40 MENU Other examples: MERGE \\\"CAS:ACCT\\\" merges the cassette file ACCT with the program in memory. MERGE \\\"COM:78e1e\\\" merges the file coming in on the RS-232C line with the program in memory. (Note: The party on the other end of the RS-232C line must send the ASCII-oriented file using the same configuration, after you enter the MERGE command.) MERGE \\\"MDM:8e1e\\\" merges the file coming in on the modem with the program in memory. (Note: The party on the other end of the phone line must send the ASCII-oriented file using the same configuration, after you enter the MERGE command.)"
|
|
1128
|
+
}
|
|
1129
|
+
]
|
|
1130
|
+
},
|
|
1131
|
+
{
|
|
1132
|
+
"name": "MID$",
|
|
1133
|
+
"variants": [
|
|
1134
|
+
"MID$"
|
|
1135
|
+
],
|
|
1136
|
+
"documentation": [
|
|
1137
|
+
{
|
|
1138
|
+
"variant": "MID$",
|
|
1139
|
+
"description": "Get Middle Characters of String",
|
|
1140
|
+
"syntax": "MID$(string expression, position, length)",
|
|
1141
|
+
"longDescription": "This function returns length characters from string starting at position. length and position are numeric expressions. length is optional; if omitted, MID$ returns the entire portion of the string starting at position. Example 10 HASH$ = MID$(A$,2,2) If A$ contains the string \\\"00349953,\\\" then this statement assigns string \\\"34\\\" to HASH$."
|
|
1142
|
+
},
|
|
1143
|
+
{
|
|
1144
|
+
"variant": "MID$",
|
|
1145
|
+
"description": "Replace Middle Characters of a String",
|
|
1146
|
+
"syntax": "MID$(string expression1,position,length) = string expression2",
|
|
1147
|
+
"longDescription": "This MID$ replaces characters of string expression1, starting at position, with string expression2. length and position are numeric expressions. length is optional; if present it is ignored. string expression1 always keeps its original size, even if it means truncating string expression2 to fit. Example 10 MID$(A$,5) = \\\"FF\\\" If AS contains the string \\\"00000000,\\\" then this statement changes AS to \\\"0000FF00.\\\" 1000 MID$(A$,5) = \\\"ABCDEF\\\" If AS contains the string \\\"00000000,\\\" then this statement changes AS to \\\"0000ABCD.\\\""
|
|
1148
|
+
}
|
|
1149
|
+
]
|
|
1150
|
+
},
|
|
1151
|
+
{
|
|
1152
|
+
"name": "MOD",
|
|
1153
|
+
"variants": [
|
|
1154
|
+
"MOD"
|
|
1155
|
+
],
|
|
1156
|
+
"documentation": [
|
|
1157
|
+
{
|
|
1158
|
+
"variant": "MOD",
|
|
1159
|
+
"description": "Modulo (remainder)",
|
|
1160
|
+
"syntax": "expression MOD expression",
|
|
1161
|
+
"longDescription": ""
|
|
1162
|
+
}
|
|
1163
|
+
]
|
|
1164
|
+
},
|
|
1165
|
+
{
|
|
1166
|
+
"name": "MOTOR",
|
|
1167
|
+
"variants": [
|
|
1168
|
+
"MOTOR"
|
|
1169
|
+
],
|
|
1170
|
+
"documentation": [
|
|
1171
|
+
{
|
|
1172
|
+
"variant": "MOTOR",
|
|
1173
|
+
"description": "Turn Cassette Motor On and Off",
|
|
1174
|
+
"syntax": "MOTOR ON or OFF",
|
|
1175
|
+
"longDescription": "MOTOR starts or stops the cassette recorder motor. Example MOTOR ON starts the cassette recorder motor."
|
|
1176
|
+
}
|
|
1177
|
+
]
|
|
1178
|
+
},
|
|
1179
|
+
{
|
|
1180
|
+
"name": "NAME",
|
|
1181
|
+
"variants": [
|
|
1182
|
+
"NAME...AS",
|
|
1183
|
+
"NAME"
|
|
1184
|
+
],
|
|
1185
|
+
"documentation": [
|
|
1186
|
+
{
|
|
1187
|
+
"variant": "NAME...AS",
|
|
1188
|
+
"description": "Rename a RAM file",
|
|
1189
|
+
"syntax": "NAME \\\"RAM:old filename\\\" AS \\\"RAM:new filename\\\"",
|
|
1190
|
+
"longDescription": "NAME renames a RAM file. old filename and new filename are strings of one to six characters, the first of which must be a letter, plus a two character extension. You must include the file's extension. Example NAME \\\"BILLS.BA\\\" AS \\\"ACCT.BA\\\" renames the file BILLS.BA to ACCT.BA."
|
|
1191
|
+
},
|
|
1192
|
+
{
|
|
1193
|
+
"variant": "NAME",
|
|
1194
|
+
"description": "This command renames old filename to new filename.",
|
|
1195
|
+
"syntax": "NAME \"ACCTS.DO\" AS \"OLDACT.DO\"",
|
|
1196
|
+
"longDescription": "This command renames *old filename* to *new filename*. *old filename* and *new filename* consist of strings of one to six characters, the first of which must be a letter, plus the two character extension. You must include the extension, and you may not change extensions. *old filename* must already exist and *new filename* must not already exist. **RAM** is optional.\n\nExamples\n\nNAME \"ACCTS.DO\" AS \"OLDACT.DO\"\nrenames the RAM file ACCTS.DO to OLDACT.DO.\n\n10 INPUT \"New filespec\" ;FS$\n20 NAME \"ACCTS.DO\" AS FS$\nrenames ACCTS.DO to the input string FSS."
|
|
1197
|
+
}
|
|
1198
|
+
]
|
|
1199
|
+
},
|
|
1200
|
+
{
|
|
1201
|
+
"name": "NEW",
|
|
1202
|
+
"variants": [
|
|
1203
|
+
"NEW"
|
|
1204
|
+
],
|
|
1205
|
+
"documentation": [
|
|
1206
|
+
{
|
|
1207
|
+
"variant": "NEW",
|
|
1208
|
+
"description": "Erase the Current Program",
|
|
1209
|
+
"syntax": "NEW",
|
|
1210
|
+
"longDescription": "NEW, erases the current program, sets numeric variables equal to zero, and sets string variables equal to null (\"\"). NEW does not change the string space allocation.\n\nExample\n\nNEW\n\ndeletes the current program."
|
|
1211
|
+
}
|
|
1212
|
+
]
|
|
1213
|
+
},
|
|
1214
|
+
{
|
|
1215
|
+
"name": "NEXT",
|
|
1216
|
+
"variants": [
|
|
1217
|
+
"NEXT"
|
|
1218
|
+
],
|
|
1219
|
+
"documentation": [
|
|
1220
|
+
{
|
|
1221
|
+
"variant": "NEXT",
|
|
1222
|
+
"description": "See FOR...NEXT",
|
|
1223
|
+
"syntax": "",
|
|
1224
|
+
"longDescription": ""
|
|
1225
|
+
}
|
|
1226
|
+
]
|
|
1227
|
+
},
|
|
1228
|
+
{
|
|
1229
|
+
"name": "NOT",
|
|
1230
|
+
"variants": [
|
|
1231
|
+
"NOT"
|
|
1232
|
+
],
|
|
1233
|
+
"documentation": [
|
|
1234
|
+
{
|
|
1235
|
+
"variant": "NOT",
|
|
1236
|
+
"description": "Logical NOT",
|
|
1237
|
+
"syntax": "NOT expression",
|
|
1238
|
+
"longDescription": ""
|
|
1239
|
+
}
|
|
1240
|
+
]
|
|
1241
|
+
},
|
|
1242
|
+
{
|
|
1243
|
+
"name": "OFF",
|
|
1244
|
+
"variants": [
|
|
1245
|
+
"OFF"
|
|
1246
|
+
],
|
|
1247
|
+
"documentation": [
|
|
1248
|
+
{
|
|
1249
|
+
"variant": "OFF",
|
|
1250
|
+
"description": "",
|
|
1251
|
+
"syntax": "OFF",
|
|
1252
|
+
"longDescription": ""
|
|
1253
|
+
}
|
|
1254
|
+
]
|
|
1255
|
+
},
|
|
1256
|
+
{
|
|
1257
|
+
"name": "ON",
|
|
1258
|
+
"variants": [
|
|
1259
|
+
"ON COM GOSUB",
|
|
1260
|
+
"ON ERROR GOTO",
|
|
1261
|
+
"ON KEY GOSUB",
|
|
1262
|
+
"ON MDM GOSUB",
|
|
1263
|
+
"ON TIME$ GOSUB",
|
|
1264
|
+
"ON...GOTO",
|
|
1265
|
+
"ON...GOSUB"
|
|
1266
|
+
],
|
|
1267
|
+
"documentation": [
|
|
1268
|
+
{
|
|
1269
|
+
"variant": "ON COM GOSUB",
|
|
1270
|
+
"description": "Define Communications Interrupt",
|
|
1271
|
+
"syntax": "ON COM GOSUB line number",
|
|
1272
|
+
"longDescription": "This command defines a communications interrupt subroutine for incoming RS-232C communications. Once BASIC executes ON COM GOSUB, on receiving data over the RS-232C line, it branches to line number, regardless of where it currently is in the program. Normally, you'll put this command at the beginning of your program.\n\n(Note: You must enable communications interrupt before it can interrupt the program. See COM ON for details.)\n\nExample\n\n10 ON COM GOSUB 1000\n20 COM ON\n.\n.\n.\n1000 OPEN \"COM:78N1E\" FOR INPUT AS 1\n1010 OPEN \"IMPDAT.DO\" FOR OUTPUT AS 2\n1020 LINE INPUT #1,A$\n1030 PRINT #2,A$\n1040 IF NOT EOF(1) THEN GOTO 1020\n1050 CLOSE 1,2\n1060 RETURN\n\ndefines a communications interrupt routine starting at line 1000. When data begins coming in on the RS-232C line, control transfers to line 1000, where it copies the input into a RAM file called \"IMPDAT.DO\"."
|
|
1273
|
+
},
|
|
1274
|
+
{
|
|
1275
|
+
"variant": "ON ERROR GOTO",
|
|
1276
|
+
"description": "Define Error Interrupt",
|
|
1277
|
+
"syntax": "ON ERROR GOTO line number",
|
|
1278
|
+
"longDescription": "*ON ERROR* defines an error trapping interrupt. After executing this command, if an error occurs elsewhere in the program, BASIC immediately jumps to *line number*. Normally, the routine beginning at *line number* processes the error in some fashion. At the end of the routine, you must either terminate the program (*STOP* or *END*) or else return to the program with *RESUME*. See *STOP*, *END*, and *RESUME* for more details.\n\nExample\n\n100 ON ERROR GOTO 1000\n...\n200 X = 10000 / Y\n...\n300 X = 300 / Y\n...\n1000 IF ERR<>11 THEN PRINT\n\"Error Code\";ERR;\"in line \";ERL :\nSTOP ELSE X=100000: RESUME NEXT\n\nIf an error occurs, BASIC jumps to line 1000. If the error was a division by zero (error #11), then X is set to a high value, 100000, and execution returns to the line following the error line. either line 200 or line 300. If some other error occurred, BASIC prints out the message and stops."
|
|
1279
|
+
},
|
|
1280
|
+
{
|
|
1281
|
+
"variant": "ON KEY GOSUB",
|
|
1282
|
+
"description": "Define Function Key Interrupts",
|
|
1283
|
+
"syntax": "ON KEY GOSUB line number list",
|
|
1284
|
+
"longDescription": "This statement defines interrupts for the Function Keys. After executing this command, pressing the *nth* Function Key tells BASIC to jump to the *nth* line number in line number list. You may define as many of the Function Keys as you wish \u00e2\u20ac\u201d BASIC ignores your pressing of undefined keys.\n\n(Note: You must enable the Function Keys before they will interrupt the program. See KEY ON for details.)\n\nExamples\n10 ON KEY GOSUB 1000,2000,3000,,5000\n\ndefines an interrupt subroutine for Function Key 1, beginning at line 1000, an interrupt\nsubroutine for Function Key 2, beginning at line 2000, an interrupt subroutine for Function Key\n3, beginning at line 3000, and an interrupt subroutine for Function Key 5, beginning at line\n5000. Function keys 4,6,7, and 8 are left undefined."
|
|
1285
|
+
},
|
|
1286
|
+
{
|
|
1287
|
+
"variant": "ON MDM GOSUB",
|
|
1288
|
+
"description": "Define Modem Interrupt",
|
|
1289
|
+
"syntax": "ON MDM GOSUB line number",
|
|
1290
|
+
"longDescription": "This command defines an interrupt for incoming modem communications. Once BASIC executes ON MDM GOSUB, on receiving data over the modem, it branches to line number, regardless of where it currently is in the program. Normally, you'll put this command at the beginning of your program.\n\n(Note: You must enable the modem interrupt before it can interrupt the program. See MDM ON for details.)\n\nExample\n\n10 ON MDM GOSUB 1000\ndefines a modem interrupt routine beginning at line 1000."
|
|
1291
|
+
},
|
|
1292
|
+
{
|
|
1293
|
+
"variant": "ON TIME$ GOSUB",
|
|
1294
|
+
"description": "Define Clock Interrupt",
|
|
1295
|
+
"syntax": "ON TIMES$ = \"time\" GOSUB line number",
|
|
1296
|
+
"longDescription": "This command defines an interrupt for a clock condition. time is a string expression of the form\n\"HH:MM:SS.\" When TIMES equals time, BASIC calls the subroutine at line number,\nregardless of where it currently is in the program. Normally, you'll put this command at the\nbeginning of your program.\n\n(Note: You must enable the TIMES interrupt before it can interrupt the program. See TIMES ON for details.)\n\nExample\n\n10 ON TIME$ = \"14:20:00\" GOSUS 1000\ndefines a clock interrupt for 2:20 PM (14:20:00), beginning at line 1000."
|
|
1297
|
+
},
|
|
1298
|
+
{
|
|
1299
|
+
"variant": "ON...GOTO",
|
|
1300
|
+
"description": "Branch on Expression",
|
|
1301
|
+
"syntax": "ON numeric expression GOTO line number list",
|
|
1302
|
+
"longDescription": "ON...GOTO evaluates numeric expression to an integer n, then branches to the nth line number in the list. numeric expression must evaluate to a non-negative number, which, if zero or greater than the number of line numbers in the list, tells BASIC to continue execution without branching.\n\nExample\n\n10 ON X GOTO 100,200,300\n\nbranches 10 100, 200 or 300, depending if X equals 1,2, or 3, respectively."
|
|
1303
|
+
},
|
|
1304
|
+
{
|
|
1305
|
+
"variant": "ON...GOSUB",
|
|
1306
|
+
"description": "Branch on Expression",
|
|
1307
|
+
"syntax": "ON numeric expression GOSUB line number list",
|
|
1308
|
+
"longDescription": "ON...GOSUB evaluates numeric expression to an integer n, then calls the subroutine beginning at the nth line number in the list. numeric expression must evaluate to a non-negative number. which, if zero or greater than the number of line numbers in the list, tells BASIC to continue execution without branching.\n\nExample\n\n10 ON X GOSUB 100,200,300\n\ncalls the subroutine beginning at line 100,200 or 300, depending if X equals 1,2, or 3,\nrespectively."
|
|
1309
|
+
}
|
|
1310
|
+
]
|
|
1311
|
+
},
|
|
1312
|
+
{
|
|
1313
|
+
"name": "OPEN",
|
|
1314
|
+
"variants": [
|
|
1315
|
+
"OPEN"
|
|
1316
|
+
],
|
|
1317
|
+
"documentation": [
|
|
1318
|
+
{
|
|
1319
|
+
"variant": "OPEN",
|
|
1320
|
+
"description": "Open a File for I/O",
|
|
1321
|
+
"syntax": "OPEN \"device:filename or configuration\" FOR mode AS file number",
|
|
1322
|
+
"longDescription": "OPEN allocates a buffer for a file on the given device. device may be **RAM**, **CAS**, **COM**, **LCD**, **LPT**, or **MDM**. file number is the buffer nuinber assigned to the file. mode can be:\n\n**OUTPUT** specifying data will be written sequentially to the file, starting at the beginning of the file\n\n**INPUT** specifying data will be read sequentially from the file, starting at the beginning of the file\n\n**APPEND** specifying that data will be written sequentially to the file, adding records to the end of the file\n\nRAM Files: filename is a string of up to six characters, the first of which is a letter, plus a two character extension which must be .DO. mode can be OUTPUT, INPUT, or APPEND.\n\nCassette Files (CAS): filename is a string of up to six characters, the first of which is a letter.\nmode can be OUTPUT or INPUT.\n\nCommunications Files (COM): configuration consists of a five character string of the form rwpbs, where\n\nr Baud Rate This is a number from 1 to 9, where 1=75, 2=110, 3=300;\n4=600; 5=1200; 6=2400; 7=4800; 8=9600; 9=19200.\n\nw Word Length This is a number from 6 to 8, where 6=6 bits; 7=7 bits; 8 = 8 bits.\n\np Parity Either E,O. or N, where E=even; O=odd; I=Ignore; N=none.\n\nb Stop Bits Either 1 or 2, where 1=1 stop bit; 2=2 stop bits.\n\ns XON/XOFF Status Either E or D, where E = enable; D=disable.\n\nmode can be INPUT or OUTPUT.\n\nModem Files (MDM): configuration consists of a four character string of the pattern wpbs, defined above. (BASIC automatically sets the baud rate to 300 baud.)\nScreen Files (LCD): mode must be OUTPUT. There is no configuration.\nPrinter Files (LPT): mode must be OUTPUT. There is no configuration.\n(Note: If your program uses more than one file at once, you must reset MAXFILES.)\n\nExamples\n\n10 OPEN \"RAM:ACCT.DO\" FOR APPEND AS 1\nopens a RAM file called ACCT.DO for appending, and assigns it the file number \"1.\"\n\n10 OPEN \"CAS:\" FOR OUTPUT AS 3\nopens an output file on cassette and assigns it to file number \"3.\"\n\n10 OPEN \"COM:6601E\" FOR INPUT AS 4\nopens a communications file for input as file number 4, using 2400 baud, 6 bit words, odd parity. 1 stop bit, and line enable.\n\n10 OPEN \"MDM:6E1E\" FOR INPUT AS 4\nopens a modem file for input as file number 4, using 6 bit words, even parity. 1 stop bit, and line enable.\n\n10 OPEN \"LCD:\" FOR OUTPUT AS 1\nopens a screen file as file number 1.\n\n10 OPEN \"LPT:\" FOR OUTPUT AS 1\nopens a printer file as file number 1."
|
|
1323
|
+
}
|
|
1324
|
+
]
|
|
1325
|
+
},
|
|
1326
|
+
{
|
|
1327
|
+
"name": "OR",
|
|
1328
|
+
"variants": [
|
|
1329
|
+
"OR"
|
|
1330
|
+
],
|
|
1331
|
+
"documentation": [
|
|
1332
|
+
{
|
|
1333
|
+
"variant": "OR",
|
|
1334
|
+
"description": "Logical OR",
|
|
1335
|
+
"syntax": "expression OR expression",
|
|
1336
|
+
"longDescription": ""
|
|
1337
|
+
}
|
|
1338
|
+
]
|
|
1339
|
+
},
|
|
1340
|
+
{
|
|
1341
|
+
"name": "OUT",
|
|
1342
|
+
"variants": [
|
|
1343
|
+
"OUT"
|
|
1344
|
+
],
|
|
1345
|
+
"documentation": [
|
|
1346
|
+
{
|
|
1347
|
+
"variant": "OUT",
|
|
1348
|
+
"description": "Output a Byte to a CPU Port",
|
|
1349
|
+
"syntax": "OUT port number, byte value",
|
|
1350
|
+
"longDescription": "This command outputs byte value to port number. port number and byte value are numeric expressions in the range 0 to 255.\n\nExample\n\n10 OUT 55,100\noutputs 100 to CPU port 55."
|
|
1351
|
+
}
|
|
1352
|
+
]
|
|
1353
|
+
},
|
|
1354
|
+
{
|
|
1355
|
+
"name": "PEEK",
|
|
1356
|
+
"variants": [
|
|
1357
|
+
"PEEK"
|
|
1358
|
+
],
|
|
1359
|
+
"documentation": [
|
|
1360
|
+
{
|
|
1361
|
+
"variant": "PEEK",
|
|
1362
|
+
"description": "Get a Value From Memory",
|
|
1363
|
+
"syntax": "PEEK (memory address)",
|
|
1364
|
+
"longDescription": "The PEEK function returns the byte value stored at memory address, memory address and the returned value are both in decimal form.\n\nExample\n\n10 A% = PEEK(16999)\n\nassigns the byte value at address 16999 to A%."
|
|
1365
|
+
}
|
|
1366
|
+
]
|
|
1367
|
+
},
|
|
1368
|
+
{
|
|
1369
|
+
"name": "POKE",
|
|
1370
|
+
"variants": [
|
|
1371
|
+
"POKE"
|
|
1372
|
+
],
|
|
1373
|
+
"documentation": [
|
|
1374
|
+
{
|
|
1375
|
+
"variant": "POKE",
|
|
1376
|
+
"description": "Load a Value into Memory",
|
|
1377
|
+
"syntax": "POKE memory address, byte value",
|
|
1378
|
+
"longDescription": "POKE loads memory address with byte value. Both must be expressed as decimal numeric expressions.\n\nExample\n\n100 POKE 60000, 104\nloads 104 into address 60000."
|
|
1379
|
+
}
|
|
1380
|
+
]
|
|
1381
|
+
},
|
|
1382
|
+
{
|
|
1383
|
+
"name": "POS",
|
|
1384
|
+
"variants": [
|
|
1385
|
+
"POS"
|
|
1386
|
+
],
|
|
1387
|
+
"documentation": [
|
|
1388
|
+
{
|
|
1389
|
+
"variant": "POS",
|
|
1390
|
+
"description": "Get Screen Position",
|
|
1391
|
+
"syntax": "POS (dummy numeric expression)",
|
|
1392
|
+
"longDescription": "POS returns the current horizontal Screen position of the Cursor.\n\nExample\n\n 100 OP% = POS(0)\n\nassigns OP% the current horizontal cursor position."
|
|
1393
|
+
}
|
|
1394
|
+
]
|
|
1395
|
+
},
|
|
1396
|
+
{
|
|
1397
|
+
"name": "POWER",
|
|
1398
|
+
"variants": [
|
|
1399
|
+
"POWER",
|
|
1400
|
+
"POWER CONT",
|
|
1401
|
+
"POWER OFF"
|
|
1402
|
+
],
|
|
1403
|
+
"documentation": [
|
|
1404
|
+
{
|
|
1405
|
+
"variant": "POWER",
|
|
1406
|
+
"description": "Automatic Power Down",
|
|
1407
|
+
"syntax": "POWER numeric expression",
|
|
1408
|
+
"longDescription": "POWER sets the automatic power down period. numeric expression has a range of 10 to 255. The Model 100 will automatically turn off after a period of numeric expression x 0.1 minutes if you are neither running a program nor entering commands. The default value is 100 (10 minutes).\n\nExample\n10 POWER 10\nsets the automatic power down period to one minute (10 X 0.1)."
|
|
1409
|
+
},
|
|
1410
|
+
{
|
|
1411
|
+
"variant": "POWER CONT",
|
|
1412
|
+
"description": "Prevent Automatic Power Down",
|
|
1413
|
+
"syntax": "POWER CONT",
|
|
1414
|
+
"longDescription": "This command disables the automatic power down feature of the Model 100.\n\nExample\n\n10 POWER CONT"
|
|
1415
|
+
},
|
|
1416
|
+
{
|
|
1417
|
+
"variant": "POWER OFF",
|
|
1418
|
+
"description": "Turn Off Power",
|
|
1419
|
+
"syntax": "POWER OFF, RESUME",
|
|
1420
|
+
"longDescription": "This turns off the power to the Model 100 immediately. RESUME is optional; if present, upon turning the power back on, the Model 100 resumes execution of the program at the statement following the POWER OFF,RESUME. If not present, then the Model 100 returns to the Main Menu upon power up.\n\nExample\n\n10 IF TIME$>\"11:30:00\" THEN POWER OFF\nturns off the power if the clock is past 11:30 AM.\n20 POWER OFF,RESUME\n30 PRINT \"Starting Back Up\"\n\nturns off the power. When you turn the power back on, BASIC begins execution in line 30."
|
|
1421
|
+
}
|
|
1422
|
+
]
|
|
1423
|
+
},
|
|
1424
|
+
{
|
|
1425
|
+
"name": "PRESET",
|
|
1426
|
+
"variants": [
|
|
1427
|
+
"PRESET"
|
|
1428
|
+
],
|
|
1429
|
+
"documentation": [
|
|
1430
|
+
{
|
|
1431
|
+
"variant": "PRESET",
|
|
1432
|
+
"description": "Turn Off an LCD Pixel",
|
|
1433
|
+
"syntax": "PRESET (x-coordinate, y-coordinate)",
|
|
1434
|
+
"longDescription": "PRESET turns off the LCD pixel at (x-coordinate, y-coordinate). x-coordinate may range from 0 to 239, and y-coordinate may range from 0 to 63. See also PSET.\n\nExample\n\n10 PRESET (55,10)\n\nturns off the pixel at (55,10)."
|
|
1435
|
+
}
|
|
1436
|
+
]
|
|
1437
|
+
},
|
|
1438
|
+
{
|
|
1439
|
+
"name": "PRINT",
|
|
1440
|
+
"variants": [
|
|
1441
|
+
"PRINT",
|
|
1442
|
+
"PRINT #",
|
|
1443
|
+
"PRINT USING",
|
|
1444
|
+
"PRINT # USING"
|
|
1445
|
+
],
|
|
1446
|
+
"documentation": [
|
|
1447
|
+
{
|
|
1448
|
+
"variant": "PRINT",
|
|
1449
|
+
"description": "Print Data on the Screen",
|
|
1450
|
+
"syntax": "PRINT expression list",
|
|
1451
|
+
"longDescription": "This command prints the data in expression list onto the Screen, starting at the left-most end of the line. The items in expression list are separated by commas or semi-colons. If commas are used, the Cursor automatically advances to the next \"print zone\" before printing the next item. Print zones are at column 0 and column 14. If semi-colons are used, no space is inserted between the items printed on the display.\n\nPositive numbers are printed with a leading blank and all numbers are printed with a trailing blank. Trailing zeroes to the right of the decimal point are not printed out.\n\nNo blanks are printed before or after strings. BASIC automatically moves the cursor to the next line after printing the expression list.\n\nYou may use a question mark (\"?\") as an abbreviation for the word PRINT.\n\n# Examples\n\n100 PRINT \"Menu #\";I\nprints MENU # followed immediately by the value of 1.\n\n200 PRINT IZ,JZ,K\nprints the value of I% starting in column 0, J% in column 15, and K% in column O of the next\nline."
|
|
1452
|
+
},
|
|
1453
|
+
{
|
|
1454
|
+
"variant": "PRINT #",
|
|
1455
|
+
"description": "Print to a File",
|
|
1456
|
+
"syntax": "PRINT # file number, expression list",
|
|
1457
|
+
"longDescription": "PRINT # prints or transmits the values of expression list to the file opened as file number. The items in expression list are separated by commas or semi-colons. If commas are used, the Cursor automatically advances to the next \"print zone\" before printing the next item. Print zones are defined at columns 0, 15, 30, and so on. If semi-colons are used, no space is inserted between the items.\n\nPositive numbers are printed with a leading blank and all numbers are printed with a trailing\nblank. Trailing zeroes to the right of the decimal point are not printed out. No blanks are printed\nbefore or after strings.\n\nYou may use a question mark (\"?\") as an abbreviation for the word PRINT.\n\nExamples\n\n100 OPEN \"CAS:\" FOR OUTPUT AS 1\n.\n.\n200 PRINT #1,A$\n\nprints the value of A$ to a file on the cassette tape.\n\n100 OPEN \"COM:B7N1E\" FOR OUTPUT AS 4\n.\n.\n200 PRINT #4,10,20,30\n\ntransmits the values 10, 20, and 30 out the RS-232C lines."
|
|
1458
|
+
},
|
|
1459
|
+
{
|
|
1460
|
+
"variant": "PRINT USING",
|
|
1461
|
+
"description": "Formatted Print",
|
|
1462
|
+
"syntax": "PRINT USING \"format\"; expression list",
|
|
1463
|
+
"longDescription": "This command prints the data in expression list using the specified format. The data items in expression list may be separated either by commas or semi-colons. format consists of one or more \"field specifiers,\" which describe the type and format of the displayed data. If there are more data items in the list than given formats, BASIC reuses format starting at the left side of the string.\n\nThe field specifiers are:\n\n\"!\"\n(String Data) Tells BASIC to print only the first character in the given string.\nPRINT USING \"! \"i\"Tandy\"\nT\n\n\"\\n-spaces\\\" (String Data) Tells BASIC to print 2 + n characters from the string. If the two 's are typed with no spaces, two characters are printed; with one space, three characters are printed, and so on.\n\nIf the string is longer than the field, the extra characters are ignored. If the field is longer than the string, the string is left-justified in the field and padded with spaces on the right.\n\nPRINT USING \"\\ \\ \"; \"Tandy\"\nTand\n\n# (Numeric Data) Specifies one digit position. Digit positions are always filled. If the number to be printed has fewer digits than position specified, the number will be right-justified (preceded by spaces) in the field, with spaces filled in on the left. If the number to be printed is larger than the specified field, BASIC prints out a \"%\" preceding the number.\n\nPRINT USING \"*****\":5\n5\n\n+ (Numeric Data) Inserts the algebraic sign of the number, either at the beginning or end of the number, depending on its occurrence in the format string\n\nPRINT USING \"+*****\";-13\n-13\n\nPRINT USING \"*****\";14\n14\n\n- (Numeric Data) For negative numbers, inserts a minus sign either at the beginning or end of the number, depending on its occurrence in the format string. If the number is positive, then BASIC inserts a blank.\n\nPRINT USING \"-*****\";14\n14\n\nPRINT USING \"#*#**.**-\";0.45\n0.45\n\n**\n(Numeric Data) Changes any leading blanks to leading asterisks blanks. The\n** also counts as two digit positions and must occur on the left side of the\nformat string.\nPRINT USING \"*****\"; 145\n****145\n\n$$\n(Numeric Data) Prints a dollar sign to the immediate left of the formatted\nnumber. The $$ counts as two digit positions, one of which is the dollar sign\nand must be the first characters of the format string. You may not use the\nexponential format unless you specify a trailing minus sign.\nPRINT USING \"$$*****\";450\n$450\n\n**$\n(Numeric Data) Fills leading spaces to asterisks except for the space to the\nimmediate left of the number, where it inserts a dollar sign. **$ counts as three\ndigit positions, one of which is the dollar sign.\nPRINT USING \"**$***\";12\n***$12\n\n(Numeric Data) Inserts a decimal point. This specifier must be used as part of\n\"#\" field string. If the format string specifies that a digit is to precede the\ndecimal point, the digit will always be printed (as 0 if necessary). Digits to the\nright of the decimal point are rounded as necessary.\nPRINT USING \"****.##\";14.5\n14.50\nPRINT USING \"####.##\";0.588\n0.59\n\n,\n(Numeric Data) Inserts a comma every three digits to the left of the decimal\npoint. If the digit to the left of a potential comma is blank, then BASIC inserts\na blank instead of the comma. The , must lie between numeric field specifiers\n(#,$ or **), to the left of the decimal point and counts as a digit position.\nPRINT USING \"#########,\";14432\n14,432\n\n----\n(Numeric Data) Specifies exponential format. The four carats count as four\ncharacters in the field and come after the numeric descriptors. Any decimal\npoint position may be specified \u00e2\u20ac\u201d the significant digits are left-justified, and\nthe exponent is adjusted.\nUnless a leading + or trailing + or \u00e2\u20ac\u201d is specified, one digit position will be\nused to the left of the decimal point to print a space or a minus sign.\nPRINT USING \"****^^^^^\";150000\nE-0.4\n\n(Note: The caret (^) is entered by pressing SHIFT 6, and the backslash (\\) is entered by\npressing GRPH -)\n\nExamples\n\n10 PRINT USING \"\\ \\ ******,**## ******,**\";\nA$,IBAL,OBAL\n\nIf A$ contains the string \"Cramer.W.D\", IBAL equals 1440.44, and OBAL equals 980.00, then\nthis statement prints:\nCramer.W.D 1.440.44 980.00\n200 PRINT USING \"*****..##\";A,B,C\n\nIf A contains 34, B contains 44.323, and C contains 12333.33, then this statement prints out:\n$34.00\n$44.32\n$12333.33\n\nNote that the blanks in the format string are significant.\n\nIn addition, characters other than the field specifiers are inserted as is, providing there is enough\nroom in the field that BASIC doesn't try to use the characters for conversion. For example,\n\nPRINT USING \"$********,**\";4534.34\n\nprints:\n$ 4,534.34"
|
|
1464
|
+
},
|
|
1465
|
+
{
|
|
1466
|
+
"variant": "PRINT # USING",
|
|
1467
|
+
"description": "Formatted Print to a File",
|
|
1468
|
+
"syntax": "PRINT #file number, USING \"format\"; expression list",
|
|
1469
|
+
"longDescription": "Formats the data in expression list and sends it to the device opened as file number. See PRINT\n# and PRINT USING for more information and examples."
|
|
1470
|
+
}
|
|
1471
|
+
]
|
|
1472
|
+
},
|
|
1473
|
+
{
|
|
1474
|
+
"name": "PSET",
|
|
1475
|
+
"variants": [
|
|
1476
|
+
"PSET"
|
|
1477
|
+
],
|
|
1478
|
+
"documentation": [
|
|
1479
|
+
{
|
|
1480
|
+
"variant": "PSET",
|
|
1481
|
+
"description": "Turn On LCD Pixels",
|
|
1482
|
+
"syntax": "PSET (x-coordinate,y-coordinate)",
|
|
1483
|
+
"longDescription": "PSET turns on the LCD pixel at x-coordinate, y-coordinate, where x-coordinate is a numeric expression ranging from 0 to 239 and y-coordinate is a numeric expression ranging from 0 to 63.\n\nExample\n\n10 PSET (40,45)\n\nturns on the pixel at 40,45."
|
|
1484
|
+
}
|
|
1485
|
+
]
|
|
1486
|
+
},
|
|
1487
|
+
{
|
|
1488
|
+
"name": "READ",
|
|
1489
|
+
"variants": [
|
|
1490
|
+
"READ"
|
|
1491
|
+
],
|
|
1492
|
+
"documentation": [
|
|
1493
|
+
{
|
|
1494
|
+
"variant": "READ",
|
|
1495
|
+
"description": "Read Values From a DATA List",
|
|
1496
|
+
"syntax": "READ variable list",
|
|
1497
|
+
"longDescription": "This command reads an appropriate number of values from a DATA statement and stores the values in the variables of variable list. The values in the DATA statements must match in type (string or numeric) with the variables in variable list\n\nThe first time BASIC executes a READ command, the first value in the first DATA statement is used, the second time, the second value in the DATA statement is read, and so on. When all the items in the first DATA statement have been read, the next READ uses the first value in the second DATA statement, and so on.\n\nTo reuse the values of the DATA command, use the RESTORE command.\n\nSee also **DATA** and **RESTORE**.\n\nExample\n\n```\n100 DATA 0.4, 0.2, \"Trinity River\"\n120 READ A,B%,C$\n```\n\nassigns A the value 0.4, B% the value 0.2, and C$ the string Trinity River."
|
|
1498
|
+
}
|
|
1499
|
+
]
|
|
1500
|
+
},
|
|
1501
|
+
{
|
|
1502
|
+
"name": "REM",
|
|
1503
|
+
"variants": [
|
|
1504
|
+
"REM"
|
|
1505
|
+
],
|
|
1506
|
+
"documentation": [
|
|
1507
|
+
{
|
|
1508
|
+
"variant": "REM",
|
|
1509
|
+
"description": "Comment",
|
|
1510
|
+
"syntax": "REM comment statement",
|
|
1511
|
+
"longDescription": "REM signifies to BASIC that the remainder of the line is a comment. Since BASIC ignores everything following REM, comment statement must be the last statement of the line.\n\nYou may abbreviate REM with an apostrophe. If the comment follows another BASIC command, then you must either use the ' or else precede REM with a colon.\n\nExamples\n10 REM This program finds the standard deviation\n10 ' This program finds the standard deviation\n100 AVE = SUM / TT 'Calculate the average\n100 AVE = SUM / TT :REM Calculate the average"
|
|
1512
|
+
}
|
|
1513
|
+
]
|
|
1514
|
+
},
|
|
1515
|
+
{
|
|
1516
|
+
"name": "RESTORE",
|
|
1517
|
+
"variants": [
|
|
1518
|
+
"RESTORE"
|
|
1519
|
+
],
|
|
1520
|
+
"documentation": [
|
|
1521
|
+
{
|
|
1522
|
+
"variant": "RESTORE",
|
|
1523
|
+
"description": "Reset the DATA Statement Pointer",
|
|
1524
|
+
"syntax": "RESTORE line number",
|
|
1525
|
+
"longDescription": "This command resets the DATA statement pointer to the first item in the DATA statement on line number so that a READ command can access the same values more than once. line number is optional; if omitted, BASIC uses the first DATA statement.\n\nSee also DATA and READ.\n\nExample\n100 DATA \"Nuts\", \"Bolts\", \"Screws\", \"Hammers\"\n.\n.\n300 READ ITEMS$(1), ITEMS$(2), ITEMS$(3), ITEMS$(4)\n.\n.\n600 RESTORE 100\n610 READ CT$(1), CT$(2), CT$(3), CT$(4)\n\nLine 300 assigns the strings of the DATA statement in line 100 to ITEMS's 1 through 4. Line\n600 resets the DATA pointer so that line 610 reassigns the strings to CTS's 1 through 4."
|
|
1526
|
+
}
|
|
1527
|
+
]
|
|
1528
|
+
},
|
|
1529
|
+
{
|
|
1530
|
+
"name": "RESUME",
|
|
1531
|
+
"variants": [
|
|
1532
|
+
"RESUME"
|
|
1533
|
+
],
|
|
1534
|
+
"documentation": [
|
|
1535
|
+
{
|
|
1536
|
+
"variant": "RESUME",
|
|
1537
|
+
"description": "Resume Execution After an Error",
|
|
1538
|
+
"syntax": "RESUME line number",
|
|
1539
|
+
"longDescription": "RESUME ends an error handling routine by branching to line number where BASIC begins normal execution. If line number is null or 0, then BASIC returns to the line which caused the error. You may also specify NEXT in which case BASIC returns to the line immediately following the error causing line.\n\nExample\n1000 IF ERR = 18 THEN PRINT @0, \"Printer\nNot Ready!!!\": RESUME\n1010 .\n\nIf an I/O error occurs, then BASIC prints the message and resumes execution at the offending line. Otherwise, BASIC proceeds to line 1010."
|
|
1540
|
+
}
|
|
1541
|
+
]
|
|
1542
|
+
},
|
|
1543
|
+
{
|
|
1544
|
+
"name": "RETURN",
|
|
1545
|
+
"variants": [
|
|
1546
|
+
"RETURN"
|
|
1547
|
+
],
|
|
1548
|
+
"documentation": [
|
|
1549
|
+
{
|
|
1550
|
+
"variant": "RETURN",
|
|
1551
|
+
"description": "Returns from a subroutine",
|
|
1552
|
+
"syntax": "RETURN",
|
|
1553
|
+
"longDescription": ""
|
|
1554
|
+
}
|
|
1555
|
+
]
|
|
1556
|
+
},
|
|
1557
|
+
{
|
|
1558
|
+
"name": "RIGHT$",
|
|
1559
|
+
"variants": [
|
|
1560
|
+
"RIGHT$"
|
|
1561
|
+
],
|
|
1562
|
+
"documentation": [
|
|
1563
|
+
{
|
|
1564
|
+
"variant": "RIGHT$",
|
|
1565
|
+
"description": "Return Right Portion of a String",
|
|
1566
|
+
"syntax": "RIGHT$ (string expression,count)",
|
|
1567
|
+
"longDescription": "RIGHTS returns the right-most count characters of string expression. count is a numeric expression.\n\nExample\n\n10 SEC$ = RIGHT$(TIME$,2)\nassigns the current second count to SEC$."
|
|
1568
|
+
}
|
|
1569
|
+
]
|
|
1570
|
+
},
|
|
1571
|
+
{
|
|
1572
|
+
"name": "RND",
|
|
1573
|
+
"variants": [
|
|
1574
|
+
"RND"
|
|
1575
|
+
],
|
|
1576
|
+
"documentation": [
|
|
1577
|
+
{
|
|
1578
|
+
"variant": "RND",
|
|
1579
|
+
"description": "Return Pseudo-Random Number",
|
|
1580
|
+
"syntax": "RND (numeric expression)",
|
|
1581
|
+
"longDescription": "RND returns a pseudo-random number between 0 and 1. If numeric expression is non-zero, then\nRND returns a new random number. If numeric expression equals 0, then RND returns the last\nrandom number generated.\n\nExample\n\n20 PRINT RND(1)\n30 PRINT RND(0)\n\nPrints the same random number twice.\n\n(Note: RND always generates the same random number series. If your application requires a different random number starting the sequence each time, you can use the clock to establish a starting point in the sequence. For example, the following routine points the random number generator to one of 60 starting points in the generator:\n\n```\n10 SEC = VAL(RIGHT$(TIME$,2))\n20 FOR I=1 TO SEC\n30 DUMMY = RND(1)\n40 NEXT I\n```"
|
|
1582
|
+
}
|
|
1583
|
+
]
|
|
1584
|
+
},
|
|
1585
|
+
{
|
|
1586
|
+
"name": "RUN",
|
|
1587
|
+
"variants": [
|
|
1588
|
+
"RUN"
|
|
1589
|
+
],
|
|
1590
|
+
"documentation": [
|
|
1591
|
+
{
|
|
1592
|
+
"variant": "RUN",
|
|
1593
|
+
"description": "Execute a New BASIC Program",
|
|
1594
|
+
"syntax": "RUN \"device:filename or configuration\", R",
|
|
1595
|
+
"longDescription": "RUN loads and runs a BASIC program from device. filename consists of a string of one to six characters, the first of which is a letter. device may be RAM, CAS, COM or MDM if device is RAM, then you may include the optional extension .BA or .DO. If device is CAS, then you use no extension.\n\nFor COM, configuration consists of a five character string of the pattern rwphs, where\n\nr Baud Rate This is a number from 1 to 9, where 1=75; 2=110; 3=300; 4=600; 5=1200; 6=2400; 7=4800; 8=9600; 9=19200.\n\nw Word Length This is a number from 6 to 8, where 6=6 bits. 7=7 bits; 8=8 bits.\n\np Parity Either E,O,I, or N, where E=Even: O=Odd; I=Ignore; N=None.\n\nb Stop Bits Either 1 or 2. where 1=1 stop bit; 2=2 stop bits.\n\ns XON/XOFF Status Either E or D, where E=Enable; D=Disable.\n\nFor MDM, configuration consists of a four character string of the pattern wpbs, defined above.\n(BASIC automatically sets the baud rate to 300 baud.)\n\nR is optional; if present, it tells BASIC keep all open files opened. If omitted, BASIC closes any currently opened files before running the new program\n\nExamples\n\n1000 RUN \"PART2.BA\",R\nloads and executes the RAM file PART2.BA. keeping all open files open.\n\n100 RUN \"MDM:7EZE\"\nloads and executes the BASIC program coming in over the modem lines."
|
|
1596
|
+
},
|
|
1597
|
+
{
|
|
1598
|
+
"variant": "RUN",
|
|
1599
|
+
"description": "Execute the Current BASIC Program",
|
|
1600
|
+
"syntax": "RUN line number, R",
|
|
1601
|
+
"longDescription": "Run clears all variables and begins execution of the current program, starting at line number. line\nnumber is optional; if omitted, BASIC starts execution at the first line of the program. R. if\npresent, tells BASIC to leave currently opened files open. If not present, BASIC closes all files\nbefore executing the program.\n\nExamples\nRUN 100\nClears all variable values and starts executing the program at line 100.\nRUN,R\n\nclears all numeric and string variables and begins execution of the current program. Open files\nare left open."
|
|
1602
|
+
}
|
|
1603
|
+
]
|
|
1604
|
+
},
|
|
1605
|
+
{
|
|
1606
|
+
"name": "SAVE",
|
|
1607
|
+
"variants": [
|
|
1608
|
+
"SAVE"
|
|
1609
|
+
],
|
|
1610
|
+
"documentation": [
|
|
1611
|
+
{
|
|
1612
|
+
"variant": "SAVE",
|
|
1613
|
+
"description": "Save a BASIC Program",
|
|
1614
|
+
"syntax": "SAVE \"device:filename or configuration\",A",
|
|
1615
|
+
"longDescription": "SAVE writes the current BASIC program to the specified device. device may be RAM, CAS, COM, or MDM. filename consists of a string of 1 to 6 characters, the first of which is a letter. RAM filenames are optionally followed by the extension .BA or .DO. (if not present, BASIC adds an extension automatically)\n\nThe word RAM is also optional; if no device is named, BASIC assumes RAM. If filename already exists in RAM, BASIC writes over the old file. If device is CAS, there is no extension.\n\nIf device is COM, configuration consists of a five character string of the pattern rwpbs, where\n\n* **r** Baud Rate: This is a number from 1 to 9, where 1=75, 2=110; 3=300,\n 4=600; 5=1200; 6=2400; 7=4800; 8=9600, 9=19200\n* **w** Word Length: This is a number from 6 to 8, where 6=6 bits; 7=7 bits; 8=8 bits\n* **p** Parity: Either E, O, I, or N, where E=Even; O=Odd; I=Ignore; N=None\n* **b** Stop Bits: Either 1 or 2, where 1=1 stop bit, 2=2 stop bits.\n* **s** XON/XOFF Status: Either E or D, where E=Enable; D=Disable.\n\nIf device is MDM, configuration consists of a four character string of the pattern wpbs, defined above. (BASIC automatically sets the baud rate to 300 baud.)\n\nBASIC' requires no configuration or filename for LPT or LCD files.\n\nA is optional; if present, BASIC saves the file in ASCII format. If not present, BASIC saves the file in a compressed format.\n\n(Note: You must save BASIC files in ASCII format if you intend to merge them.) COM, MDM, LCD, and LPT all write the current program to their corresponding device in ASCII format.\n\nExamples\nSAVE \"TIMSET\"\n writes the current BASIC program to the RAM file TIMSET.BA.\nSAVE \"PART3\", A\n writes the current BASIC program to the RAM file PART3.DO The file is stored in ASCII\nformat.\nSAVE \"CAS:CLOCK\"\n writes the current program to cassette tape naming the file CLOCK (identical to the command\nCSAVE \"CLOCK\").\nSAVE \"MDM:7N1E\"\n sends the current program out the modem, using the configuration 7 bit words. no parity check.\n1 stop bit, and line enable.\nSAVE \"COM:58E2E\"\n sends the current program out the RS-232C line using the configuration of 1200 baud, 8 bit\nwords, even parity, 2 stop bits, and line enable.\nSAVE \"LPT:\"\n writes the current program on the printer (identical to LLIST).\nSAVE \"LCD:\"\n writes the current program to the Screen (identical to LIST)."
|
|
1616
|
+
}
|
|
1617
|
+
]
|
|
1618
|
+
},
|
|
1619
|
+
{
|
|
1620
|
+
"name": "SCREEN",
|
|
1621
|
+
"variants": [
|
|
1622
|
+
"SCREEN"
|
|
1623
|
+
],
|
|
1624
|
+
"documentation": [
|
|
1625
|
+
{
|
|
1626
|
+
"variant": "SCREEN",
|
|
1627
|
+
"description": "Locks/Unlocks LABEL Line",
|
|
1628
|
+
"syntax": "SCREEN on/off",
|
|
1629
|
+
"longDescription": "SCREEN locks or unlocks the bottom (LABEL) line on the Display for scrolling. on is 0.0 and off is 0.1.\n\nExample\nSCREEN 0,0\ncauses the LABEL. line to disappear and allows you to scroll with all eight lines.\nSCREEN 0,1\ncauses the LABEL line to reappear."
|
|
1630
|
+
}
|
|
1631
|
+
]
|
|
1632
|
+
},
|
|
1633
|
+
{
|
|
1634
|
+
"name": "SGN",
|
|
1635
|
+
"variants": [
|
|
1636
|
+
"SGN"
|
|
1637
|
+
],
|
|
1638
|
+
"documentation": [
|
|
1639
|
+
{
|
|
1640
|
+
"variant": "SGN",
|
|
1641
|
+
"description": "Algebraic Sign",
|
|
1642
|
+
"syntax": "SGN(numeric expression)",
|
|
1643
|
+
"longDescription": "This expression returns a -1 for negative numbers, 0 for zero, and 1 for positive numbers.\n\nExample\n\n200 TTL = 10 * SGN(CR)\nsets TTL equal to either 10, 0, or -10, depending on whether CR is positive, zero, or negative."
|
|
1644
|
+
}
|
|
1645
|
+
]
|
|
1646
|
+
},
|
|
1647
|
+
{
|
|
1648
|
+
"name": "SIN",
|
|
1649
|
+
"variants": [
|
|
1650
|
+
"SIN"
|
|
1651
|
+
],
|
|
1652
|
+
"documentation": [
|
|
1653
|
+
{
|
|
1654
|
+
"variant": "SIN",
|
|
1655
|
+
"description": "Trigonometric Sine",
|
|
1656
|
+
"syntax": "SIN (numeric expression)",
|
|
1657
|
+
"longDescription": "SIN returns (in radians) the trigonometric sine of numeric expression.\n\nExample\n\n100 Y = SIN(1.5)\nassigns Y the value 0.99749498660406."
|
|
1658
|
+
}
|
|
1659
|
+
]
|
|
1660
|
+
},
|
|
1661
|
+
{
|
|
1662
|
+
"name": "SOUND",
|
|
1663
|
+
"variants": [
|
|
1664
|
+
"SOUND",
|
|
1665
|
+
"SOUND ON/OFF"
|
|
1666
|
+
],
|
|
1667
|
+
"documentation": [
|
|
1668
|
+
{
|
|
1669
|
+
"variant": "SOUND",
|
|
1670
|
+
"description": "Output a Tone",
|
|
1671
|
+
"syntax": "SOUND pitch, length",
|
|
1672
|
+
"longDescription": "SOUND \"plays\" a given pitch for the given length. length ranges from 0 to 255. Dividing length by 50 gives the approximate length in seconds. pitch ranges from 0 to 16383, with the larger values corresponding to higher pitches. The values of pitch corresponding to musical notes are shown below.\n\nOctave\nNote 1 2 3 4 5\nG 12538 6269 3134 1567 783\nG# 11836 5918 2959 1479 739\nA 11172 5586 2793 1396 698\nA# 10544 5272 2636 1318 659\nB 9952 4976 2484 1244 622\nC 9394 4697 2348 1174 587\nC# 8866 4433 2216 1108 554\nD 8368 4184 2092 1046 523\nD# 7900 3950 1975 987 493\nE 7456 3728 1864 932 466\nF 7032 3516 1758 870 439\nF# 6642 3321 1660 830 415"
|
|
1673
|
+
},
|
|
1674
|
+
{
|
|
1675
|
+
"variant": "SOUND ON/OFF",
|
|
1676
|
+
"description": "Enable/Disable Sound",
|
|
1677
|
+
"syntax": "SOUND ON or OFF",
|
|
1678
|
+
"longDescription": "SOUND ON tells BASIC to \"beep\" when:\n1) You're loading from cassette.\n2) The Model 100 is waiting on a carrier signal from the telephone modem lines.\n\nSOUND OFF disables the \"beep\" under these circumstances. The cold start default is SOUND ON.\n\n(Note: SOUND ON and SOUND OFF do not effect any of the other sound generating commands, such as BEEP and SOUND.)"
|
|
1679
|
+
}
|
|
1680
|
+
]
|
|
1681
|
+
},
|
|
1682
|
+
{
|
|
1683
|
+
"name": "SPACE$",
|
|
1684
|
+
"variants": [
|
|
1685
|
+
"SPACE$"
|
|
1686
|
+
],
|
|
1687
|
+
"documentation": [
|
|
1688
|
+
{
|
|
1689
|
+
"variant": "SPACE$",
|
|
1690
|
+
"description": "String of Spaces",
|
|
1691
|
+
"syntax": "SPACE(length)",
|
|
1692
|
+
"longDescription": "This function returns a string of length spaces.\n\nExample\n\n100 B$ = SPACE$(20) + A$\n\nsets B$ equal to a string of 20 spaces followed by the string stored in A$."
|
|
1693
|
+
}
|
|
1694
|
+
]
|
|
1695
|
+
},
|
|
1696
|
+
{
|
|
1697
|
+
"name": "SQR",
|
|
1698
|
+
"variants": [
|
|
1699
|
+
"SQR"
|
|
1700
|
+
],
|
|
1701
|
+
"documentation": [
|
|
1702
|
+
{
|
|
1703
|
+
"variant": "SQR",
|
|
1704
|
+
"description": "Square Root",
|
|
1705
|
+
"syntax": "SQR(numeric expression)",
|
|
1706
|
+
"longDescription": "SQR returns the square root of numeric expression, numeric expression must be a positive number.\n\nExample\n\n10 C = SQR(A^2 + B^2)\n\nsets C equal to the square root of the sum of A\u00c2\u02db and B\u00c2\u02db."
|
|
1707
|
+
}
|
|
1708
|
+
]
|
|
1709
|
+
},
|
|
1710
|
+
{
|
|
1711
|
+
"name": "STEP",
|
|
1712
|
+
"variants": [
|
|
1713
|
+
"STEP"
|
|
1714
|
+
],
|
|
1715
|
+
"documentation": [
|
|
1716
|
+
{
|
|
1717
|
+
"variant": "STEP",
|
|
1718
|
+
"description": "",
|
|
1719
|
+
"syntax": "STEP",
|
|
1720
|
+
"longDescription": ""
|
|
1721
|
+
}
|
|
1722
|
+
]
|
|
1723
|
+
},
|
|
1724
|
+
{
|
|
1725
|
+
"name": "STOP",
|
|
1726
|
+
"variants": [
|
|
1727
|
+
"STOP"
|
|
1728
|
+
],
|
|
1729
|
+
"documentation": [
|
|
1730
|
+
{
|
|
1731
|
+
"variant": "STOP",
|
|
1732
|
+
"description": "Stop Execution",
|
|
1733
|
+
"syntax": "STOP",
|
|
1734
|
+
"longDescription": "STOP stops execution of a BASIC program at some point other than the physical end. STOP is primarily a \"debugging\" aid. By inserting STOP commands inside your program, you can examine or change the values of variables, and then resume execution of the program (with the CONT command) at the point following the STOP command.\n\nExample\n\n100 FOR I=1 TO 100\n110 B$(I) = MN$ + DESC$(I) + MID$(TIME$,1,2)\n111 STOP\n120 NEXT I\n\nstops execution of the program at line 111. Typing CONT will begin execution at line 120 (providing you have not altered the BASIC program)."
|
|
1735
|
+
}
|
|
1736
|
+
]
|
|
1737
|
+
},
|
|
1738
|
+
{
|
|
1739
|
+
"name": "STR$",
|
|
1740
|
+
"variants": [
|
|
1741
|
+
"STR$"
|
|
1742
|
+
],
|
|
1743
|
+
"documentation": [
|
|
1744
|
+
{
|
|
1745
|
+
"variant": "STR$",
|
|
1746
|
+
"description": "Convert a Number to a String",
|
|
1747
|
+
"syntax": "STRS(numeric expression)",
|
|
1748
|
+
"longDescription": "STRS converts numeric expression to its string represention. This function is the inverse of\nVAL.\n\nExample\nB$ = \"$\" + STR$(BAL) + \".00\"\nIf BAL contains the value 133, then this statement sets B$ equal to $133.00."
|
|
1749
|
+
}
|
|
1750
|
+
]
|
|
1751
|
+
},
|
|
1752
|
+
{
|
|
1753
|
+
"name": "STRING$",
|
|
1754
|
+
"variants": [
|
|
1755
|
+
"STRING$"
|
|
1756
|
+
],
|
|
1757
|
+
"documentation": [
|
|
1758
|
+
{
|
|
1759
|
+
"variant": "STRING$",
|
|
1760
|
+
"description": "Define a String of Characters",
|
|
1761
|
+
"syntax": "STRING (length, character)",
|
|
1762
|
+
"longDescription": "STRING returns a string of the given length composed of character. length may range from 0 to 255. character is either a string expression or numeric expression; if it is a string expression, only the first character of the string is duplicated. If it is a numeric expression, it must evaluate to a number between 0 and 255.\n\nExample\n\nPRINT STRING$(20,\"*\")\nprints a string of 20 asterisks.\n\nPRINT STRING$(40,239)\nprints a string of 40 solid blocks (239 is the ASCII code for a solid block)."
|
|
1763
|
+
}
|
|
1764
|
+
]
|
|
1765
|
+
},
|
|
1766
|
+
{
|
|
1767
|
+
"name": "TAB(",
|
|
1768
|
+
"variants": [
|
|
1769
|
+
"TAB("
|
|
1770
|
+
],
|
|
1771
|
+
"documentation": [
|
|
1772
|
+
{
|
|
1773
|
+
"variant": "TAB(",
|
|
1774
|
+
"description": "",
|
|
1775
|
+
"syntax": "TAB(",
|
|
1776
|
+
"longDescription": ""
|
|
1777
|
+
}
|
|
1778
|
+
]
|
|
1779
|
+
},
|
|
1780
|
+
{
|
|
1781
|
+
"name": "TAN",
|
|
1782
|
+
"variants": [
|
|
1783
|
+
"TAN"
|
|
1784
|
+
],
|
|
1785
|
+
"documentation": [
|
|
1786
|
+
{
|
|
1787
|
+
"variant": "TAN",
|
|
1788
|
+
"description": "Trigonometric Tangent",
|
|
1789
|
+
"syntax": "TAN (numeric expression)",
|
|
1790
|
+
"longDescription": "TAN returns the tangent of numeric expression. numeric expression must be in radians.\n\nExample\n\n10 SLOPE = TAN (THETA)\n\nassigns SLOPE the value of the tangent of THETA."
|
|
1791
|
+
}
|
|
1792
|
+
]
|
|
1793
|
+
},
|
|
1794
|
+
{
|
|
1795
|
+
"name": "THEN",
|
|
1796
|
+
"variants": [
|
|
1797
|
+
"THEN"
|
|
1798
|
+
],
|
|
1799
|
+
"documentation": [
|
|
1800
|
+
{
|
|
1801
|
+
"variant": "THEN",
|
|
1802
|
+
"description": "Used with IF to specify true branch",
|
|
1803
|
+
"syntax": "IF condition THEN commands",
|
|
1804
|
+
"longDescription": ""
|
|
1805
|
+
}
|
|
1806
|
+
]
|
|
1807
|
+
},
|
|
1808
|
+
{
|
|
1809
|
+
"name": "TIME$",
|
|
1810
|
+
"variants": [
|
|
1811
|
+
"TIME$"
|
|
1812
|
+
],
|
|
1813
|
+
"documentation": [
|
|
1814
|
+
{
|
|
1815
|
+
"variant": "TIME$",
|
|
1816
|
+
"description": "Current Time",
|
|
1817
|
+
"syntax": "TIME$",
|
|
1818
|
+
"longDescription": "TIME keeps track of the current time, in the form of a string variable. You may access it like any string variable, including resetting the time. The time string has the form \"HH:MM:SS\", where 00 \u00e2\u2030\u00a4 HH \u00e2\u2030\u00a4 23, 00 \u00e2\u2030\u00a4 MM \u00e2\u2030\u00a4 59, and 00 \u00e2\u2030\u00a4 SS \u00e2\u2030\u00a4 59. BASIC automatically updates TIMES, including changing from 23:59:59 to 00:00:00.\n\n(Note: BASIC allows values up to 29 for HH. However, such values have no meaning and prevent TIME from ever returning to 00:00:00.)\n\nExamples\n\nPRINT TIME$\nprints the current time.\n\nTIME$=\"10:00:00\"\nsets the time to 10:00 AM."
|
|
1819
|
+
}
|
|
1820
|
+
]
|
|
1821
|
+
},
|
|
1822
|
+
{
|
|
1823
|
+
"name": "TO",
|
|
1824
|
+
"variants": [
|
|
1825
|
+
"TO"
|
|
1826
|
+
],
|
|
1827
|
+
"documentation": [
|
|
1828
|
+
{
|
|
1829
|
+
"variant": "TO",
|
|
1830
|
+
"description": "",
|
|
1831
|
+
"syntax": "TO",
|
|
1832
|
+
"longDescription": ""
|
|
1833
|
+
}
|
|
1834
|
+
]
|
|
1835
|
+
},
|
|
1836
|
+
{
|
|
1837
|
+
"name": "USING",
|
|
1838
|
+
"variants": [
|
|
1839
|
+
"USING"
|
|
1840
|
+
],
|
|
1841
|
+
"documentation": [
|
|
1842
|
+
{
|
|
1843
|
+
"variant": "USING",
|
|
1844
|
+
"description": "",
|
|
1845
|
+
"syntax": "USING",
|
|
1846
|
+
"longDescription": ""
|
|
1847
|
+
}
|
|
1848
|
+
]
|
|
1849
|
+
},
|
|
1850
|
+
{
|
|
1851
|
+
"name": "VAL",
|
|
1852
|
+
"variants": [
|
|
1853
|
+
"VAL"
|
|
1854
|
+
],
|
|
1855
|
+
"documentation": [
|
|
1856
|
+
{
|
|
1857
|
+
"variant": "VAL",
|
|
1858
|
+
"description": "Convert Strings To Numbers",
|
|
1859
|
+
"syntax": "VAL (string expression)",
|
|
1860
|
+
"longDescription": "VAL converts string expression to a numeric representation of the string. If string expression contains non-numeric characters, VAL returns only the value of the leading number, if any. VAL is the inverse of the function STR$.\n\nExamples\n\n5 B$ = \"100.44824\"\n10 A = VAL(B$)\n\nsets A equal to 100.44824.\n\n5 B$ = \"no balance\"\n10 A = VAL(B$)\n\nsets A equal to 0.\n\n5 B$ = \"3.00313354E33\"\n10 A = VAL(B$)\n\nsets A equal to 3.00313354 x 10^33."
|
|
1861
|
+
}
|
|
1862
|
+
]
|
|
1863
|
+
},
|
|
1864
|
+
{
|
|
1865
|
+
"name": "VARPTR",
|
|
1866
|
+
"variants": [
|
|
1867
|
+
"VARPTR"
|
|
1868
|
+
],
|
|
1869
|
+
"documentation": [
|
|
1870
|
+
{
|
|
1871
|
+
"variant": "VARPTR",
|
|
1872
|
+
"description": "Get Address of a Variable",
|
|
1873
|
+
"syntax": "VARPTR (variable name)",
|
|
1874
|
+
"longDescription": "VARPTR returns the memory address of variable name. If you haven't yet used variable name,\nthen VARPTR causes an error condition. This function may be useful in conjunction with PEEK\nand POKE, as well as CALL. Note that the returning address is an integer value, expressed in\ndecimal form, hence memory addresses over 32767 return negative values.\n\nExample\nLINK(I) = VARPTR (B$)\nsets LINK(I) equal to the memory address of B$."
|
|
1875
|
+
}
|
|
1876
|
+
]
|
|
1877
|
+
},
|
|
1878
|
+
{
|
|
1879
|
+
"name": "WIDTH",
|
|
1880
|
+
"variants": [
|
|
1881
|
+
"WIDTH"
|
|
1882
|
+
],
|
|
1883
|
+
"documentation": [
|
|
1884
|
+
{
|
|
1885
|
+
"variant": "WIDTH",
|
|
1886
|
+
"description": "",
|
|
1887
|
+
"syntax": "WIDTH",
|
|
1888
|
+
"longDescription": ""
|
|
1889
|
+
}
|
|
1890
|
+
]
|
|
1891
|
+
},
|
|
1892
|
+
{
|
|
1893
|
+
"name": "XOR",
|
|
1894
|
+
"variants": [
|
|
1895
|
+
"XOR"
|
|
1896
|
+
],
|
|
1897
|
+
"documentation": [
|
|
1898
|
+
{
|
|
1899
|
+
"variant": "XOR",
|
|
1900
|
+
"description": "Logical XOR",
|
|
1901
|
+
"syntax": "expression XOR expression",
|
|
1902
|
+
"longDescription": ""
|
|
1903
|
+
}
|
|
1904
|
+
]
|
|
1905
|
+
},
|
|
1906
|
+
{
|
|
1907
|
+
"name": "\\",
|
|
1908
|
+
"variants": [
|
|
1909
|
+
"\\"
|
|
1910
|
+
],
|
|
1911
|
+
"documentation": [
|
|
1912
|
+
{
|
|
1913
|
+
"variant": "\\",
|
|
1914
|
+
"description": "",
|
|
1915
|
+
"syntax": "\\",
|
|
1916
|
+
"longDescription": ""
|
|
1917
|
+
}
|
|
1918
|
+
]
|
|
1919
|
+
},
|
|
1920
|
+
{
|
|
1921
|
+
"name": "^",
|
|
1922
|
+
"variants": [
|
|
1923
|
+
"^"
|
|
1924
|
+
],
|
|
1925
|
+
"documentation": [
|
|
1926
|
+
{
|
|
1927
|
+
"variant": "^",
|
|
1928
|
+
"description": "",
|
|
1929
|
+
"syntax": "^",
|
|
1930
|
+
"longDescription": ""
|
|
1931
|
+
}
|
|
1932
|
+
]
|
|
1933
|
+
}
|
|
1934
|
+
]
|
|
1935
|
+
}
|