home *** CD-ROM | disk | FTP | other *** search
/ ftp.update.uu.se / ftp.update.uu.se.2014.03.zip / ftp.update.uu.se / pub / pdp8 / os278-src.tar.Z / os278-src.tar / basic.tx < prev    next >
Text File  |  1992-09-18  |  18KB  |  575 lines

  1.             Extended BASIC Documentation
  2.  
  3.                  KEY WORD FUNCTIONS
  4.  
  5. EXIT n    Leave a subroutine.
  6.  
  7.     EXIT will leave a subroutine, clear last GOSUB address and
  8.     transfer program control to line n.
  9.  
  10.  
  11. IF THEN
  12.  
  13.     IF <exp rel exp> THEN <statement-or line number>
  14.     IF <exp rel exp> THEN <Any series of basic statements>
  15.  
  16.     The THEN clause can be any BASIC statement; even another
  17.     IF-THEN statement.  The THEN clause of an IF statement is
  18.     terminated by the next statement with a line statement.
  19.  
  20.     Example:
  21.  
  22.     100 IF TEST = 0 THEN J=2 \ K=3 \ PRINT "TEST IS ZERO"
  23.     110 PRINT "DONE TEST"
  24.  
  25.     If TEST = 0 then every command on line 100 is executed.
  26.     If TEST <> 0 then program control goes to line 110
  27.  
  28.  
  29. INPUT
  30.  
  31.     The INPUT statement allows prompting.  IE:
  32.  
  33.     INPUT "What is your name";NAME$
  34.     INPUT CUR$(1,1);"NAME ";NAME$;CUR$(3,1)"AGE ";AGE$
  35.  
  36.  
  37. RECALL    Recall a screen image file
  38.  
  39.     Recall will load data contained in a file that was previously
  40.     generated by the store command onto the screen.
  41.  
  42.     The format is RECALL "FILE.EX" (the extension is optional).
  43.     If no extension is given .SI is added to the file name.  All
  44.     files must reside on the system disk.
  45.  
  46.  
  47. SLEEP X    Pause for x length of time.
  48.       
  49.           Where X = the length of time in 1/10th of a second
  50.  
  51.  
  52.  
  53.             Extended BASIC Documentation
  54.  
  55.  
  56. STORE    Save the contents of the screen in a file.
  57.  
  58.     The store command will take the current contents on the screen
  59.     and will save it in a file on your system disk.
  60.  
  61.     The format is STORE "FILE.EX" (the extenstion is optional).
  62.     If no extension is given .SI is added to the file name.  All
  63.     files will be stored on the system disk.
  64.  
  65.     The file generated cannot be listed, it can only accessed by
  66.     the RECALL command.
  67.  
  68.     *** An error will be generated if a STORE command is executed
  69.     while a temporary file is active. IE: FILEV#1:
  70.  
  71.  
  72. TRAP X    TRAP the character specified.
  73.  
  74.     When the TRAP character is found an error will be generated.
  75.     IE: TRAP 4 will trap a CTRL D
  76.  
  77.  
  78. ON ERROR GOTO n
  79.  
  80.     Upon an error transfer program control to line n.  IE: ON
  81.     ERROR GOTO 9000 will transfer program control to line 9000
  82.     when an error is found.
  83.  
  84.     ** NOTES:  ON ERROR GOTO 0 turns off the ON ERROR feature.  NO
  85.     other command may be specified on the same line as the ON
  86.     ERROR GOTO command.  If a second error is found before a
  87.     RESUME command has been executed program execution will stop.
  88.  
  89.  
  90. RESUME n
  91.  
  92.     RESUME transfers program control to line n and clears the
  93.     error flag condition.  IE:RESUME 100 will clear the current
  94.     error condition and transfer program control to line 100.
  95.  
  96.  
  97. Variable Names
  98.  
  99.     All variable names must start with a letter and may be
  100.     followed by any number of letters, digits, or periods; however
  101.     only the first eight characters are significant.
  102.  
  103.     *** A variable name cannot be a keyword.
  104.     IE: INPUT  FILE$
  105.  
  106.  
  107.  
  108.             Extended BASIC Documentation
  109.  
  110.  
  111.                 LET FUNCTIONS
  112.  
  113. X$=CAL$("FILE.EX",#)    Call a user written overlay
  114.  
  115.     FILE.EX   Is the name of the user overlay.  Note that the
  116.           overlay must reside on the system device.
  117.  
  118.     #         Is a number from 0 - 4096.  The value of the number
  119.               depends upon the overlay being called.
  120.  
  121.  
  122. ERR(0)        Return the error number.  Used with ON ERROR GOTO.
  123.  
  124.     The error numbers are defined in the back of this
  125.     document (see TABLE 3).
  126.  
  127.  
  128. ERL(0)        Return the error line.  Used with ON ERROR GOTO.
  129.  
  130.  
  131. X$=KEY$(T,X)  KEY COMMAND
  132.  
  133.     Input one character from the keyboard
  134.  
  135.     X    Function
  136.  
  137.     T    Wait for T length of time for a character where T
  138.         is in 1/10th's of a second.  If no character was
  139.         typed within the time period then a null string is
  140.         returned.
  141.  
  142.         If T=0 then wait indefinitely.
  143.  
  144.     X    0 = do not echo the character
  145.         1 = echo the character
  146.  
  147.         IE:  X$=KEY$(30,1)  Means wait about 3 seconds and
  148.         echo the character if typed.
  149.  
  150.  
  151.           PRINT FUNCTIONS
  152.  
  153. EID$(X)       Erase In Display
  154.  
  155.     X    Function
  156.  
  157.     0    From current cursor position to end of screen.
  158.     1    From start of screen to current cursor position
  159.         (inclusive).
  160.     2    Entire screen.
  161.  
  162.         IE:  PRINT EID$(2) will clear the entire screen.
  163.  
  164.  
  165.  
  166.  
  167.             Extended BASIC Documentation
  168.  
  169.  
  170. EIL$(X)       Erase In Line
  171.  
  172.     X    Function
  173.  
  174.     0    From current cursor position to end of line.
  175.     1    From start of line to current cursor position.
  176.     2    Entire line.
  177.  
  178.         IE:  PRINT EIL$(2) will clear the entire line.
  179.  
  180.  
  181.  
  182. LCD$(A$,H,W)  Line Character Display
  183.  
  184.          Create an open box according to given parameters:
  185.  
  186.     A$    Decimal equivalent of desired character
  187.     H    Heigth of box
  188.     W    Width of box
  189.  
  190.         IE:  PRINT CUR$(24,1);LCD$("1",10,20) will create
  191.         an open box 10 characters high by 20 characters
  192.         wide using the diamond graphics character.
  193.  
  194.         ** NOTE:  The box is drawn starting at the lower
  195.         left corner at cursor position defined by the last
  196.         CUR$(X,Y) command executed.
  197.  
  198.  
  199. LGD$(A$,H,W)  Line Graphics Display
  200.  
  201.         Create an open box according to given parameters:
  202.  
  203.     A$    A$ = "0", "1", "2"
  204.         0 = a thin line box
  205.         1 = a medium line box
  206.         2 = a wide line box
  207.  
  208.     H    Height of box
  209.     W    Width of box
  210.  
  211.         IE:  PRINT CUR$(21,1);LGD$("0",10,20) will create a
  212.         thin line box 10 characters high by 20 characters
  213.         wide.
  214.  
  215.         ** NOTE:  The box is drawn starting at the lower
  216.         left corner at cursor position defined by the last
  217.         CUR$(X,Y) command executed.
  218.  
  219.         Settings 1 and 2 for DECmate 1 only.
  220.  
  221.  
  222.             Extended BASIC Documentation
  223.  
  224.  
  225. LST$(X)       List
  226.  
  227.         Print the contents of the screen on the printer.
  228.  
  229.     X    Function
  230.  
  231.     0    Only used as a dummy variable
  232.  
  233.         IE:  PRINT LST$(0)
  234.  
  235.  
  236. SCD$(A$,H,W)  Solid Character Display
  237.  
  238.         Create a solid box according to given parameters:
  239.  
  240.     A$    Decimal equivalent of desired character (see TABLE 1)
  241.     H    Height of box
  242.     W    Width of box
  243.  
  244.         IE:  PRINT CUR$(24,1);SCD$("1",10,20) will create a
  245.         solid box 10 characters high by 20 characters wide
  246.         using the diamond graphics characters.
  247.  
  248.         ** NOTE:  The box is drawn starting at the lower
  249.         left corner at cursor position defined by the last
  250.         CUR$(X,Y) command executed.
  251.  
  252.  
  253.             Extended BASIC Documentation
  254.  
  255. SCS$(X)       Select Character Set
  256.  
  257.         Select which character set LCD and SCD commands will use.
  258.  
  259.     X    Function
  260.  
  261.     0    Use TABLE 1 character set
  262.     1    Use TABLE 2 character set
  263.  
  264.         IE: PRINT SCS$(1);CUR$(24,1);SCD$("30",10,20) will
  265.         create a solid box 10 characters high by 20
  266.         characters wide using the solid graphics character.
  267.  
  268.         For DECmate 1 only.
  269.  
  270. SFM$(X)       Set Feature Mode
  271.  
  272.         Establishes the screen width parameters:
  273.  
  274.     X    Function
  275.  
  276.     0    Set display width to 80 columns
  277.     1    Set display width to 132 columns
  278.  
  279.         IE:  PRINT SFM$(1)
  280.  
  281.  
  282.  
  283.             Extended BASIC Documentation
  284.  
  285.  
  286. SGR$(X)       Select Graphic Rendition
  287.  
  288.         Establishes the attributes of the subsequent
  289.         characters sent to the screen:
  290.  
  291.     X    Function
  292.  
  293.     0    All attributes off
  294.     1    Display as a negative (reverse) image
  295.     2    Display at increased intensity
  296.     4    Display underscored
  297.     8    Display blinking
  298.  
  299.         If a combination of attributes is desired add the
  300.         numbers and use the new value.  IE: PRINT SGR$(5)
  301.         will give you a combined attribute of 1 and 4.  The
  302.         SGR command will automaticly negate all previously
  303.         set attributes and use the new setting passed.
  304.  
  305. SSI$(X)       Set Screen Intensity
  306.  
  307.         X = the value of the screen brightness in the range
  308.         of 0 to 15, where 0 is the lowest setting, and 15
  309.         being the highest setting.  The standard screen
  310.         setting is 7.
  311.  
  312.         For DECmate 1 only.
  313.  
  314.                                     TABLE 1
  315.  
  316.  
  317.      0           1           2           3           4           5
  318.  
  319.                *        *  *  *     *   *       ****         ****
  320.               ***        *   *      *   *       *           *
  321.              *****      *  *  *     *****       ***         *
  322.             *******      *   *      *   *       *            ****
  323.              *****      *  *  *     *   *       *  ****       ****
  324.               ***        *   *        *****        *          *   *
  325.                *        *  *  *         *          ***        ****
  326.                                         *          *          *   *
  327.                                         *          *          *   *
  328.  
  329.      6           7           8           9          10          11
  330.                                                                *
  331. *             ***                   *   *       *   *          *
  332. *            *   *         *        **  *       *   *          *
  333. *            *   *         *        * * *        * *           *
  334. *****         ***       *******     *  **         *         ****
  335.   *****                    *        *   *         *****
  336.   *                        *          *             *
  337.   ****                  *******       *             *
  338.   *                                   *             *
  339.   *                                   *****         *
  340.  
  341.     12          13          14          15          16          17
  342.                            *           *        **********
  343.                            *           *
  344.                            *           *                    **********
  345.                            *           *
  346. ****           *******     *******  **********
  347.    *           *                       *
  348.    *           *                       *
  349.    *           *                       *
  350.    *           *                       *
  351.    *           *                       *
  352.  
  353.     18          19          20          21          22          23
  354.                                        *           *           *
  355.                                        *           *           *
  356.                                        *           *           *
  357.                                        *           *           *
  358. **********                             *******  ****        **********
  359.                                        *           *
  360.             **********                 *           *
  361.                                        *           *
  362.                         **********     *           *
  363.                                        *           *
  364.  
  365.  
  366.  
  367.     24          25          26          27          28          29
  368.                *
  369.                *              *     *                             *
  370.                *            *         *                          *
  371.                *          *             *       *******     *******
  372. **********     *        *                 *       *  *         *
  373.    *           *          *             *         *  *      *******
  374.    *           *            *         *           *  *       *
  375.    *           *              *     *            *   *      *
  376.    *           *        **********  **********
  377.    *           *
  378.  
  379.     30          31          32
  380.  
  381.    ***
  382.   *
  383.   *
  384. *****          *
  385.   *
  386.  ****
  387. * *  **
  388.  *
  389.  
  390.  
  391. 33  !       48  0        64  @        80  P         96  @       112  p
  392. 34  "       49  1        65  A        81  Q         97  a       113  q
  393. 35  #       50  2        66  B        82  R         98  b       114  r
  394. 36  $       51  3        67  C        83  S         99  c       115  s
  395. 37  %       52  4        68  D        84  T        100  d       116  t
  396. 38  &       53  5        69  E        85  U        101  e       117  u
  397. 39  '       54  6        70  F        86  V        102  f       118  v
  398. 40  (       55  7        71  G        87  W        103  g       119  w
  399. 41  )       56  8        72  H        88  X        104  h       120  x
  400. 42  *       57  9        73  I        89  Y        104  i       121  y
  401. 43  +       58  :        74  J        90  Z        105  j       122  z
  402. 44  ,       59  ;        75  K        91  [        106  k       123  {
  403. 45  -       60  <        76  L        92  \        107  l       124  |
  404. 46  .       61  =        77  M        93  ]        108  m       125  }
  405. 47  /       62  >        78  N        94  ^        109  n       126  ~
  406.             63  ?        79  O        95  _        110  o       127 DEL
  407.  
  408.  
  409.                                     TABLE 2
  410.  
  411.  
  412.      0           1           2           3           4           5
  413. *****            *****                          *****            *****
  414. *****            *****                          *****            *****
  415. *****            *****                          *****            *****
  416. *****            *****                          *****            *****
  417. *****            *****                          *****            *****
  418.                              *****  *****       *****            *****
  419.                              *****  *****       *****            *****
  420.                              *****  *****       *****            *****
  421.                              *****  *****       *****            *****
  422.                              *****  *****       *****            *****
  423.  
  424.      6           7           8           9          10          11
  425. **********                   *****  *****       **********  **********
  426. **********                   *****  *****       **********  **********
  427. **********                   *****  *****       **********  **********
  428. **********                   *****  *****       **********  **********
  429. **********                   *****  *****       **********  **********
  430.             **********  **********  **********       *****  *****
  431.             **********  **********  **********       *****  *****
  432.             **********  **********  **********       *****  *****
  433.             **********  **********  **********       *****  *****
  434.             **********  **********  **********       *****  *****
  435.  
  436.  
  437.      12          13          14          15          16          17
  438. *****            *****                            **          **  *
  439. *****            *****                              *        *  **
  440. *****            *****
  441. *****            *****    ***              ***
  442. *****            *****    ***              ***
  443.      *****  *****
  444.      *****  *****
  445.      *****  *****
  446.      *****  *****
  447.      *****  *****
  448.  
  449.      18          19          20          21          22          23
  450.    *
  451.   * *        ******
  452.  *   *      *  *
  453.             *  *         ** **
  454.             *  ***      *  *  *                               ***
  455.             *  *        *  ****                               ***
  456.             *  *        *  *                      ***
  457.              ******      ** **                    ***
  458.                                       ***
  459.                                       ***
  460.  
  461.  
  462.  
  463.      24          25          26          27          28          29
  464.               ***
  465.               ***
  466.   ***                                                       **********
  467.   ***                                                       **********
  468.                                                 **********  **********
  469.                                                 **********  **********
  470.                                     **********  **********  **********
  471.                                     **********  **********  **********
  472.                         **********  **********  **********  **********
  473.                         **********  **********  **********  **********
  474.  
  475.     30          31          32          33          34          35
  476. **********
  477. **********                                      *     *        ***
  478. **********                             *         *   *        *   *
  479. **********         ***               *****        * *         *
  480. **********         ***              *  *           *        *****
  481. **********                           *****       *****        *
  482. **********                             *           *         ****
  483. **********                                       *****      * *  **
  484. **********    ***                                  *         *
  485. **********    ***
  486.  
  487.  
  488.  
  489.                 TABLE 3
  490.  
  491.  
  492.  1   Bad record number in random access file
  493.  2   Illegal character in numeric string
  494.  3   Illegal minus sign
  495.  4   More than one decimal point encountered
  496.  5   Division by zero
  497.  6   Division by zero in string arithmetic
  498.  7   Error creating or finding file specified in FILE, STORE, OR RECALL
  499.  8   Illegal DEV:FILENAME specification in FILE command
  500.  9   Failure to access a device handler in FILE command
  501. 10   Imaginary square root
  502. 11   Numeric or input overflow
  503. 12   ON GOTO statement out of range
  504. 13   String arithmetic overflow error
  505. 14   Attempt to read past End Of File
  506. 15   String truncated during record write
  507. 16   String truncated on input
  508. 17   String truncated during record read
  509. 18   Trap character found
  510. 19   Attempt to write past End Of File
  511. 20   * not assigned *
  512. 21   * not assigned *
  513. 22   * not assigned *
  514. 23   * not assigned *
  515. 24   * not assigned *
  516. 25   CHAIN attempted with BCOMP.SV or BLOAD.SV missing
  517. 26   Error in DEFINE statement
  518. 27   No more file buffers available
  519. 28   Bad DEV:FILE.EX format in CHAIN statement
  520. 29   Failure to access a device handler in CHAIN command
  521. 30   Failure to find file specified in CHAIN command
  522. 31   Attempt to CHAIN to a .SV file not on SYS:
  523. 32   Attempt to READ past end of DATA list
  524. 33   Error generated during device access
  525. 34   No more room for record defines
  526. 35   No more room for additional handlers
  527. 36   Attempt to raise negative number to a real power
  528. 37   Attempt to create a second tentative file
  529. 38   Loosing tentative file
  530. 39   Failed to load handler for FILE command
  531. 40   Attempt to use unopened file
  532. 41   Attempt to FIX a negative number
  533. 42   Illegal file number
  534. 43   Attempt to FIX a number > 4095
  535. 44   Attempt to FIX a number > 2**23-1
  536. 45   EXIT or RETURN executed with out GOSUB
  537. 46   GOSUB stack overflow
  538. 47   Failure during (USR) system access in STORE or RECALL
  539. 48   Error in STORE while creating tempory file
  540. 49   Failure to find file specified in RECALL command
  541. 50   Can't STORE tempory file error in close
  542. 51   Bad DEV:FILE.EX format in STORE or RECALL
  543. 52   Attempt to create a second tentative file in STORE
  544. 53   File overflow in STORE exceeded free space
  545. 54   Input error during disk read on RECALL
  546.  
  547.  
  548.                 TABLE 3
  549.  
  550.  
  551. 55   Illegal argument in user function
  552. 56   Illegal argument in LOG function
  553. 57   Bad command length or CCL.SV missing
  554. 58   Handler error while overlaying
  555. 59   Illegal arg in POS
  556. 60   SAC overflow on concatenate
  557. 61   String to long or undefined
  558. 62   Attempt to read string from numeric file
  559. 63   Subscript error
  560. 64   Attempt to write string into numeric file
  561. 65   Illegal record size
  562. 66   Attempt to read variable length file
  563. 67   * not assigned *
  564. 68   * not assigned *
  565. 69   * not assigned *
  566. 70   * not assigned *
  567. 71   * not assigned *
  568. 72   * not assigned *
  569. 73   Error loading user overlay
  570. 74   Error in user overlay
  571. 75   Execution aborted by CTRL C
  572. 76   RESUME executed without error condition pending
  573.  
  574.  
  575.