home *** CD-ROM | disk | FTP | other *** search
/ The Datafile PD-CD 5 / DATAFILE_PDCD5.iso / utilities / h / hp11 / doc / quick < prev   
Encoding:
Text File  |  1992-05-07  |  5.9 KB  |  152 lines

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