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.
 
 
 
 
 
 

1010 lines
42 KiB

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