ChipMaster's bwBASIC This also includes history going back to v2.10. *WARN* some binary files might have been corrupted by CRLF.
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
 
 
 

1065 lines
45 KiB

  1. ============================================================
  2. GENERAL
  3. ============================================================
  4. OPTION VERSION "MARK-I"
  5. REM INTERNAL ID: G65
  6. REM DESCRIPTION: GE 265 Mainframe BASIC
  7. REM REFERENCE: BASIC LANGUAGE REFERENCE MANUAL
  8. REM by Time-Sharing Service, Information Service Department, General Electric
  9. REM (c) 1965, Trustees of Dartmouth College
  10. REM http://www.bitsavers.org/pdf/ge/MarkI_Timesharing/
  11. REM 202026A_BASIC_Language_Reference_Manual_Jan1967.pdf
  12. REM
  13. OPTION STRICT OFF
  14. OPTION ANGLE RADIANS
  15. OPTION BUGS OFF
  16. OPTION LABELS OFF
  17. OPTION COMPARE BINARY
  18. OPTION COVERAGE OFF
  19. OPTION TRACE OFF
  20. OPTION ERROR GOTO
  21. OPTION IMPLICIT
  22. OPTION BASE 0
  23. OPTION RECLEN 128
  24. OPTION DATE "%m/%d/%y"
  25. OPTION TIME "%H:%M"
  26. OPTION PUNCT STRING "$"
  27. OPTION PUNCT DOUBLE "#"
  28. OPTION PUNCT SINGLE "!"
  29. OPTION PUNCT CURRENCY " "
  30. OPTION PUNCT LONG "&"
  31. OPTION PUNCT INTEGER "%"
  32. OPTION PUNCT BYTE " "
  33. OPTION PUNCT QUOTE """
  34. OPTION PUNCT COMMENT " "
  35. OPTION PUNCT STATEMENT " "
  36. OPTION PUNCT PRINT " "
  37. OPTION PUNCT INPUT " "
  38. OPTION PUNCT IMAGE ":"
  39. OPTION PUNCT LPAREN "("
  40. OPTION PUNCT RPAREN ")"
  41. OPTION PUNCT FILENUM "#"
  42. OPTION PUNCT AT " "
  43. OPTION USING DIGIT "#"
  44. OPTION USING COMMA ","
  45. OPTION USING PERIOD "."
  46. OPTION USING PLUS "+"
  47. OPTION USING MINUS "-"
  48. OPTION USING EXRAD "^"
  49. OPTION USING DOLLAR "$"
  50. OPTION USING FILLER "*"
  51. OPTION USING LITERAL "_"
  52. OPTION USING FIRST "!"
  53. OPTION USING ALL "&"
  54. OPTION USING LENGTH "%"
  55. ============================================================
  56. COMMANDS
  57. ============================================================
  58. ------------------------------------------------------------
  59. SYNTAX: APPEND # filenumber
  60. DESCRIPTION: Positions filenumber at EOF and sets the file
  61. to writing; filenumber <= 0 is ignored.
  62. ------------------------------------------------------------
  63. SYNTAX: BACKSPACE # X
  64. DESCRIPTION: Points the file to the previous item.
  65. ------------------------------------------------------------
  66. SYNTAX: BYE
  67. DESCRIPTION: Exits to the operating system.
  68. ------------------------------------------------------------
  69. SYNTAX: CHAIN filename$ [, linenumber]
  70. DESCRIPTION: Load and execute another BASIC program,
  71. without clearing common variables. For
  72. System/370, the syntax is CHAIN
  73. filename$,parameter$.
  74. ------------------------------------------------------------
  75. SYNTAX: CHANGE A$ TO X
  76. DESCRIPTION: Changes a string to a numeric array.
  77. ------------------------------------------------------------
  78. SYNTAX: CHANGE X TO A$
  79. DESCRIPTION: Changes a numeric array to a string.
  80. ------------------------------------------------------------
  81. SYNTAX: DATA constant [, ...]
  82. DESCRIPTION: Stores numeric and string constants to be
  83. accessed by READ.
  84. ------------------------------------------------------------
  85. SYNTAX: DEF FNname[( arg [,...] )] = value
  86. DESCRIPTION: Defines a single-line function. Single-line
  87. functions require an equal sign.
  88. ------------------------------------------------------------
  89. SYNTAX: DELIMIT # X, A$
  90. DESCRIPTION: Sets the delimiter for READ # and WRITE #.
  91. ------------------------------------------------------------
  92. SYNTAX: DIM [# filenum,] variable([ lower TO ] upper)
  93. DESCRIPTION: Declares variables and specifies the
  94. dimensions of array variables. For array
  95. variables, if the lower bound is not
  96. provided, then the OPTION BASE value is used.
  97. If filenum is provided, then the variable is
  98. virtual.
  99. ------------------------------------------------------------
  100. SYNTAX: EDIT
  101. DESCRIPTION: implementation defined.
  102. ------------------------------------------------------------
  103. SYNTAX: END
  104. DESCRIPTION: Terminates program execution. If the BASIC
  105. program was executed from the operating
  106. system level, then control returns to the
  107. operating system, oterwise control reuturns
  108. to the BASIC prompt.
  109. ------------------------------------------------------------
  110. SYNTAX: FILE # X, A$
  111. DESCRIPTION: If A$ is "*" then closes file # X. If A$ is
  112. not "*" then opens the file named A$ in READ
  113. mode.
  114. ------------------------------------------------------------
  115. SYNTAX: FILES A$[, ...]
  116. DESCRIPTION: If A$ is not "*" opens the file named A$ in
  117. READ mode. The first filename of the first
  118. FILES command is assocated with file number
  119. 1. Note that multiple FILES commands
  120. accumulate.
  121. ------------------------------------------------------------
  122. SYNTAX: FOR variable = start TO finish [STEP
  123. increment]
  124. DESCRIPTION: Top of a FOR - NEXT structure. The loop will
  125. continue a fixed number of times, which is
  126. determined by the values of start, finish,
  127. and increment.
  128. ------------------------------------------------------------
  129. SYNTAX: GO
  130. DESCRIPTION: Syntax Error.
  131. ------------------------------------------------------------
  132. SYNTAX: GO SUB line
  133. DESCRIPTION: Initiates a subroutine call to the line
  134. specified. The subroutine must end with
  135. RETURN. The line may be a number or a label.
  136. ------------------------------------------------------------
  137. SYNTAX: GO TO line
  138. DESCRIPTION: Branches program execution to the specified
  139. line. The line may be a number or a label.
  140. ------------------------------------------------------------
  141. SYNTAX: GOODBYE
  142. DESCRIPTION: Exits to the operating system.
  143. ------------------------------------------------------------
  144. SYNTAX: GOSUB line
  145. DESCRIPTION: Initiates a subroutine call to the line
  146. specified. The subroutine must end with
  147. RETURN. The line may be a number or a label.
  148. ------------------------------------------------------------
  149. SYNTAX: GOTO line
  150. DESCRIPTION: Branches program execution to the specified
  151. line. The line may be a number or a label.
  152. ------------------------------------------------------------
  153. SYNTAX: IF value THEN line1 [ELSE line2]
  154. DESCRIPTION: Single line standard IF command. If the value
  155. is non-zero, then branh to line1. If the
  156. value is zero and ELSE is provided, then
  157. branch to line2. Otherwise continue to the
  158. next line. LABELS are not allowed.
  159. ------------------------------------------------------------
  160. SYNTAX: IF END # filenum THEN line1 [ELSE line2]
  161. DESCRIPTION: Single line standard IF command. If the file
  162. is at EOF , then branch to line1. If the
  163. file is not at EOF and ELSE is provided, then
  164. branch to line2. Otherwise continue to the
  165. next line. LABELS are not allowed.
  166. ------------------------------------------------------------
  167. SYNTAX: IF MORE # filenum THEN line1 [ELSE line2]
  168. DESCRIPTION: Single line standard IF command. If the file
  169. is not at EOF , then branch to line1. If the
  170. file is at EOF and ELSE is provided, then
  171. branch to line2. Otherwise continue to the
  172. next line. LABELS are not allowed.
  173. ------------------------------------------------------------
  174. SYNTAX: INPUT "prompt string" , variable [, ...]
  175. DESCRIPTION: Reads input from the terminal after displaying
  176. a prompt.
  177. ------------------------------------------------------------
  178. SYNTAX: INPUT # filenum , variable [, ...]s
  179. DESCRIPTION: Reads input from the file specified by
  180. filenum.
  181. ------------------------------------------------------------
  182. SYNTAX: INPUT variable [, ...]
  183. DESCRIPTION: Reads input from the terminal.
  184. ------------------------------------------------------------
  185. SYNTAX: [LET] variable [, ...] = value
  186. DESCRIPTION: Assigns the value to the variable. The LET
  187. keyword is optional.
  188. ------------------------------------------------------------
  189. SYNTAX: LIST line1 [- line2]
  190. DESCRIPTION: Lists BASIC program lines from line1 to line2
  191. to the console on stdout.
  192. ------------------------------------------------------------
  193. SYNTAX: LISTNH line1 [- line2]
  194. DESCRIPTION: Lists BASIC program lines from line1 to line2
  195. to the console on stdout.
  196. ------------------------------------------------------------
  197. SYNTAX: LOAD [filename$]
  198. DESCRIPTION: Loads an ASCII BASIC program into memory.
  199. ------------------------------------------------------------
  200. SYNTAX: MAINTAINER
  201. DESCRIPTION: This command is reserved for use by the
  202. Bywater BASIC maintainer. It is not for the
  203. BASIC programmer.
  204. ------------------------------------------------------------
  205. SYNTAX: MAINTAINER CMDS
  206. DESCRIPTION: Syntax Error.
  207. ------------------------------------------------------------
  208. SYNTAX: MAINTAINER CMDS HTML
  209. DESCRIPTION: Dump COMMAND vs VERSION as HTML table
  210. ------------------------------------------------------------
  211. SYNTAX: MAINTAINER CMDS ID
  212. DESCRIPTION: Dump COMMAND #define.
  213. ------------------------------------------------------------
  214. SYNTAX: MAINTAINER CMDS MANUAL
  215. DESCRIPTION: Dump COMMAND manual.
  216. ------------------------------------------------------------
  217. SYNTAX: MAINTAINER CMDS_SWITCH
  218. DESCRIPTION: Dump COMMAND switch.
  219. ------------------------------------------------------------
  220. SYNTAX: MAINTAINER CMDS TABLE
  221. DESCRIPTION: Dump COMMAND table.
  222. ------------------------------------------------------------
  223. SYNTAX: MAINTAINER DEBUG
  224. DESCRIPTION: Syntax Error.
  225. ------------------------------------------------------------
  226. SYNTAX: MAINTAINER DEBUG OFF
  227. DESCRIPTION: Disable degug tracing.
  228. ------------------------------------------------------------
  229. SYNTAX: MAINTAINER DEBUG ON
  230. DESCRIPTION: Enable degug tracing.
  231. ------------------------------------------------------------
  232. SYNTAX: MAINTAINER FNCS
  233. DESCRIPTION: Syntax Error.
  234. ------------------------------------------------------------
  235. SYNTAX: MAINTAINER FNCS HTML
  236. DESCRIPTION: Dump FUNCTION vs VERSION as HTML table.
  237. ------------------------------------------------------------
  238. SYNTAX: MAINTAINER FNCS ID
  239. DESCRIPTION: Dump FUNCTION #define.
  240. ------------------------------------------------------------
  241. SYNTAX: MAINTAINER FNCS MANUAL
  242. DESCRIPTION: Dump FUNCTION manual.
  243. ------------------------------------------------------------
  244. SYNTAX: MAINTAINER FNCS SWITCH
  245. DESCRIPTION: Dump FUNCTION switch.
  246. ------------------------------------------------------------
  247. SYNTAX: MAINTAINER FNCS TABLE
  248. DESCRIPTION: Dump FUNCTION table.
  249. ------------------------------------------------------------
  250. SYNTAX: MAINTAINER MANUAL
  251. DESCRIPTION: Dump manual for the currently selected OPTION
  252. VERSION.
  253. ------------------------------------------------------------
  254. SYNTAX: MAINTAINER STACK
  255. DESCRIPTION: Dump the BASIC stack.
  256. ------------------------------------------------------------
  257. SYNTAX: MARGIN # filenumber, width
  258. DESCRIPTION: Sets the file margin for writing; filenumber
  259. <= 0 is ignored.
  260. ------------------------------------------------------------
  261. SYNTAX: MAT arrayname = value
  262. DESCRIPTION: Matrix operations:
  263. MAT A = CON
  264. MAT A = IDN
  265. MAT A = ZER
  266. MAT A = INV B
  267. MAT A = TRN B
  268. MAT A = (k) * B
  269. MAT A = B
  270. MAT A = B + C
  271. MAT A = B - C
  272. MAT A = B * C
  273. ------------------------------------------------------------
  274. SYNTAX: MAT GET filename$, arrayname
  275. DESCRIPTION: Matrix get.
  276. ------------------------------------------------------------
  277. SYNTAX: MAT INPUT arrayname
  278. DESCRIPTION: Matrix input.
  279. ------------------------------------------------------------
  280. SYNTAX: MAT PRINT arrayname
  281. DESCRIPTION: Matrix print.
  282. ------------------------------------------------------------
  283. SYNTAX: MAT PUT filename$, arrayname
  284. DESCRIPTION: Matrix put.
  285. ------------------------------------------------------------
  286. SYNTAX: MAT READ arrayname
  287. DESCRIPTION: Matrix read.
  288. ------------------------------------------------------------
  289. SYNTAX: MAT WRITE arrayname
  290. DESCRIPTION: Matrix write.
  291. ------------------------------------------------------------
  292. SYNTAX: NEW
  293. DESCRIPTION: Deletes the program in memory and clears all
  294. variables.
  295. ------------------------------------------------------------
  296. SYNTAX: NEXT [variable]
  297. DESCRIPTION: The bottom line of a FOR - NEXT structure.
  298. ------------------------------------------------------------
  299. SYNTAX: OF
  300. DESCRIPTION: Syntax Error.
  301. ------------------------------------------------------------
  302. SYNTAX: OLD [filename$]
  303. DESCRIPTION: Loads an ASCII BASIC program into memory.
  304. ------------------------------------------------------------
  305. SYNTAX: ON value GOSUB line [, ...]
  306. DESCRIPTION: Calls based on the rounded value.
  307. ------------------------------------------------------------
  308. SYNTAX: ON value GOTO line [, ...]
  309. DESCRIPTION: Branches based on the rounded value.
  310. ------------------------------------------------------------
  311. SYNTAX: OPTION
  312. DESCRIPTION: Syntax Error.
  313. ------------------------------------------------------------
  314. SYNTAX: OPTION ANGLE
  315. DESCRIPTION: Syntax Error.
  316. ------------------------------------------------------------
  317. SYNTAX: OPTION ANGLE DEGREES
  318. DESCRIPTION: Configures these math functions to accept and
  319. return angles in degrees: ACOS, ACS, ANGLE,
  320. ARCSIN, ASIN, ASN, ARCTAN, ATN, ATAN, COS,
  321. COT, CSC, SEC, SIN and TAN.
  322. ------------------------------------------------------------
  323. SYNTAX: OPTION ANGLE GRADIANS
  324. DESCRIPTION: Configures these math functions to accept and
  325. return angles in gradians: ACOS, ANGLE,
  326. ASIN, ASN, ATN, ATAN, COS, COT, CSC, SEC, SIN
  327. and TAN.
  328. ------------------------------------------------------------
  329. SYNTAX: OPTION ANGLE RADIANS
  330. DESCRIPTION: Configures these math functions to accept and
  331. return angles in radians: ACOS, ANGLE, ASIN,
  332. ASN, ATN, ATAN, COS, COT, CSC, SEC, SIN and
  333. TAN.
  334. ------------------------------------------------------------
  335. SYNTAX: OPTION ARITHMETIC
  336. DESCRIPTION: Syntax Error.
  337. ------------------------------------------------------------
  338. SYNTAX: OPTION ARITHMETIC DECIMAL
  339. DESCRIPTION: Currently has no effect.
  340. ------------------------------------------------------------
  341. SYNTAX: OPTION ARITHMETIC FIXED
  342. DESCRIPTION: Currently has no effect.
  343. ------------------------------------------------------------
  344. SYNTAX: OPTION ARITHMETIC NATIVE
  345. DESCRIPTION: Currently has no effect.
  346. ------------------------------------------------------------
  347. SYNTAX: OPTION BASE integer
  348. DESCRIPTION: Sets the default lowest array subscript.
  349. ------------------------------------------------------------
  350. SYNTAX: OPTION BUGS
  351. DESCRIPTION: Syntax Error.
  352. ------------------------------------------------------------
  353. SYNTAX: OPTION BUGS BOOLEAN
  354. DESCRIPTION: Boolean results are 1 or 0 instead of bitwise.
  355. ------------------------------------------------------------
  356. SYNTAX: OPTION BUGS OFF
  357. DESCRIPTION: Disables bugs commonly found in many BASIC
  358. dialects.
  359. ------------------------------------------------------------
  360. SYNTAX: OPTION BUGS ON
  361. DESCRIPTION: Enables bugs commonly found in many BASIC
  362. dialects.
  363. ------------------------------------------------------------
  364. SYNTAX: OPTION COMPARE
  365. DESCRIPTION: Syntax Error.
  366. ------------------------------------------------------------
  367. SYNTAX: OPTION COMPARE BINARY
  368. DESCRIPTION: Causes string comparisons to be
  369. case-sensitive.
  370. ------------------------------------------------------------
  371. SYNTAX: OPTION COMPARE DATABASE
  372. DESCRIPTION: Causes string comparisons to be
  373. case-insensitive.
  374. ------------------------------------------------------------
  375. SYNTAX: OPTION COMPARE TEXT
  376. DESCRIPTION: Causes string comparisons to be
  377. case-insensitive.
  378. ------------------------------------------------------------
  379. SYNTAX: OPTION COVERAGE
  380. DESCRIPTION: Syntax Error.
  381. ------------------------------------------------------------
  382. SYNTAX: OPTION COVERAGE OFF
  383. DESCRIPTION: Disables BASIC code coverage recording,
  384. displayed using the LIST command.
  385. ------------------------------------------------------------
  386. SYNTAX: OPTION COVERAGE ON
  387. DESCRIPTION: Enables BASIC code coverage recording,
  388. displayed using the LIST command.
  389. ------------------------------------------------------------
  390. SYNTAX: OPTION DATE format$
  391. DESCRIPTION: Sets the date format string used by C
  392. strftime() for DATE$.
  393. ------------------------------------------------------------
  394. SYNTAX: OPTION DIGITS integer
  395. DESCRIPTION: Sets the number of significant digits for
  396. PRINT. Setting the value to zero restores
  397. the default.
  398. ------------------------------------------------------------
  399. SYNTAX: OPTION DISABLE
  400. DESCRIPTION: Syntax Error.
  401. ------------------------------------------------------------
  402. SYNTAX: OPTION DISABLE COMMAND name$
  403. DESCRIPTION: Disables the specified BASIC command.
  404. ------------------------------------------------------------
  405. SYNTAX: OPTION DISABLE FUNCTION name$
  406. DESCRIPTION: Disables the specified BASIC function.
  407. ------------------------------------------------------------
  408. SYNTAX: OPTION DISABLE OPERATOR name$
  409. DESCRIPTION: Disables the specified BASIC operator.
  410. ------------------------------------------------------------
  411. SYNTAX: OPTION EDIT string$
  412. DESCRIPTION: Sets the program name used by the EDIT
  413. command.
  414. ------------------------------------------------------------
  415. SYNTAX: OPTION ENABLE
  416. DESCRIPTION: Syntax Error.
  417. ------------------------------------------------------------
  418. SYNTAX: OPTION ENABLE COMMAND name$
  419. DESCRIPTION: Enables the specified BASIC command.
  420. ------------------------------------------------------------
  421. SYNTAX: OPTION ENABLE FUNCTION name$
  422. DESCRIPTION: Enables the specified BASIC function.
  423. ------------------------------------------------------------
  424. SYNTAX: OPTION ENABLE OPERATOR name$
  425. DESCRIPTION: Enables the specified BASIC operator.
  426. ------------------------------------------------------------
  427. SYNTAX: OPTION ERROR
  428. DESCRIPTION: Syntax Error.
  429. ------------------------------------------------------------
  430. SYNTAX: OPTION ERROR GOSUB
  431. DESCRIPTION: When an error occurs, GOSUB to the error
  432. handler. The error handler exits with
  433. RETURN.
  434. ------------------------------------------------------------
  435. SYNTAX: OPTION ERROR GOTO
  436. DESCRIPTION: When an error occurs, GOTO to the error
  437. handler. The error handler exits with
  438. RESUME.
  439. ------------------------------------------------------------
  440. SYNTAX: OPTION EXPLICIT
  441. DESCRIPTION: All variables must be declared using DIM.
  442. ------------------------------------------------------------
  443. SYNTAX: OPTION EXTENSION string$
  444. DESCRIPTION: Sets the BASIC filename extension, commonly
  445. ".bas".
  446. ------------------------------------------------------------
  447. SYNTAX: OPTION FILES string$
  448. DESCRIPTION: Sets the program name used by the FILES
  449. command.
  450. ------------------------------------------------------------
  451. SYNTAX: OPTION IMPLICIT
  452. DESCRIPTION: Variables need not be declared using DIM,
  453. provided arrays have no more that 10
  454. elements. This is the opposite of OPTION
  455. EXPLICIT, and is the default for all versions
  456. of BASIC.
  457. ------------------------------------------------------------
  458. SYNTAX: OPTION INDENT integer
  459. DESCRIPTION: Sets indention level for LIST. Zero means no
  460. indention. Default is 2.
  461. ------------------------------------------------------------
  462. SYNTAX: OPTION LABELS
  463. DESCRIPTION: Syntax Error.
  464. ------------------------------------------------------------
  465. SYNTAX: OPTION LABELS OFF
  466. DESCRIPTION: Disables text labels.
  467. ------------------------------------------------------------
  468. SYNTAX: OPTION LABELS ON
  469. DESCRIPTION: Enables text labels.
  470. ------------------------------------------------------------
  471. SYNTAX: OPTION PROMPT string$
  472. DESCRIPTION: Sets the BASIC prompt.
  473. ------------------------------------------------------------
  474. SYNTAX: OPTION PUNCT
  475. DESCRIPTION: Syntax Error.
  476. ------------------------------------------------------------
  477. SYNTAX: OPTION PUNCT AT char$
  478. DESCRIPTION: Sets the PRINT AT character, commonly "@".
  479. ------------------------------------------------------------
  480. SYNTAX: OPTION PUNCT BYTE char$
  481. DESCRIPTION: Sets the suffix character that indicates a
  482. variable is of type BYTE, commonly "~".
  483. ------------------------------------------------------------
  484. SYNTAX: OPTION PUNCT COMMENT char$
  485. DESCRIPTION: Sets the shortcut COMMENT character.
  486. ------------------------------------------------------------
  487. SYNTAX: OPTION PUNCT CURRENCY char$
  488. DESCRIPTION: Sets the suffix character that indicates a
  489. variable is of type CURRENCY, commonly "@".
  490. ------------------------------------------------------------
  491. SYNTAX: OPTION PUNCT DOUBLE char$
  492. DESCRIPTION: Sets the suffix character that indicates a
  493. variable is of type DOUBLE, commonly "#".
  494. ------------------------------------------------------------
  495. SYNTAX: OPTION PUNCT FILENUM char$
  496. DESCRIPTION: Sets the FILE NUMBER prefix character,
  497. commonly "#".
  498. ------------------------------------------------------------
  499. SYNTAX: OPTION PUNCT IMAGE char$
  500. DESCRIPTION: Sets the shortcut IMAGE character, commonly
  501. ":".
  502. ------------------------------------------------------------
  503. SYNTAX: OPTION PUNCT INPUT char$
  504. DESCRIPTION: Sets the shortcut INPUT character, commonly
  505. "!".
  506. ------------------------------------------------------------
  507. SYNTAX: OPTION PUNCT INTEGER char$
  508. DESCRIPTION: Sets the suffix character that indicates a
  509. variable is of type INTEGER, commonly "%".
  510. ------------------------------------------------------------
  511. SYNTAX: OPTION PUNCT LONG char$
  512. DESCRIPTION: Sets the suffix character that indicates a
  513. variable is of type LONG, commonly "&".
  514. ------------------------------------------------------------
  515. SYNTAX: OPTION PUNCT LPAREN char$
  516. DESCRIPTION: Sets the LEFT PARENTHESIS character, commonly
  517. "(".
  518. ------------------------------------------------------------
  519. SYNTAX: OPTION PUNCT_PRINT char$
  520. DESCRIPTION: Sets the shortcut PRINT character, commonly
  521. "?".
  522. ------------------------------------------------------------
  523. SYNTAX: OPTION PUNCT QUOTE char$
  524. DESCRIPTION: Sets the QUOTE character, commonly """
  525. ------------------------------------------------------------
  526. SYNTAX: OPTION PUNCT RPAREN char$
  527. DESCRIPTION: Sets the RIGHT PARENTHESIS character, commonly
  528. ")".
  529. ------------------------------------------------------------
  530. SYNTAX: OPTION PUNCT SINGLE char$
  531. DESCRIPTION: Sets the suffix character that indicates a
  532. variable is of type SINGLE, commonly "!".
  533. ------------------------------------------------------------
  534. SYNTAX: OPTION PUNCT STATEMENT char$
  535. DESCRIPTION: Sets the statement seperator character,
  536. commonly ":".
  537. ------------------------------------------------------------
  538. SYNTAX: OPTION PUNCT STRING char$
  539. DESCRIPTION: Sets the suffix character that indicates a
  540. variable is of type STRING, commonly "$".
  541. ------------------------------------------------------------
  542. SYNTAX: OPTION RECLEN integer
  543. DESCRIPTION: Sets the default RANDOM record length.
  544. ------------------------------------------------------------
  545. SYNTAX: OPTION RENUM string$
  546. DESCRIPTION: Sets the program name used by the RENUM
  547. command.
  548. ------------------------------------------------------------
  549. SYNTAX: OPTION ROUND
  550. DESCRIPTION: Syntax Error.
  551. ------------------------------------------------------------
  552. SYNTAX: OPTION ROUND BANK
  553. DESCRIPTION: Round using the Banker rule.
  554. ------------------------------------------------------------
  555. SYNTAX: OPTION ROUND MATH
  556. DESCRIPTION: Round using mathematical rules.
  557. ------------------------------------------------------------
  558. SYNTAX: OPTION ROUND TRUNCATE
  559. DESCRIPTION: Round using truncation.
  560. ------------------------------------------------------------
  561. SYNTAX: OPTION SCALE integer
  562. DESCRIPTION: Sets the number of digits to round after the
  563. decimal point for PRINT. Setting the value
  564. to zero disables rounding.
  565. ------------------------------------------------------------
  566. SYNTAX: OPTION SLEEP double
  567. DESCRIPTION: Sets multiplier for SLEEP and WAIT. Zero
  568. means no waiting. Default is 1.
  569. ------------------------------------------------------------
  570. SYNTAX: OPTION STDERR filename$
  571. DESCRIPTION: Sets the file used for STDERR, which is used
  572. by LPRINT commands.
  573. ------------------------------------------------------------
  574. SYNTAX: OPTION STDIN filename$
  575. DESCRIPTION: Sets the file used for STDIN, which is used by
  576. INPUT commands.
  577. ------------------------------------------------------------
  578. SYNTAX: OPTION STDOUT filename$
  579. DESCRIPTION: Sets the file used for STDOUT, which is used
  580. by PRINT commands.
  581. ------------------------------------------------------------
  582. SYNTAX: OPTION STRICT
  583. DESCRIPTION: Syntax Error.
  584. ------------------------------------------------------------
  585. SYNTAX: OPTION STRICT OFF
  586. DESCRIPTION: Disables checking for implicit array creation
  587. without using the DIM command.
  588. ------------------------------------------------------------
  589. SYNTAX: OPTION STRICT ON
  590. DESCRIPTION: Enables checking for implicit array creation
  591. without using the DIM command.
  592. ------------------------------------------------------------
  593. SYNTAX: OPTION TERMINAL
  594. DESCRIPTION: Syntax Error.
  595. ------------------------------------------------------------
  596. SYNTAX: OPTION TERMINAL ADM
  597. DESCRIPTION: Enables ADM-3A terminal control codes for CLS,
  598. COLOR, and LOCATE.
  599. ------------------------------------------------------------
  600. SYNTAX: OPTION TERMINAL ANSI
  601. DESCRIPTION: Enables ANSI terminal control codes for CLS,
  602. COLOR, and LOCATE.
  603. ------------------------------------------------------------
  604. SYNTAX: OPTION TERMINAL NONE
  605. DESCRIPTION: Disables terminal control codes for CLS,
  606. COLOR, and LOCATE.
  607. ------------------------------------------------------------
  608. SYNTAX: OPTION TIME format$
  609. DESCRIPTION: Sets the time format string used by C
  610. strftime() for TIME$.
  611. ------------------------------------------------------------
  612. SYNTAX: OPTION TRACE
  613. DESCRIPTION: Syntax Error.
  614. ------------------------------------------------------------
  615. SYNTAX: OPTION TRACE OFF
  616. DESCRIPTION: Disables displaying a stack trace when an
  617. ERROR occurs.
  618. ------------------------------------------------------------
  619. SYNTAX: OPTION TRACE ON
  620. DESCRIPTION: Enables displaying a stack trace when an ERROR
  621. occurs.
  622. ------------------------------------------------------------
  623. SYNTAX: OPTION USING
  624. DESCRIPTION: Syntax Error.
  625. ------------------------------------------------------------
  626. SYNTAX: OPTION USING ALL char$
  627. DESCRIPTION: Specifies the magic ALL character for the
  628. PRINT USING command. A common value is "&".
  629. ------------------------------------------------------------
  630. SYNTAX: OPTION USING COMMA char$
  631. DESCRIPTION: Specifies the magic COMMA character for the
  632. PRINT USING command. A common value is ",".
  633. ------------------------------------------------------------
  634. SYNTAX: OPTION USING DIGIT char$
  635. DESCRIPTION: Specifies the magic DIGIT character for the
  636. PRINT USING command. A common value is "#".
  637. ------------------------------------------------------------
  638. SYNTAX: OPTION USING DOLLAR char$
  639. DESCRIPTION: Specifies the magic DOLLAR character for the
  640. PRINT USING command. A common value is "$".
  641. ------------------------------------------------------------
  642. SYNTAX: OPTION USING EXRAD char$
  643. DESCRIPTION: Specifies the magic EXRAD character for the
  644. PRINT USING command. A common value is "^".
  645. ------------------------------------------------------------
  646. SYNTAX: OPTION USING FILLER char$
  647. DESCRIPTION: Specifies the magic FILLER character for the
  648. PRINT USING command. A common value is "*".
  649. ------------------------------------------------------------
  650. SYNTAX: OPTION USING FIRST char$
  651. DESCRIPTION: Specifies the magic FIRST character for the
  652. PRINT USING command. A common value is "!".
  653. ------------------------------------------------------------
  654. SYNTAX: OPTION USING LENGTH char$
  655. DESCRIPTION: Specifies the magic LENGTH character for the
  656. PRINT USING command. A common value is "\".
  657. ------------------------------------------------------------
  658. SYNTAX: OPTION USING LITERAL char$
  659. DESCRIPTION: Specifies the magic LITERAL character for the
  660. PRINT USING command. A common value is "_".
  661. ------------------------------------------------------------
  662. SYNTAX: OPTION USING MINUS char$
  663. DESCRIPTION: Specifies the magic MINUS character for the
  664. PRINT USING command. A common value is "-".
  665. ------------------------------------------------------------
  666. SYNTAX: OPTION USING PERIOD char$
  667. DESCRIPTION: Specifies the magic PERIOD character for the
  668. PRINT USING command. A common value is ".".
  669. ------------------------------------------------------------
  670. SYNTAX: OPTION USING PLUS char$
  671. DESCRIPTION: Specifies the magic PLUS character for the
  672. PRINT USING command. A common value is "+".
  673. ------------------------------------------------------------
  674. SYNTAX: OPTION VERSION version$
  675. DESCRIPTION: Selects a specific BASIC version, which is a
  676. combination of OPTION settings, commands,
  677. functions and operators. If no version is
  678. specified, displays a list of the available
  679. versions.
  680. ------------------------------------------------------------
  681. SYNTAX: OPTION ZONE integer
  682. DESCRIPTION: Sets the PRINT zone width. Setting the value
  683. to zero restores the default.
  684. ------------------------------------------------------------
  685. SYNTAX: PRINT # filenum , [USING format$;] value ...
  686. DESCRIPTION: Sends output to a file.
  687. ------------------------------------------------------------
  688. SYNTAX: PRINT [USING format$;] value ...
  689. DESCRIPTION: Sends output to the screen.
  690. ------------------------------------------------------------
  691. SYNTAX: QUIT
  692. DESCRIPTION: Exits to the operating system.
  693. ------------------------------------------------------------
  694. SYNTAX: READ variable [, ...]
  695. DESCRIPTION: Reads values from DATA statements.
  696. ------------------------------------------------------------
  697. SYNTAX: REM ...
  698. DESCRIPTION: Remark.
  699. ------------------------------------------------------------
  700. SYNTAX: RENAME [filename$]
  701. DESCRIPTION: Changes the file name which will be used by
  702. SAVE. Does not save the file.
  703. ------------------------------------------------------------
  704. SYNTAX: RESTORE [line]
  705. DESCRIPTION: Resets the line used for the next READ
  706. statement. line may be either a number or a
  707. label.
  708. ------------------------------------------------------------
  709. SYNTAX: RETURN
  710. DESCRIPTION: Concludes a subroutine called by GOSUB.
  711. ------------------------------------------------------------
  712. SYNTAX: RUN filename$
  713. DESCRIPTION: Loads a new BAASIC program and executes the
  714. program from the start.
  715. ------------------------------------------------------------
  716. SYNTAX: RUN line
  717. DESCRIPTION: Executes the program in memory beginning at
  718. line.
  719. ------------------------------------------------------------
  720. SYNTAX: RUN
  721. DESCRIPTION: Executes the program in memory from the start.
  722. ------------------------------------------------------------
  723. SYNTAX: RUNNH line
  724. DESCRIPTION: Executes the program in memory beginning at
  725. line.
  726. ------------------------------------------------------------
  727. SYNTAX: RUNNH filename$
  728. DESCRIPTION: Loads a new BAASIC program and executes the
  729. program from the start.
  730. ------------------------------------------------------------
  731. SYNTAX: RUNNH
  732. DESCRIPTION: Executes the program in memory from the start.
  733. ------------------------------------------------------------
  734. SYNTAX: SAVE [filename$]
  735. DESCRIPTION: Saves the current program into the file
  736. filename$ in ASCII format.
  737. ------------------------------------------------------------
  738. SYNTAX: SCRATCH [# X]
  739. DESCRIPTION: SCRATCH Deletes the program in memory and
  740. clears all variables. SCRATCH # X Sets the
  741. file mode to writing.
  742. ------------------------------------------------------------
  743. SYNTAX: STEP
  744. DESCRIPTION: Syntax Error.
  745. ------------------------------------------------------------
  746. SYNTAX: STOP
  747. DESCRIPTION: Interrupts program execution and displays the
  748. line number of the STOP command. For use
  749. when debugging BASIC programs. Whether STOP
  750. issues a SIGINT signal is implementation
  751. defined.
  752. ------------------------------------------------------------
  753. SYNTAX: SYSTEM
  754. DESCRIPTION: Exits to the operating system.
  755. ------------------------------------------------------------
  756. SYNTAX: THEN
  757. DESCRIPTION: Syntax Error.
  758. ------------------------------------------------------------
  759. SYNTAX: TO
  760. DESCRIPTION: Syntax Error.
  761. ------------------------------------------------------------
  762. SYNTAX: WRITE # filenum, value [, .... ]
  763. DESCRIPTION: Outputs value to a file. Strings are quoted
  764. and each value is seperated by a omma.
  765. ------------------------------------------------------------
  766. SYNTAX: WRITE value [, .... ]
  767. DESCRIPTION: Outputs value to the screen. Strings are
  768. quoted and each value is seperated by a
  769. comma.
  770. ------------------------------------------------------------
  771. ============================================================
  772. FUNCTIONS
  773. ============================================================
  774. ------------------------------------------------------------
  775. SYNTAX: N = ABS( X )
  776. PARAMETER: X is a number
  777. DESCRIPTION: The absolute value of X.
  778. ------------------------------------------------------------
  779. SYNTAX: N = ASC( A$ )
  780. PARAMETER: A$ is a string, LEN >= 1
  781. DESCRIPTION: The numeric code for the first letter in A$.
  782. For example, ASC("ABC") returns 65 on ASCII
  783. systems.
  784. ------------------------------------------------------------
  785. SYNTAX: N = ATN( X )
  786. PARAMETER: X is a number
  787. DESCRIPTION: The arctangent of X in radians, i.e. the angle
  788. whose tangent is X, where -PI/2 < ATN(X) <
  789. PI/2.
  790. ------------------------------------------------------------
  791. SYNTAX: N = CATALOG
  792. DESCRIPTION: Displays all the file names.
  793. ------------------------------------------------------------
  794. SYNTAX: N = CATALOG( A$ )
  795. PARAMETER: A$ is a string, LEN >= 1
  796. DESCRIPTION: Displays all the file names matching A$.
  797. ------------------------------------------------------------
  798. SYNTAX: S$ = CHR$( X )
  799. PARAMETER: X is a number, [0,255]
  800. DESCRIPTION: The one-character string with the character
  801. corresponding to the numeric code X. On
  802. ASCII systems, CHR$(65) returns "A".
  803. ------------------------------------------------------------
  804. SYNTAX: N = CLK( X )
  805. PARAMETER: X is a number
  806. DESCRIPTION: The time elapsed since the previous midnight,
  807. expressed in hours; e.g., the value of CLK at
  808. 3:15 PM is 15.25. If there is no clock
  809. available, then the value of CLK shall be -1.
  810. The value of CLK at midnight shall be zero
  811. (not 24). The value of X is ignored.
  812. ------------------------------------------------------------
  813. SYNTAX: N = COS( X )
  814. PARAMETER: X is a number
  815. DESCRIPTION: The cosine of X, where X is in radians.
  816. ------------------------------------------------------------
  817. SYNTAX: N = EXP( X )
  818. PARAMETER: X is a number
  819. DESCRIPTION: The exponential value of X, i.e., the value of
  820. the base of natural logarithms (e = 2.71828)
  821. raised to the power of X; if EXP(X) is less
  822. that machine infinitesimal, then its value
  823. shall be replaced with zero.
  824. ------------------------------------------------------------
  825. SYNTAX: N = FIX( X )
  826. PARAMETER: X is a number
  827. DESCRIPTION: The truncated integer, part of X. FIX (X) is
  828. equivalent to SGN(X)*INT(ABS(X)). The major
  829. difference between FIX and INT is that FIX
  830. does not return the next lower number for
  831. negative X.
  832. ------------------------------------------------------------
  833. SYNTAX: N = INT( X )
  834. PARAMETER: X is a number
  835. DESCRIPTION: The largest integer not greater than X; e.g.
  836. INT(1.3) = 1 and INT(-1.3) = 2.
  837. ------------------------------------------------------------
  838. SYNTAX: N = LEN( A$ )
  839. PARAMETER: A$ is a string, LEN >= 0
  840. DESCRIPTION: The length of A$.
  841. ------------------------------------------------------------
  842. SYNTAX: N = LOC( X )
  843. PARAMETER: X is a number, [MININT,MAXINT]
  844. DESCRIPTION: The location of file X; the next record that
  845. GET or PUT statements will use.
  846. ------------------------------------------------------------
  847. SYNTAX: N = LOF( X )
  848. PARAMETER: X is a number, [MININT,MAXINT]
  849. DESCRIPTION: The length of file X.
  850. ------------------------------------------------------------
  851. SYNTAX: N = LOG( X )
  852. PARAMETER: X is a number, > 0
  853. DESCRIPTION: The natural logarithm of X; X shall be greater
  854. than zero.
  855. ------------------------------------------------------------
  856. SYNTAX: S$ = NUM$( X )
  857. PARAMETER: X is a number
  858. DESCRIPTION: The string generated by the print-statement as
  859. the numeric-representation of the value
  860. associated with X.
  861. ------------------------------------------------------------
  862. SYNTAX: N = RANDOM
  863. DESCRIPTION: Seeds the pseudo-random number generator with
  864. TIME.
  865. ------------------------------------------------------------
  866. SYNTAX: N = RANDOMIZE
  867. DESCRIPTION: Seeds the pseudo-random number generator with
  868. TIME.
  869. ------------------------------------------------------------
  870. SYNTAX: N = RANDOMIZE( X )
  871. PARAMETER: X is a number
  872. DESCRIPTION: Seeds the pseudo-random number generator with
  873. X.
  874. ------------------------------------------------------------
  875. SYNTAX: N = RND
  876. DESCRIPTION: The next pseudo-random number in an
  877. implementation-defined sequence of
  878. pseudo-random numbers uniformly distributed
  879. in the range 0 <= RND < 1.
  880. ------------------------------------------------------------
  881. SYNTAX: N = RND( X )
  882. PARAMETER: X is a number
  883. DESCRIPTION: Returns a pseudorandom number in the range
  884. [0,1]. The value of X is ignored.
  885. ------------------------------------------------------------
  886. SYNTAX: N = SGN( X )
  887. PARAMETER: X is a number
  888. DESCRIPTION: The sign of X: -1 if X < 0, 0 if X = 0, and +1
  889. if X > 0.
  890. ------------------------------------------------------------
  891. SYNTAX: N = SIN( X )
  892. PARAMETER: X is a number
  893. DESCRIPTION: The sine of X, where X is in radians.
  894. ------------------------------------------------------------
  895. SYNTAX: S$ = SPC( X )
  896. PARAMETER: X is a number
  897. DESCRIPTION: The string of X spaces. Only for use within
  898. the PRINT command.
  899. ------------------------------------------------------------
  900. SYNTAX: N = SQR( X )
  901. PARAMETER: X is a number, >= 0
  902. DESCRIPTION: The non-negative square root of X; X shall be
  903. non-negative.
  904. ------------------------------------------------------------
  905. SYNTAX: S$ = STR$( X )
  906. PARAMETER: X is a number
  907. DESCRIPTION: The string generated by the print-statement as
  908. the numeric-representation of the value
  909. associated with X.
  910. ------------------------------------------------------------
  911. SYNTAX: S$ = TAB( X )
  912. PARAMETER: X is a number
  913. DESCRIPTION: The string required to advance to column X.
  914. Only for use within the PRINT command.
  915. ------------------------------------------------------------
  916. SYNTAX: N = TAN( X )
  917. PARAMETER: X is a number
  918. DESCRIPTION: The tangent of X, where X is in radians.
  919. ------------------------------------------------------------
  920. SYNTAX: N = TIM( X )
  921. PARAMETER: X is a number, [0,255]
  922. DESCRIPTION: If X is 0, returns minutes in current hour.
  923. If X is 1, returns hours in current day. If
  924. X is 2, returns days in current year. If X
  925. is 3, returns years since 1900. Any other
  926. value for X is an ERROR.
  927. ------------------------------------------------------------
  928. SYNTAX: N = UNSAVE( A$ )
  929. PARAMETER: A$ is a string, LEN >= 1
  930. DESCRIPTION: Removes the file named in A$.
  931. ------------------------------------------------------------
  932. SYNTAX: N = VAL( A$ )
  933. PARAMETER: A$ is a string, LEN >= 1
  934. DESCRIPTION: The value of the numeric-constant associated
  935. with A$, if the string associated with A$ is
  936. a numeric-constant. Leading and trailing
  937. spaces in the string are ignored. If the
  938. evaluation of the numeric-constant would
  939. result in a value which causes an underflow,
  940. then the value returned shall be zero. For
  941. example, VAL( " 123.5 " ) = 123.5, VAL(
  942. "2.E-99" ) could be zero, and VAL( "MCMXVII"
  943. ) causes an exception.
  944. ------------------------------------------------------------
  945. ============================================================
  946. OPERATORS
  947. ============================================================
  948. ------------------------------------------------------------
  949. SYNTAX: X ** Y
  950. DESCRIPTION: Exponential
  951. PRECEDENCE: 14
  952. ------------------------------------------------------------
  953. SYNTAX: X ^ Y
  954. DESCRIPTION: Exponential
  955. PRECEDENCE: 14
  956. ------------------------------------------------------------
  957. SYNTAX: # X
  958. DESCRIPTION: Posation
  959. PRECEDENCE: 13
  960. ------------------------------------------------------------
  961. SYNTAX: + X
  962. DESCRIPTION: Posation
  963. PRECEDENCE: 13
  964. ------------------------------------------------------------
  965. SYNTAX: - X
  966. DESCRIPTION: Negation
  967. PRECEDENCE: 13
  968. ------------------------------------------------------------
  969. SYNTAX: X * Y
  970. DESCRIPTION: Multiplication
  971. PRECEDENCE: 12
  972. ------------------------------------------------------------
  973. SYNTAX: X / Y
  974. DESCRIPTION: Division
  975. PRECEDENCE: 12
  976. ------------------------------------------------------------
  977. SYNTAX: X \ Y
  978. DESCRIPTION: Integer Division
  979. PRECEDENCE: 11
  980. ------------------------------------------------------------
  981. SYNTAX: X + Y
  982. DESCRIPTION: Addition
  983. PRECEDENCE: 9
  984. ------------------------------------------------------------
  985. SYNTAX: X - Y
  986. DESCRIPTION: Subtraction
  987. PRECEDENCE: 9
  988. ------------------------------------------------------------
  989. SYNTAX: X < Y
  990. DESCRIPTION: Less than
  991. PRECEDENCE: 7
  992. ------------------------------------------------------------
  993. SYNTAX: X <= Y
  994. DESCRIPTION: Less than or Equal
  995. PRECEDENCE: 7
  996. ------------------------------------------------------------
  997. SYNTAX: X <> Y
  998. DESCRIPTION: Not Equal
  999. PRECEDENCE: 7
  1000. ------------------------------------------------------------
  1001. SYNTAX: X = Y
  1002. DESCRIPTION: Equal
  1003. PRECEDENCE: 7
  1004. ------------------------------------------------------------
  1005. SYNTAX: X =< Y
  1006. DESCRIPTION: Less than or Equal
  1007. PRECEDENCE: 7
  1008. ------------------------------------------------------------
  1009. SYNTAX: X => Y
  1010. DESCRIPTION: Greater than or Equal
  1011. PRECEDENCE: 7
  1012. ------------------------------------------------------------
  1013. SYNTAX: X > Y
  1014. DESCRIPTION: Greater than
  1015. PRECEDENCE: 7
  1016. ------------------------------------------------------------
  1017. SYNTAX: X >< Y
  1018. DESCRIPTION: Not Equal
  1019. PRECEDENCE: 7
  1020. ------------------------------------------------------------
  1021. SYNTAX: X >= Y
  1022. DESCRIPTION: Greater than or Equal
  1023. PRECEDENCE: 7
  1024. ------------------------------------------------------------
  1025. SYNTAX: NOT X
  1026. DESCRIPTION: Bitwise NOT
  1027. PRECEDENCE: 6
  1028. ------------------------------------------------------------
  1029. SYNTAX: X AND Y
  1030. DESCRIPTION: Bitwise AND
  1031. PRECEDENCE: 5
  1032. ------------------------------------------------------------
  1033. SYNTAX: X OR Y
  1034. DESCRIPTION: Bitwise OR
  1035. PRECEDENCE: 4
  1036. ------------------------------------------------------------
  1037. SYNTAX: X XOR Y
  1038. DESCRIPTION: Bitwise Exclusive OR
  1039. PRECEDENCE: 3
  1040. ------------------------------------------------------------
  1041. SYNTAX: X EQV Y
  1042. DESCRIPTION: Bitwise EQV
  1043. PRECEDENCE: 2
  1044. ------------------------------------------------------------
  1045. SYNTAX: X IMP Y
  1046. DESCRIPTION: Bitwise IMP
  1047. PRECEDENCE: 1
  1048. ------------------------------------------------------------