home *** CD-ROM | disk | FTP | other *** search
/ The Fred Fish Collection 1.5 / ffcollection-1-5-1992-11.iso / ff_disks / 200-299 / ff274.lzh / HP11 / doc / quick < prev    next >
Text File  |  1989-11-16  |  6KB  |  150 lines

  1. This is a very small tutorial for those who don't know how to use an HP11:
  2.  
  3. - The HP11 uses RPN (Reverse Polish Notation), not conventional algebraic
  4.   notation. Calculations must thus be done by first entering the operands,
  5.   and then the operation. For example, to calculate:
  6.  
  7.     5 + 3         you type       5 3 +
  8.     5 * (2 + 4)      you type      5 2 4 + *
  9.     2 * sin(0.5)     you type      0.5 sin 2 *
  10.  
  11. - When you want to enter two numbers consecutively, you must separate them by
  12.   typing the ENTER key, the above will thus actually be
  13.  
  14.     5 ENTER 3 +
  15.     5 ENTER 2 ENTER 4 + *
  16.     0.5 SIN 2 *          <- ENTER only necessary when entering two numbers
  17.  
  18. - Intermediate results are saved on a stack, but as this is only 4 levels deep,
  19.   you must be slightly careful in which order you do the operations, as in:
  20.  
  21.   ( 6 + 5) * (3 + 2 + 4 + 6)
  22.  
  23.   if you try
  24.  
  25.   6 ENTER 5 +    3 ENTER 2 ENTER 4 ENTER 6 + + +   *
  26.  
  27.   you won't get the expected result, because the 11 (result of 6 5 +) will
  28.   have been lost. This is what happens (X, Y, Z, T are the names of the four
  29.   levels of the stack, the keys pressed are marked between the snapshots of
  30.   the stack) :
  31.  
  32.      -------       -------     -------       -------     -------
  33.  T   |       |       |     |     |     |       |     |     |     |
  34.      -------       -------     -------       -------     -------
  35.  Z   |       |       |     |     |     |       |     |     |     |
  36.      -------  ENT  -------  5  -------    +  -------  3  -------    ENT
  37.  Y   |       |       |  6  |     |  6  |       |     |     |  11 |
  38.      -------       -------     -------       -------     -------
  39.  X   |    6  |       |  6  |     |  5  |       |  11 |     |  3  |
  40.      -------       -------     -------       -------     -------
  41.  
  42.      -------       -------     -------       -------     -------
  43.  T   |       |       |     |     |  11 |       |  11 |     |  3  |     <- 11 is lost
  44.      -------       -------     -------       -------     -------
  45.  Z   | 11  |       | 11  |     |   3 |       |   3 |     |  2  |
  46.      -------   2   ------- ENT -------    4  ------- ENT -------     6
  47.  Y   |    3  |       |  3  |     |   2 |       |   2 |     |  4  |
  48.      -------       -------     -------       -------     -------
  49.  X   |    3  |       |  2  |     |   2 |       |   4 |     |  4  |
  50.      -------       -------     -------       -------     -------
  51.  
  52.      -------       -------     -------       -------     -------
  53.  T   |    3  |       |   3 |     |  3  |       |  3  |     |  3  |
  54.      -------       -------     -------       -------     -------
  55.  Z   |    2  |       |   3 |     |  3  |       |  3  |     |  3  |
  56.      -------   +   -------  +  -------    +  -------  *  -------
  57.  Y   |    4  |       |   2 |     |  3  |       |  3  |     |  3  |
  58.      -------       -------     -------       -------     -------
  59.  X   |    6  |       |  10 |     | 12  |       | 15  |     | 45  |
  60.      -------       -------     -------       -------     -------
  61.  
  62.  
  63.    you get 45 instead of 165 ... You can notice here the effect of ENTER:
  64.    it duplicates the number in X into Y, but the next number entered will
  65.    overwrite it.
  66.  
  67.    If you had done
  68.  
  69.    3 ENTER 2 + 4 + 6 +     6 ENTER 5 + *
  70.  
  71.    you would have got 165 as expected (it's also shorter to type it this
  72.    way ...). Note that in practice, this problem rarely arises.
  73.  
  74. - Operations like sin, cos, hyperbolic sine (got by typing f HYP SIN) modify
  75.   the number in X.
  76.  
  77. - There are 20 registers, accessible by RCL/STO 0-9 & RCL/STO . 0-9
  78.  
  79. - You can choose the display mode with f FIX/SCI/ENG 0-9, and the angular
  80.   mode with g DEG/RAD/GRAD.
  81.  
  82. - Statistics use registers 0 to 5 (clear them first with f CLEAR-Sigma).
  83.   Sigma-+ adds the X,Y pair, you can calculate the mean, sdev, linear
  84.   regression, estimation & correlation (these last two simultaneously).
  85.  
  86. Programming
  87. -----------
  88.  
  89. - You enter or leave programming mode by typing g P/R.
  90.  
  91. - You add instructions by typing them, remove them with <-, and you can move
  92.   around in the program with SST, g BST & GTO . xxx, where xxx is the
  93.   program step number.
  94.  
  95. - Programs are composed of numbered steps, from 1 to 203. When a program is
  96.   run, these are normally executed sequentially.
  97.  
  98. - Program steps are displayed as sequences of up to 3 pairs of 2 digits
  99.   (eventually with a . ) These numbers correspond to the keys pressed to
  100.   enter the instructions, with the keys numbered starting at 11 for
  101.   square root, 12 for e^x, ... 16 for CHS, 10 for /, 21 for SST, ...
  102.   Digits (0 to 9) are represented as themselves. Experiment ! You'll
  103.   remember them after a while (if you have the patience :-)).
  104.  
  105. - Gotos: You can enter labels anywhere, with f LBL 0-9 or A-E. GTO 0-9, A-E
  106.   will transfer control to the step following the label.
  107.  
  108. - Gosub: GSB 0-9, A-E will call the subroutine starting at the label, the
  109.   next RTN will return you to the step after the GSB. Subroutines can be
  110.   nested (upto four deep).
  111.  
  112. - Tests: the instructions x =<>... 0/y compare X with 0 or Y. if the condition
  113.   is true, thew next step is executed, otherwise skipped (this step is often
  114.   a GTO).
  115.  
  116. - Indirection: The special register I allows indirection. If I contains 5,
  117.   RCL/STO (i) is equivalent to RCL/STO 5,
  118.   GSB/GTO I   is equivalent to GTO/GSB 5
  119.   DSE & ISG drive you mad. Actually, if I = nnnnn.xxxyy
  120.  
  121.   DSE will do : I = I - yy
  122.         if I <= xxx skip next step
  123.  
  124.   ISG          : I = I + yy
  125.         if I > xxx skip next step
  126.  
  127.   If yy = 0, 1 is used.
  128.  
  129. - Programs are runb out of program mode, either by pressing R/S (program starts
  130.   at current step) (This will stop a program if it is running), or with
  131.   GSB 0-9,A-E which will start the program at the apropriate label.
  132.  
  133. Errors
  134. ------
  135. Error 0 : division by 0, ln 0
  136. Error 1 : Register overflow (when using STO+, STO*, ...)
  137. Error 2 : Statistic error
  138. Error 3 : No such register
  139. Error 4 : No program memory left
  140. Error 5 : Subroutines nested more than 4 deep
  141. Error 6 : No such flag
  142.  
  143.  
  144. Remark
  145. ------
  146.  
  147. There is a lot I haven't said (LastX, STO+-*/, lots of functions, etc, etc)
  148. and certainly a few subtleties missed out. Experiment !
  149.  
  150.