home *** CD-ROM | disk | FTP | other *** search
/ ftp.pasteur.org/FAQ/ / ftp-pasteur-org-FAQ.zip / FAQ / hp / hp48-faq / part2 < prev    next >
Encoding:
Internet Message Format  |  2000-04-15  |  93.8 KB

  1. Path: senator-bedfellow.mit.edu!bloom-beacon.mit.edu!newsswitch.lcs.mit.edu!newsfeed.berkeley.edu!nntp.cs.ubc.ca!news.UVic.CA!aschoorl
  2. From: aschoorl@engr.uvic.ca (Andre Schoorl)
  3. Newsgroups: comp.sys.hp48,comp.sources.hp48,comp.answers,news.answers
  4. Subject: comp.sys.hp48 FAQ : 2 of 4 - Hardware, Programs, and Programming
  5. Followup-To: comp.sys.hp48
  6. Date: 14 April 2000 22:00:02 GMT
  7. Organization: University of Victoria, Victoria, BC, Canada
  8. Lines: 2359
  9. Approved: news-answers-request@MIT.EDU
  10. Expires: 12 May 2000 22:00:02 GMT
  11. Message-ID: <HP48_FAQ_v462_p2_4_14_2000@uvaix3e1.comp.UVic.CA>
  12. Reply-To: aschoorl@engr.uvic.ca
  13. NNTP-Posting-Host: cognac.uvic.ca
  14. X-Trace: uvaix7e1.comp.UVic.CA 955779053 167252 142.104.113.129 (15 Apr 2000 06:10:53 GMT)
  15. X-Complaints-To: abuse@UVic.CA
  16. NNTP-Posting-Date: 15 Apr 2000 06:10:53 GMT
  17. Summary: Answers to Frequently Asked Questions about HP48 calculators
  18. Keywords: FAQ, HP48
  19. X-Url: http://www.engr.uvic.ca/~aschoorl/faq/
  20. User-Agent: slrn/0.9.5.7 (UNIX)
  21. Xref: senator-bedfellow.mit.edu comp.sys.hp48:114892 comp.sources.hp48:751 comp.answers:40474 news.answers:181586
  22.  
  23. Archive-name: hp/hp48-faq/part2
  24. Last-modified: 4/14/2000
  25. Version: 4.62
  26. Posting-Frequency: Every 14 days or so
  27.  
  28. -----BEGIN PGP SIGNED MESSAGE-----
  29. Hash: SHA1
  30.  
  31. post739
  32.   6.1.  My HP48 seems to making a high pitched noise.
  33.  
  34.   From: Dave Arnett
  35.  
  36.   The guts of the HP48 keyboard are assembled from several layers of
  37.   mylar and similar material.  Some of the layers have conductive ink to
  38.   create switch contacts.  Some are insulators, with appropriately
  39.   located holes through which the switch contacts meet.  Some are
  40.   embossed with spherically domed areas, to provide the snap-spring feel
  41.   when you press the plastic keys.  The entire multi-layer sandwich is
  42.   assembled onto plastic pegs on the backside of the HP48 top case,
  43.   along with the metal chassis, and then the pegs are "heat stacked",
  44.   positively capturing and holding the matrix together.
  45.  
  46.   These parallel planes can act like a capacitive speaker.  Most
  47.   loudspeakers in home electronics are inductive: a sheet or cone moves
  48.   because current passes through an attached coil positioned in a
  49.   magnetic field.  A capacitive speaker creates sound by moving a sheet
  50.   or diaphragm due to electric charge forces, whether attracting or
  51.   repelling.  The HP48 keyboard has the necessary characteristics to be
  52.   a very inefficient (therefore quiet) capacitive speaker.
  53.  
  54.   When the HP48 "scans" the keyboard, charges are placed on the parallel
  55.   sheets of mylar.  They tend to move as a result of the charge, and
  56.   create a faint squeal or whine.  The loudness will depend on a number
  57.   of factors, and can vary significantly from HP48 to HP48.  Some folks
  58.   report that, on their HP48, the sound is stronger on the back than on
  59.   the front; others report the opposite.
  60.  
  61.  
  62.   6.2.  Can I upgrade my S or G to more than 32K ram?
  63.  
  64.   It is possible to do this by opening up the case and adding some
  65.   memory chips.  There are several containing instructions and
  66.   schematics available at:
  67.  
  68.   <http://www.hpcalc.org/docs/opening/>
  69.  
  70.   There is a web page on how to open your HP48 from the back at
  71.   <http://www.contrib.andrew.cmu.edu/~drury/how2open.htm>
  72.  
  73.   This is an illustrated guide on how to open your HP48 from the back.
  74.   It has full instructions, as well as 15 pictures of the calculator in
  75.   various stages of disassembly.
  76.  
  77.   An alternate way to open your HP48 and upgrade it to 256K is described
  78.   at the following site, along with lots of pictures:
  79.  
  80.   <http://studwww.eurecom.fr/~grundsch/>
  81.  
  82.   Another good site is:
  83.  
  84.   <http://www.geocities.com/CapeCanaveral/7584/index.html>
  85.  
  86.   WARNING:  It is possible to ruin your HP in the process of performing
  87.   any one of these upgrades.  Do not even attempt it unless you are
  88.   adept at working with small electronics.  The FAQ maintainer and the
  89.   authors of the instructions take no responsibility for anything you do
  90.   to your HP!
  91.  
  92.  
  93.   6.3.  Can I add a lithium battery backup?
  94.  
  95.   From: Lee Studley <RStud39515@aol.com>
  96.  
  97.   I recently did a modification to my 48G by replacing the 32K ram with
  98.   a surface mount 128x8 RAM.  Afterwards, I sandwiched 2nd and 3rd RAM
  99.   chips by stacking them up and soldering.  The 2nd CS was jumpered over
  100.   to the expansion pin 21a.  The decode for the 3rd part was easy to
  101.   figure out.  I've also added a lithium battery to insure memory
  102.   retention.  This thing now has 128K user memory, 128K in port 1, and
  103.   128K in port 2.  Additional port 2 chips can easily be added.
  104.  
  105.  
  106.   The 3 volt lithium battery used was the generic coin type. I just made
  107.   room for the holder and battery by removing the aluminum shield up to
  108.   the plastic post near the piezo element.  The positive terminal of the
  109.   battery goes through a 470 ohm resistor into the anode of a schotky
  110.   diode (only 0.2 volt forward drop).  The cathode end of the diode
  111.   feeds the positive side of the big 1000 uF capacitor near the added
  112.   74HC00.  This is the memory retention cap when the batteries are
  113.   removed.
  114.  
  115.   This way, the lithium battery only gets used if the main batteries are
  116.   removed or very low.  Seems to work well so far.  The ground
  117.   connection broken by cutting the aluminum shield kills the reset and
  118.   piezo contact points.  To fix this, I stretched the original piezo
  119.   contact spring and cut it in half.  Then I soldered the cut piece to
  120.   the ground "twisted" tab near the original spring.  (readers should
  121.   verify this ground with a meter.)  This restored the lost functions.
  122.  
  123.  
  124.   6.4.  How can I get/build a cable for my HP48?
  125.  
  126.   Some places that sell the HP48 also sell the cable required for
  127.   interfacing with a PC.  Unfortunately, most don't.
  128.  
  129.   For information on how to build your own cable, see Appendix D-1.
  130.  
  131.   If you want to buy one, there are a few options.  Places like ElekTek
  132.   sell them for around $20-$25.
  133.  
  134.   There are a few netters that make cables for sale also.  Contact:
  135.  
  136.  
  137.   o  Chris Edmunds <chris@muffet.com>  Web page:
  138.      <http://muffet.com/hp/cables/ad.html>
  139.  
  140.   o  Joel Kolstad <kolstadj@peak.org>
  141.  
  142.   o  Greg Lousteau <greg@gregjeff.com>
  143.      <http://www.gregjeff.com/greg/cable.html>
  144.  
  145.   If you live in a larger city, you can look in the Yellow Pages for a
  146.   listing of HP authorized dealers who either have the cables in stock
  147.   or can order them in about the same time a mail order place can, but
  148.   for a lower price..
  149.  
  150.  
  151.   6.5.  HP seems to offer two link kits with different prices.
  152.  
  153.   HP offers two link kits, one which sells for about US$20, and the
  154.   other which sells for about US$50.  The only difference between the
  155.   two is the higher priced kit comes with software and a manual.  The
  156.   cable, however, is the same in both kits.
  157.  
  158.   As mentionned in the next question, free alternatives to this software
  159.   are readily available.  HP's software also includes some assorted
  160.   miscellaneous programs and games, all of which are also available from
  161.   HP via FTP or WWW.
  162.  
  163.  
  164.   6.6.  Is there any communications software available?
  165.  
  166.   In Windows 3.x you can use Terminal (in Accessories).  In Windows 95
  167.   and OS/2 Warp, HyperTerminal can be used, or you can use any other
  168.   "terminal emulator" package with some level of embedded Kermit file
  169.   transfer capability.
  170.  
  171.  
  172.   However, the most complete functionality is available with full
  173.   Kermit, which can be downloaded from  <ftp://kermit.columbia.edu/> or
  174.   HP.  Columbia University is the original site for Kermit and has
  175.   versions for nearly all operating systems, including all forms of
  176.   Unix, Amiga, and Macintosh.
  177.  
  178.   Of course if you have a G/GX machine you can use X-Modem instead of
  179.   Kermit (X-Modem is generally faster).  [Hyper]Terminal works fine for
  180.   X-Modem as well.  Alternative file transfer software is available from
  181.   the FTP sites mentionned in the Appendix, or can be purchased (e.g.
  182.   Donnelly's HP48 File Manager).
  183.  
  184.   Also of interest are several freeware/shareware programs, including
  185.   the HP48 Explorer for use with Windows 95.  This can be obtained at
  186.   <http://members.tripod.com/~nberry/hp48g/index.html>.
  187.  
  188.  
  189.   6.7.  Why doesn't the I/R port work farther than a few inches?
  190.  
  191.   It turns out that it is the receiver that is "crippled".  The transmit
  192.   range is somewhere around several feet, and some people have actually
  193.   written programs to make the HP48 emulate some remote controls (see
  194.   Appendix E-1 for suggested programs).
  195.  
  196.   There are currently two stories going around as to why.  I will
  197.   present both of them in the interest showing all sides of the story.
  198.   You are free to decide which you believe:
  199.  
  200.   1. The head of the HP48 design team, Dr. William Wickes himself,
  201.      alluded during the Chicago Handheld Conference that the IR was
  202.      intentionally crippled due to the concerns of certain individuals
  203.      in academia that students could literally 'beam' information from
  204.      one 48 to another during examinations. (from Rick Grevelle)
  205.  
  206.   2. The reason the IR reception distance is so short is battery
  207.      capacity.  The Infrared Transmitter is semaphore: It is only turned
  208.      on when it needs to be on, and the transmission protocol is defined
  209.      to minimize the ON time.  The receiver, by contrast, must be on
  210.      continually when a transmission is in process, or when a
  211.      transmission is expected. If you set your HP48 to Server mode, that
  212.      receiver is drawing power. If you tweak the control bits to
  213.      activate the receiver for any other reason, it is drawing power.
  214.      The instantaneous peak power drawn by the transmitter is much
  215.      higher than that of the receiver.  But in the long run, the
  216.      receiver will draw more energy from the batteries.  Increasing the
  217.      receiver sensitivity costs even more power.
  218.  
  219.  
  220.   6.8.  Can my HP48 talk to my HP100LX via Infrared?
  221.  
  222.   Yes, it can, although slowly.  Set the HP100LX at 2400 bps, and put it
  223.   in server mode (under the Kermit Commands menu).  Then you can send
  224.   stuff from your HP48 to your HP100LX.
  225.  
  226.  
  227.   6.9.  Can I use my HP48 to communicate with IrDA devices?
  228.  
  229.   From: David Johnson
  230.  
  231.   I have had great success communicating via IR with my HP48 GX rev. R
  232.   and a NEC Versa 6050MH notebook PC.  However, I have found that speed
  233.   is limited to 2400 bps.  I have successfully used IR communication
  234.   under Win95 with DOS Kermit 3.14, HyperTerminal, HP48 Explorer, Yellow
  235.   Computing Transfile Win 48, and Kermit v0.85 (Win32).
  236.  
  237.  
  238.   I have had no success with Grab48 screen capture by HP or with HP PDL
  239.   (only because I can't use a port higher than COM2).  In my case DOS
  240.   Kermit requires a command like:
  241.  
  242.  
  243.        set com3 \x03E8 \9     ; Syntax for nonstandard address or irq
  244.  
  245.  
  246.   Which is the port and IRQ specified in my BIOS setup.  It doesn't seem
  247.   to matter what IR speed I choose in the BIOS setup.  However, in all
  248.   cases (even native Win95 applications) I must disable the IR drivers
  249.   in Win95 and talk straight to the port/IRQ specified in the BIOS.  I
  250.   can easily turn IR support on and off within a Win95 session with no
  251.   ill effects via the control panel.
  252.  
  253.   Note that the HP48 is not actually IrDA compatible, but communicates
  254.   with IR devices in non-IrDA mode.
  255.  
  256.  
  257.   6.10.  Can I print to a LaserJet printer with an HP48?
  258.  
  259.   From: Derrik Pates
  260.  
  261.   Yes you can, but you need the HP PCL library from
  262.   <http://www.hpcalc.org/utils/misc/pcl.zip>.  It allows you to
  263.   communicate with any printer that supports PCL (all HP DeskJets and
  264.   LaserJets, as well as some other laser printers and inkjet printers).
  265.   You can hot-switch your resolution and turn PCL on/off with software
  266.   commands.
  267.  
  268.   Although newer HP printers such as the 5P and 5MP have an IR port, you
  269.   cannot use it to print directly from your HP48.
  270.  
  271.  
  272.   6.11.  I downloaded a program but all I get is "HPHP48-..."!
  273.  
  274.   Some versions of Kermit distinguish between ASCII and binary files,
  275.   and so you have to worry about the transfer modes at both ends of the
  276.   connection (the HP48 SX end and the computer end).  For example, when
  277.   receiving ASCII files, Unix Kermit must translate CR/LF pairs into LF.
  278.   If the HP48 SX is transmitting a binary file, but the Unix Kermit is
  279.   expecting ASCII, any CR/LF pairs in the binary file will get
  280.   translated to LF, corrupting the binary file.  Unfortunately, you
  281.   cannot "uncorrupt" the corrupted binary file by simply reversing the
  282.   transfer and expecting Kermit to translate LF to CR/LF.  This is
  283.   because the binary file may contain occurrences of LF that were not
  284.   originally part of a CR/LF sequence.
  285.  
  286.   When a binary file gets corrupted, it will display on the stack as a
  287.   string, starting with the characters "HPHP48-", and continuing on with
  288.   a bunch of garbage.  Thanks to two programs, these strings can be
  289.   reconverted to binary files right on the HP48.  These programs are:
  290.   FIXIT, by Joe Horn and Mika Heiskanen, or OBJFIX, written by our
  291.   friends at HP.  These are included in Appendix A-2.
  292.  
  293.   The major difference between FIXIT and OBJFIX is the way they operate.
  294.   I have never personally had any problems with either.  FIXIT takes the
  295.   bad "HPHP48-" string from level 1 of the stack, and replaces it with
  296.   the correct binary object.  OBJFIX takes the name of the variable in
  297.   which the "HPHP48-" string is stored from level 1 of the stack, and
  298.   puts the correct binary object directly in the variable where the bad
  299.   string was stored.  It's up to you which you prefer.  I would suggest
  300.   reading the documentation of both before using either of them.
  301.   There is also a quick fix available from Dan Kirkland:
  302.  
  303.   Here is a simple SYSEVAL program that will return a pointer to the
  304.   object in those data transfer strings that start with "HPHP48-"
  305.  
  306.   Checksum: # 8FEh
  307.  
  308.  
  309.        << "12" SWAP + # 402Bh SYSEVAL # 62B9Ch SYSEVAL >>
  310.  
  311.  
  312.   That's all!  (Simple huh!)  Name?  Whatever you want!!  Works on all
  313.   48s (S/SX, G/GX)
  314.  
  315.  
  316.   6.12.  What is the structure of HP48 ASCII headers?
  317.  
  318.   From: Jorge Costa
  319.  
  320.   ASCII file headers such as %HPHP: T(3)A(D)F(.); are created by the
  321.   HP48 when an ASCII file is sent to the PC and read when a HP48 ASCII
  322.   file is received from the PC.  They serve to preserve various settings
  323.   on your HP that affect ASCII transfers.  They do not affect binary
  324.   mode transfers.
  325.  
  326.   Three parameters are saved: (T)ranslation Mechanism, (A)ngle Mode, and
  327.   (F)raction Mark.
  328.  
  329.  
  330.      Translation Mechanism:
  331.         The possible ASCII translation schemes are as follows:
  332.  
  333.  
  334.           T   HP48 -> PC                  PC -> HP48
  335.           ---------------------------------------------------------
  336.           0   No translation              No translation
  337.  
  338.           1   char 10 -> chars 10,13      chars 10,13 -> char 10
  339.  
  340.           2   Action 1 & translate        Action 1 & translate
  341.               chars 128 - 159             \000 - \159 to HP48 chars
  342.  
  343.           3   Action 1 & translate        Action 1 and translate
  344.               chars 128 - 255             \000 - \255 to HP48 chars
  345.  
  346.  
  347.      To choose your favorite set, just type the number followed by the
  348.      command TRANSIO on the HP48 command line.  Depending on which
  349.      translation scheme you are using, the HP48 converts a different set
  350.      of characters to PC ASCII format.  I would advise using option 3,
  351.      since this forces the calculator to translate all symbols to pure
  352.      ASCII (look for the table in page 27 - 16 of the HP48G series
  353.      user's guide).  If you choose to use option 0 or 1, all characters
  354.      from code 128 to 255 would be interpreted following the current
  355.      code page of the PC setup - it will be unreadable!
  356.  
  357.      Also, if you are receiving ASCII files in your machine and you get
  358.      a bunch of black squares, you can be fairly certain you are using
  359.      translation mode 0, which makes the HP receive and store all
  360.      newline characters (instead of eliminating them).
  361.      Angle Mode:
  362.  
  363.      o  A(D) stands for degrees.
  364.  
  365.      o  A(R) stands for radians.
  366.  
  367.      o  A(G) stands for gradians.
  368.  
  369.  
  370.      Fraction Mark:
  371.         The HP48 can handle two types of fractions marks - the decimal
  372.         dot or comma.  This option is available from the MODES input
  373.         form (48G/GX) or menu 64.01.
  374.  
  375.         With regards to the ASCII header we have:
  376.  
  377.      o  F(.) means the format is dot.
  378.  
  379.      o  F(,) means the format is comma.
  380.  
  381.         If you try manually editing an ASCII file on the PC without a
  382.         header, then try to send it to the HP48 using Kermit, you can
  383.         obtain the following results:
  384.  
  385.  
  386.           Number format     Text sent       Result (object stored)
  387.                .               3.4             3.4
  388.                .               3,4             3 4
  389.                ,               3.4             3 4
  390.                ,               3,4             3,4
  391.  
  392.  
  393.      As you would expect, sending files with ASCII headers to the HP48
  394.      with mismatching fraction mark settings, leads to an "Invalid
  395.      Syntax" error during transfer.
  396.  
  397.      Now take a look at rows 2 and 3 of the table above - the object
  398.      received by the HP48 is stored as a program object without the <<
  399.      and >> composed by two real numbers - well, that normally can't be
  400.      done in User RPL!
  401.  
  402.      In fact the resulting object is a very simple System RPL program
  403.      object (the internal language of the HP48).  The conclusion is that
  404.      when a file is sent without an ASCII header, the HP48 translates
  405.      numbers with mismatching formats into System RPL secondaries
  406.      (programs) of the form:
  407.  
  408.  
  409.           :: %IntegerPart %FractionalPart ;
  410.  
  411.  
  412.   6.13.  Why do Kermit transfers seem to get slower?
  413.  
  414.   From: Dan Kirkland
  415.  
  416.   The reason the HP48 Kermit routines are so slow is because they are
  417.   written in System RPL.  Everytime the HP48 receives a packet (received
  418.   as a string), it copies the previously received packets (string #1)
  419.   and the new packet (string #2) to a new string (which becomes string
  420.   #1 when the next packet is received).  This is why the HP48 Kermit
  421.   gets slower and slower on big transfers (string #1 just keeps getting
  422.   bigger).
  423.  
  424.   As to sliding windows...  Sliding windows really don't help much with
  425.   a clean, lag-free connection.  And as most people connect their HP48
  426.   directly to the computer they are transfering to/from with a very
  427.   short line, it is almost always very clean and lag-free.  So, sliding
  428.   windows have very little to offer HP48 transfers.
  429.  
  430.   Yes, properly written Kermit routines should be at least as good as
  431.   ZModem, even without sliding windows.  And with a dirty, lagged
  432.   connection, Kermit with sliding windows will blow ZModem away.  But
  433.   then, this just doesn't happen very often with HP48 connections.
  434.  
  435.   Some claim that the HP48 can't do ZModem without tons of trickery
  436.   because it doesn't have a large enough input buffer.  While this is
  437.   true, it shouldn't be too hard to do.  And the same is true for Kermit
  438.   if it is going to get ZModem type speed!  Small packets are more
  439.   reliable, but much bigger packets are needed for speed.
  440.  
  441.  
  442.   6.14.  Why does XRECV not work sometimes? (GX)
  443.  
  444.   Pre-Rev R. G Series 48's had a bug that would sometimes cause XRECV to
  445.   fail if there was not twice the amount of room free for the incoming
  446.   file. FXRECV, a fix for this bug, is available on the Horn 9 disk in
  447.   the directory \HP as FXRECV.  There is more info about this bug there
  448.   as well.   Note that FXRECV is not required for Rom R, and in fact
  449.   will not run properly on Rom R.
  450.  
  451.  
  452.   6.15.  Additional Tips on Transfers
  453.  
  454.   To use the least memory when doing transfers, it is a good idea to use
  455.   the built-in "Transfer..." application only to set parameters (Wire,
  456.   Baud, etc...)  but not to actually start a transfer with it; instead,
  457.   press ENTER, then do either left-shift RECV (Kermit) or 0 FXRECV
  458.   (Modified X-Modem).  Avoiding the fancy "dialog box" application
  459.   leaves more memory free at the time of actual transfer.
  460.  
  461.   For best quick-start of a transfer, start the Kermit receive side
  462.   before the transmit side.  For X-Modem the opposite is true: start the
  463.   transmit side before the receive side (with only a short interval
  464.   between each side's start).  Experiment a bit to find out what works
  465.   best for you.
  466.  
  467.   Here is a small program for Kermit that lets you receive directly to a
  468.   port:
  469.  
  470.  
  471.        \<< -36 SF 1 \-> a \<< 'a' RECN a \>> SWAP STO \>>
  472.  
  473.  
  474.   For the argument use either just a number (if receiving a library) or
  475.   a port-tagged name such as :0: name (for other objects, and in fact
  476.   for libraries as well, but only the port number is used).
  477.  
  478.   This program may be simpler to follow than the User's Guide directions
  479.   for installing a library, since it encapsulates the several steps of
  480.   storing in memory, recalling to stack, purging the variable, and
  481.   finally storing to a port.  Even if you forget to supply the portname
  482.   argument, the received object will still appear on the stack (provided
  483.   flag -55 is clear), and you can finish storing it afterwards.
  484.  
  485.  
  486.   6.16.  What do the funny symbols in this document mean?
  487.  
  488.   The symbols in this document such as \-> and \GS+ are the ASCII
  489.   representation of the special HP48 graphical characters.  See the
  490.   section "Character Translations" in the manual for a complete table of
  491.   symbols <--> ASCII representations.
  492.  
  493.  
  494.      SX:
  495.         Chapter 33 (Volume II if 2 volumes)
  496.  
  497.      GX:
  498.         Page 27-16 HP48 G Series User's Guide
  499.  
  500.  
  501.   6.17.  What are the pinouts for the HP48 serial connector?
  502.  
  503.   Looking at the pins of the HP48 (the following diagram is showing the
  504.   pins on the HP48, as you look at the calculator):
  505.  
  506.  
  507.                       _________
  508.                      | o o o o |
  509.                       \_______/
  510.                        ^ ^ ^ ^
  511.                        | | | \------ 4 Signal GND
  512.                        | | \-------- 3 RX (input to the HP48)
  513.                        | \---------- 2 TX (output from the HP48)
  514.                        \------------ 1 SHIELD
  515.  
  516.        Stated another way:
  517.  
  518.            HP48                    IBM 9 PIN               IBM 25 PIN
  519.            (From the outside
  520.             edge -> inward)
  521.            SHIELD-------------------  SHIELD----------------  SHIELD
  522.            TX (Output)<-------------2 RX (Input)------------3 RX (Input)
  523.            RX (Input)-------------->3 TX (Output)---------->2 TX (Output)
  524.            SGND---------------------5 GND-------------------7 GND
  525.  
  526.  
  527.   This information is also on page 27-7 of the G/GX manual.
  528.  
  529.  
  530.   6.18.  Is there any information on interfacing to the HP48?
  531.  
  532.   HP has made available an UNSUPPORTED document called the "HP48 I/O
  533.   Technical Interfacing Guide", which contains information on the wired
  534.   and serial I/O hardware.  Another HP document available is the "HP48
  535.   I/O Software Interfacing Guide".  Also, there are a number of guides
  536.   contributed by users on making your own serial/IR hardware.
  537.  
  538.   Look at  <http://www.hpcalc.org/docs/programming/> as well as the ftp
  539.   sites listed in the Appendix.  If you find a good document, let me
  540.   know so I can put it here!
  541.  
  542.  
  543.   6.19.  How can I transfer programs/data from my HP-28S to my HP48?
  544.  
  545.   You use a program called "INPRT", which is available on GD #9.  Any
  546.   previous version will crash the GX.  The new version's checksum is
  547.   #EDF3h, and the old, SX-only version's checksum is #2280h.
  548.  
  549.   For each program that you want to transfer, you use the HP 28S to
  550.   print it to the I/R output; INPRT, running on the HP48, reads the I/R
  551.   output of the HP 28S and converts it into a program string.
  552.  
  553.  
  554.   6.20.  Can I use rechargeable batteries with the HP48?
  555.  
  556.   The Rayovac "Renewal" batteries have proven themselves to be reliable
  557.   in the HP48, but there are some problems with Nickel Cadmium (Ni-Cad)
  558.   batteries.   You'll have to decide if using rechargeable batteries is
  559.   worth putting up with the problems associated with them:
  560.  
  561.  
  562.   o  You'll have to change batteries more often with rechargeable
  563.      batteries.  Alkaline batteries can deliver power for a longer
  564.      period of time, compared to rechargeable batteries.
  565.  
  566.   o  Once the low-battery indicator comes on, you'll have to change the
  567.      rechargeable batteries pretty quickly.  With rechargeable
  568.      batteries, you have only a few minutes before the calculator dies
  569.      (it's been said that you have up to 15 minutes or so).  With
  570.      alkaline batteries, you have an amount of time that is supposedly
  571.      measured in hours.
  572.  
  573.   o  Ni-Cad batteries lose their charge with time, even if you are not
  574.      using them.  Even if a Ni-Cad battery is just sitting unused on a
  575.      shelf, it slowly loses its charge.  Alkaline batteries keep their
  576.      charge for a very long time.
  577.  
  578.  
  579.   6.21.  How can I tell, from within a program, if the battery is low?
  580.  
  581.   The following 48 program reports the status of the ALERT annunciator.
  582.   The ALERT annunciator is activated by alarms or low battery.
  583.  
  584.   This program is provided free of charge "as is" and has no warranty.
  585.   No one is liable for any consequential damages.  Preston
  586.  
  587.  
  588.        %%HP:T(3)A(D)F(.);
  589.        \<<
  590.        RCLF
  591.        8 STWS #FFh #0h +
  592.        #10Bh
  593.        #6595Ah SYSEVAL
  594.        #8h AND #0h >
  595.        SWAP STOF
  596.        \>>
  597.  
  598.  
  599.   6.22.  I lost the information on my RAM Card when I changed the bat-
  600.   tery!
  601.  
  602.   You forgot to turn ON the calculator before changing the battery.  The
  603.   HP only supplies power to the RAM card while the HP is turned on.
  604.   While the calculator is turned off, no power is supplied by the
  605.   calculator, and all power comes from the RAM card battery.  If you
  606.   then take out the battery from the RAM card while the calculator is
  607.   turned OFF, the RAM card has no source of power, and you will lose all
  608.   of the contents in the RAM card.
  609.  
  610.  
  611.   6.23.  Why do I get an "Invalid card data" error when I merge a RAM
  612.   card?
  613.  
  614.   This message is usually seen when you plug a brand-new RAM card into
  615.   an HP48.  In this case, this message is normal and is harmless.  It
  616.   just means that there was no (valid) data on the card.
  617.  
  618.  
  619.      GX:
  620.         This message can appear when a RAM card contains ports you have
  621.         never used.  Press purple/left shift-LIBRARY. Hit NXT, then the
  622.         PINIT softkey.  This will initialize all available RAM ports.
  623.         It does not affect data already stored on the card.
  624.  
  625.         If you see this message under any other conditions, it could be
  626.         one of the following:
  627.  
  628.  
  629.         1. You took the battery out of the RAM card while the card was
  630.            out of the calculator, therefore erasing the memory.
  631.  
  632.         2. You took the battery out of the RAM card while the card was
  633.            in the calculator BUT the calculator was turned off.  Note
  634.            that the calculator supplies power to the RAM card ONLY when
  635.            the calculator is turned ON.  Again the memory on the card is
  636.            gone.
  637.  
  638.         3. The RAM card battery is dead.
  639.  
  640.         4. There is a problem with either the calculator, the RAM card,
  641.            or both.
  642.  
  643.         If the battery is operational, then try to store something on
  644.         the card.  If you still get the error message, then backup all
  645.         your info to a computer or another 48, and do a hardware reset.
  646.  
  647.  
  648.   6.24.  I've heard about other manufacturer's RAM cards.  Will they
  649.   work?
  650.  
  651.   While some cards may work, there is a chance that you may severely
  652.   damage your HP48.  You should only use cards specifically designed for
  653.   the HP48.  Naturally, HP sells such cards, and some third parties also
  654.   make cards that will work in an HP48.  Some cards work with both the
  655.   S/SX and the G/GX.  Some, however only work on the S/SX, or only on
  656.   the G/GX.  Make sure that the card is designed to work for your
  657.   version before using it.
  658.  
  659.      SX:
  660.         The S/SX can only naturally support up to 128K per port.  HP
  661.         sells 32K and 128K RAM cards.   However, TDS, using software
  662.         "bank switches" produces 256K and 512K RAM cards.  These bank
  663.         switching cards do not work in the G/GX series.  CMT also makes
  664.         128K cards, which work in all HP48 calculators.
  665.  
  666.      GX:
  667.         While you cannot use the TDS 256K and 512K cards, Sparcom has
  668.         come out with 256K and 512K cards for the G/GX only.  HP also
  669.         sells 1MB RAM cards that work for G/GX only.  The G/GX is able
  670.         to accept a 4MB RAM card, but none are on the market at this
  671.         time.
  672.  
  673.  
  674.   6.25.  How does RAM card locking work?
  675.  
  676.   From: Dave Arnett
  677.  
  678.   The HP48SX had three layers of write protection:
  679.  
  680.  
  681.   o  The Seiko-Epson memory cards contain write protection.  Seiko-Epson
  682.      is the OEM manufacturer for HP brand cards.  They developed the
  683.      format, connector and pin definitions for the memory card
  684.      interface.  We have a slightly modified version of their standard
  685.      card where the low battery alarm limits are changed slightly.
  686.  
  687.      On an HP-branded RAM card, if you move the write-protect switch to
  688.      the Protect position, two things happen.  First, the card itself
  689.      ignores write cycles.  This is the first layer of defense for data
  690.      integrity.  The card also changes the voltage level of one of its
  691.      output pins to tell the HP that it is write-protected.
  692.  
  693.   o  The HP CPU chip detects the write protect indicator line of the
  694.      card.  If it is reporting as unwriteable, the hardware locks out
  695.      write functionality from the CPU chip.  This is the second layer of
  696.      defense.  If this Card Detect line reports as writeable, then write
  697.      transactions are permitted in hardware.  If the Card Detect line
  698.      floats, the hardware reports that no card is installed.
  699.  
  700.   o  The HP system firmware checks the status of the write protection
  701.      bits before writing to a memory card.  If the status bits indicate
  702.      that the card is unwriteable (ROM or protected RAM), then the
  703.      system code refuses to write to the card.
  704.  
  705.   In developing the HP48GX, we changed card handling in some significant
  706.   respects.  I have recently posted information to the newsgroup on how
  707.   the upper half of ROM and the card slot 2 are controlled through one
  708.   pin of the Yorke CPU IC in a multiplexed fashion.  There are some
  709.   details about the Yorke chip related to how various Saturn Bus deviced
  710.   configure and unconfigure which required me to make the following
  711.   hardware assignment changes:
  712.  
  713.  
  714.        Hardware Resource            HP48SX            HP48GX
  715.  
  716.        CE1- Card Controller 1       Card 1            Bank Select Controller
  717.        CE2- Card Controller 2       Card 2            Card 1
  718.        CE3- Card Controller 3       Unused            Card 2
  719.  
  720.        CDT1- Card Detect 1          Card 1            Card 2
  721.        CDT2- Card Detect 2          Card 2            Card 1
  722.  
  723.  
  724.   Clearly, we had to assign Card Controllers and Card Detects in pairs,
  725.   as much as possible.  Otherwise the hardware lockout would make a mess
  726.   of things.
  727.  
  728.   A write protected RAM card in GX slot 1 has hardware lockout
  729.   protection, since CDT2 can lock write actions to CE2.
  730.  
  731.   A write protected RAM card in GX slot 2 does not have the same HP
  732.   hardware protection.  CDT1 is hardware coupled to CE1, which drives
  733.   the Bank Select Controller.  Some may have wondered in my recent posts
  734.   why the protocol for setting up bank settings uses READ operations
  735.   rather than WRITE operations.  Now you know:  A WRITE operation to the
  736.   Bank Select Controller would be ineffective if a ROM or Write-
  737.   Protected RAM card is in Slot 2!
  738.  
  739.   The closest approximation to hardware write protection lies in the BEN
  740.   (Bank Enable) line, which is bit 6 of the Bank setting.  Unless BE is
  741.   set high, all attempts to access slot 2 are forbidden.  BEN is pin 10
  742.   of the 74HC174 chip.  This line goes to pin 5 of the NAND chip to
  743.   prevent Card Pin 21 from going active.
  744.  
  745.   The protocol in the HP48GX RPL Opertaing System implementation is to
  746.   always leave BEN low, unless slot 2 activity is needed.  BEN should be
  747.   set low again after card access is complete.
  748.  
  749.   So an HP48GX has three levels of card write protection as well:
  750.  
  751.  
  752.   o  The card should prohibit Write activity if the protection switch is
  753.      set.
  754.  
  755.   o  Slot 1 has the same hardware lockout as in the SX.  Slot 2 has a
  756.      multi-step process necessary to enable access.
  757.  
  758.   o  The RPL system code checks the write-protect status before writing
  759.      to a card.  It understands that CDT1 and CE3 map to card 2.
  760.  
  761.  
  762.   6.26.  What are the advantages and disadvantages of covered ports?
  763.   (GX)
  764.  
  765.   Covered ports are created when a card is placed in slot 2 of the GX,
  766.   that is all ports >= 2.  The advantage of this is very large RAM cards
  767.   are possible: 256K, 512K, etc... up to 4 MB.  Cards larger than 128K
  768.   are split into multiple ports of 128K each controlled by a bank
  769.   switching mechanism.
  770.  
  771.   The disadvantages are that the memory cannot be merged with user
  772.   memory (even if only a 128K card is used).  Furthermore, some programs
  773.   may be sensitive to the bank switching in covered ports, and may run
  774.   slightly slower, improperly, or simply refuse to run at all.  In
  775.   particular, many of the freeware programs written in machine language
  776.   are affected.  Some contain special code to allow them to execute from
  777.   both covered and standard ports.
  778.  
  779.  
  780.   6.27.  Why does the HP48 display flicker slightly?
  781.  
  782.   Display flicker is usually caused by fluorescent lights.  The rapid
  783.   pulsing of the fluorescent lights (60 Hz in the the U.S. and Canada),
  784.   which is normally unnoticeable, interacts with the rapid
  785.   pulsing/scanning of the HP48 LCD display (64 Hz refresh rate), which
  786.   is also normally unnoticeable.  The 60 Hz fluorescent lights alias
  787.   with the display refresh (64 Hz) to produce a 4 Hz "flicker".  It's
  788.   normal and harmless.
  789.  
  790.   Outside the U.S. and Canada, power is supplied at a 50 Hz rate, not 60
  791.   Hz.  This means that the display "flickers" at a 14 Hz rate, which is
  792.   still noticeable.
  793.  
  794.  
  795.   6.28.  I broke the LCD screen - is there an easy way to get another?
  796.  
  797.   Unfortunately, as far as I am aware, you cannot get a replacement, the
  798.   cheapest alternative is to send the calc in for "standard service" at
  799.   HP, which is slightly cheaper than a new calculator.  Opening an HP48
  800.   is quite difficult anyway.
  801.  
  802.  
  803.   6.29.  How can I protect my LCD?
  804.  
  805.   There are many ways to protect the HP48's LCD.  The solutions include:
  806.  
  807.  
  808.   o  Inserting a piece of cardboard into the case.
  809.  
  810.   o  Cutting plexi-glass and putting it into the case (slightly better
  811.      than cardboard).  A piece of plastic cut out of a CD jewel case
  812.      works too.
  813.  
  814.   o  Even better than plexiglass (because it's really unbreakable and
  815.      will resist any twisting) is an electronic circuit board as used
  816.      for computer mainboards etc... which should be available in any
  817.      electronics shop.  Another advantage to this method is the possible
  818.      electrical shielding you get if there is a thin film of copper on
  819.      one or both sides.  I would recommend a board with the copper on
  820.      one side only - on the side pointing to the outer side of the HP's
  821.      soft case.  After sawing it to the dimensions 79.5 mm x 179 mm x
  822.      1.25 mm and rounding the four corners (radius 4 mm), it will fit
  823.      perfectly in the inner sleeve of the HP48's soft case and can also
  824.      be used to hold a self-adhesive label with the owner's name.  The
  825.      small messages booklet will still fit, but it is better to store it
  826.      on the outer side of the board so that the circuit board and the
  827.      calculator will still fit together as tightly as possible
  828.      (otherwise the booklet may break the LCD).
  829.  
  830.   o  Buying a hard case.  A variety of types are available, including a
  831.      hard leather case or a totally waterproof case.
  832.  
  833.   o  Keeping it in a video cassette or pencil case during transport.
  834.  
  835.   o  Using the cover from an old TI-8x calculator and fitting it into
  836.      the grooves on the side of the HP48.  Some people have had some
  837.      success with this, but I find it barely fits.
  838.  
  839.  
  840.   6.30.  Is there a rigid (protective) case for the HP48?
  841.  
  842.   An inexpensive solution to this is to go to Sears and get a Black
  843.   Plastic Tool Box #9 65283 in the hardware deptartment.  It sells for
  844.   only US $4.95.  The case is big enough for the calculator in its case,
  845.   plus extra batteries.
  846.  
  847.   The case is a good fit for the calculator.  If you want to go a step
  848.   further, you can get some foam, glue it into the top and bottom halves
  849.   of the case, and cut out a calculator shaped hole in the bottom.  The
  850.   result is lightweight, strong, secure and still leaves a little room
  851.   for you to store extra batteries, a cable, and/or cards for your
  852.   ports.  Another solution is to use a cheque book as a case.  Some
  853.   cheque books just happen to fit the HP48, and provide a fair amount of
  854.   protection.
  855.  
  856.   The final alternative is to purchase a case.  Eric Finley
  857.   <etfinley@ucdavis.edu> sells protective hard cases for the HP48.  They
  858.   are stainless steel, very strong, and look nice.  The cost is US $30.
  859.   For more information, either e-mail Eric or check his web page at
  860.   <http://www.ece.ucdavis.edu/~etfinley/>.
  861.  
  862.  
  863.   6.31.  Can I use my Amateur Radio with my HP48?
  864.  
  865.   Yes, however you need to have a few things, the first being an amateur
  866.   radio license.  The next thing you need is a terminal node controller.
  867.   If you are able to, get a terminal node controller that supports XON
  868.   and XOFF software flow control.  This is good to have because the HP48
  869.   only has a 256 character buffer.  When the buffer is full, the HP48
  870.   sends the "buffer full" signal and a terminal node controller with
  871.   software flow control can quit sending data until the HP48 can keep
  872.   new data in the buffer.  If you don't have a terminal node controller
  873.   with software flow control, you can still use it, but you may lose
  874.   some data.
  875.  
  876.   The next thing you will want is some software to use with the terminal
  877.   node controller.  You could make your own software using user-rpl
  878.   commands such as BUFLEN, SRECV, and XMIT.  However, there is a
  879.   plethora of software available.  All you need is software then can
  880.   send and receive data from the serial port.  There are several
  881.   programs at  <http://www.hpcalc.org/utils/comms/terminal/> that you
  882.   might like to try.
  883.  
  884.   There is also a site that has a lot of hp48 programs relating to ham
  885.   radio.  Connect to  <ftp://oak.oakland.edu/pub/hamradio/hp48/> Please
  886.   inform the FAQ maintainer if you find additional software, so it can
  887.   be added to this list.
  888.  
  889.  
  890.   7.  Questions about programs
  891.  
  892.   7.1.  Where can I get programs and information for the HP48?
  893.  
  894.   See Appendix E-1 for more info.
  895.  
  896.  
  897.   7.2.  What are the Goodies Disks and where do I get them?
  898.  
  899.   See Appendix E-5 for more info.
  900.  
  901.  
  902.   7.3.  How do I get access to the HP Calculator BBS?
  903.  
  904.   You can also access the BBS online at
  905.   <ftp://ftp.hp.com/pub/calculators/>
  906.  
  907.   You can also access the HP Calculator BBS via a modem (note that this
  908.   is a long distance call for most people):
  909.  
  910.  
  911.        (208)-344-1691          2400 bps, 8N1
  912.        (541)-715-3277          9600 bps, 8N1
  913.  
  914.  
  915.   See Appendix E-4 for more BBS sites.
  916.  
  917.  
  918.   7.4.  What are files that end with ".zip", ".Z", ".gz", or ".bz2"?
  919.  
  920.  
  921.      zip
  922.         Files that end with ".zip" are pkzip archives, which originated
  923.         in the MSDOS world.  One program that can extract the files in
  924.         ".zip" archives is the InfoZip "unzip" program.
  925.  
  926.         Binaries and source can be found at
  927.         <http://www.cdrom.com/pub/infozip/>
  928.  
  929.  
  930.      gzip
  931.         Files that end with ".gz" have been compressed using the "gzip"
  932.         compression command.  To uncompress these files, you must use
  933.         either the "gunzip" or "gzip -d" command.  The "gunzip" program
  934.         can also uncompress ".Z" files.  Binaries should be on all Unix
  935.         systems, but if not you can try <ftp://ftp.gnu.org/pub/gnu/>
  936.  
  937.         More information should be there on binaries for other
  938.         platforms.
  939.  
  940.  
  941.      compress
  942.         Files that end with ".Z" have been compressed using the Unix
  943.         "compress" command.  To uncompress these files, you can use the
  944.         "uncompress" command on Unix.  The "gunzip" program can also
  945.         decompress these files.
  946.  
  947.  
  948.      bzip2
  949.         Another compression program gaining popularity is bzip2.  bzip2
  950.         is a freely available, patent free, high-quality data
  951.         compressor.  It typically compresses files to within 10% to 15%
  952.         of the best available techniques, whilst being around twice as
  953.         fast at compression and six times faster at decompression.
  954.  
  955.         Source and binaries for common platforms are available at
  956.         <http://www.muraroa.demon.co.uk/>
  957.  
  958.  
  959.   7.5.  What is a "ship" file?
  960.  
  961.   In the past, programs for the HP48 posted on comp.sources.hp48 were
  962.   posted in the "ship" format.  This format made it easier for the
  963.   moderator to distribute programs, but made it more difficult for users
  964.   to extract and use these programs.  Some people still use ship.
  965.  
  966.   To extract programs distributed in the "ship" format, you need the
  967.   following:
  968.  
  969.  
  970.   1. A copy of the "ship" program, compiled for your platform.
  971.  
  972.   o  Sources for ship can be found at
  973.      <ftp://ftp.cis.com/pub/hp48g/dos/unship.zip> which also includes
  974.      the DOS executable.
  975.  
  976.   o  Binaries for other platforms can be also be found at
  977.      <ftp://wuarchive.wustl.edu/systems/hp/hp48/Posting/>
  978.  
  979.   2. A copy of the latest InfoZip "unzip" program or an unarchiver that
  980.      understands the pkunzip v2.04g format.  Note that you cannot use
  981.      older unzip programs, as old unzip programs do not understand the
  982.      new compression formats.  See the previous section for information
  983.      on where to get source and binaries.
  984.  
  985.   Once you have a copy of the "ship" and "unzip" programs, you use
  986.   "ship" to convert the ship-encoded file into a .zip file, and you use
  987.   the "unzip" program to extract the HP48 files from the ".zip" file.
  988.  
  989.  
  990.   7.6.  What is the ASC format and how can I use it?
  991.  
  992.   The functions ASC\-> and \->ASC were written by William Wickes to
  993.   facilitate transferring HP48 binary objects in an ASCII format (useful
  994.   when transferring objects via electronic mail or bulletin boards).
  995.   Some HP48 objects, like libraries, cannot normally be converted into
  996.   ASCII, unlike program objects, and these functions make it possible to
  997.   do so.
  998.  
  999.   The \->ASC function converts the object in level 1 into an ASCII
  1000.   string, which can then be uploaded to a computer for mailing.
  1001.  
  1002.   The ASC\-> function converts the string object in level 1 back into an
  1003.   object.  A checksum is used to ensure that the decoding is correct.
  1004.  
  1005.   A copy of these programs are given in Appendix A-1, near the end of
  1006.   this file.  Note however, that these functions aren't used much
  1007.   anymore.  The standard in the newsgroup seems to first zip the
  1008.   programs together and post them uuencoded.  But, you may still need
  1009.   these utilities for extracting older files you download.
  1010.  
  1011.  
  1012.   7.7.  What is the HYDE library, and how do I get rid of it?
  1013.  
  1014.   The HYDE library is a library that changes the messages on your HP48.
  1015.   It works on all versions of the HP48 and is available on Goodies Disk
  1016.   2.  The program (HYDE.TXT) is in the DNICKEL directory needs to be
  1017.   converted with ASC\->.  The instructions (HYDE.DOC) for the program
  1018.   are in the HORN2 directory.  The library is 3679.5 bytes, small enough
  1019.   to keep on your HP48 so you can install it on a friend's when they're
  1020.   not looking.
  1021.  
  1022.   Follow the previous instructions for installing the library, then go
  1023.   to the library menu and run HYDE.
  1024.  
  1025.   However, getting rid of the HYDE library is a little trickier.  First
  1026.   you must type JEKY on the command line.  This will disable the HYDE
  1027.   library and restore the standard set of messages.  Then you can follow
  1028.   the normal instructions for deleting a library.
  1029.  
  1030.  
  1031.   7.8.  What is the Minehunt game, and how do I use it?
  1032.  
  1033.   The Minehunt game is a game built in to the G/GX.  It was also
  1034.   included on the HP Equation-Library Card (for the HP48 SX).
  1035.  
  1036.      GX:
  1037.         It is located in the UTILS menu of the left-shift(purple) EQ LIB
  1038.         menu.  (Left-Shift {EQ LIB], {UTILS}, {MINEHUNT}).  See page
  1039.         25-14 of the manual for a game explanation and picture.
  1040.  
  1041.      SX:
  1042.         It is located in the UTILS library.
  1043.  
  1044.   You can save a game by pressing the STO button. This creates a
  1045.   variable with the name MHpar. If you are in the directory containing
  1046.   that variable, you will resume your old game when you run MINEHUNT.
  1047.  
  1048.   To select the number of mines for your next game just store a number
  1049.   in a variable, Nmines (it's case sensitive), and you'll get that many
  1050.   mines.  If you store a negative number, you'll get the absolute value
  1051.   of that many mines, AND all mines will be visible.
  1052.  
  1053.   You can also move diagonally if you use the numbers as arrows: 1 is
  1054.   down+left, 2 is down, 3 is down+right, 4 is left, 6 is right, 7 is
  1055.   up+left, 8 is up, and 9 is up+right.
  1056.   8.  Questions about programming and advanced user functions
  1057.  
  1058.   8.1.  I've heard the names RPL, Saturn, STAR, GL etc...  What are
  1059.   they?
  1060.  
  1061.  
  1062.      ASAP
  1063.         This is a simple Saturn assembler, written in the Perl language.
  1064.  
  1065.      Chip8, Chip48, Schip, Schip8
  1066.         This is a machine-code program that was inspired by the chip8
  1067.         video game interpreter for the RCA CDP1802 microprocessor
  1068.         several years back.  Chip8 allows you to write a simple
  1069.         graphics-based video game for the HP48 SX.  Among the games
  1070.         written are "clones" of Breakout, PacMan, and Pong, to name a
  1071.         few.
  1072.  
  1073.         Chip48, Schip and Schip8 are two different names for an enhanced
  1074.         version of chip8 specifically designed for the HP48 SX.  People
  1075.         have written programs to assemble Schip assembly language into a
  1076.         form directly usable by Schip on an HP48.  Schip interpreters
  1077.         are available for both G and S series.
  1078.  
  1079.      GL GL (Game Language) is a language for the programmer who wants
  1080.         almost the speed of assembly, but who doesn't want to spend a
  1081.         lot of time and effort to learn all the tricks of assembly
  1082.         programming on the HP48. GL has an assembly-like syntax, and
  1083.         there is an assembler for PC and one for the HP48 itself. Since
  1084.         GL is an interpreter, the GL library (3 KB in size) must be
  1085.         installed on the HP48 to run GL programs. The instruction set is
  1086.         powerful, with sprites and pixel based graphics, scrolling,
  1087.         sound, keyboard control, and more. There are 256 1-byte
  1088.         registers which can be used in pairs as 2-byte words. A GL
  1089.         program can be up to 64 KB in size.  GL was inspired by SCHIP,
  1090.         but it is much better in all aspects.  It is suitable for many
  1091.         applications, not only games, that require high speed.  Of
  1092.         course it works on both the HP48 S/SX and the G/GX.  GL is
  1093.         written by Erik Bryntse.
  1094.  
  1095.      Java
  1096.         Java is a library that displays an improved 5 level stack.  It
  1097.         combines the best of SOL, HPSauce, EQStk, and others.  Plus
  1098.         there are several new features and improvements!  The intent of
  1099.         Java is to provide a more useful and faster stack environment
  1100.         for HP48 calculators.
  1101.  
  1102.         The HP48 Java library has no connection at all to the Sun
  1103.         Microsystems product of the same name.  Since the Java library
  1104.         is not a commercial product, we do not expect this to a problem.
  1105.  
  1106.      Jazz
  1107.         This is best System RPL and Machine Language development library
  1108.         that runs right on your HP48!  Written by Mika Heiskanen.  The
  1109.         Jazz library provides commands for assembling, disassembling and
  1110.         debugging both System RPL and machine language.
  1111.  
  1112.      ML Machine Language.  This is usually used in reference to HP48
  1113.         assembly language programming.
  1114.  
  1115.      MLDL
  1116.         Machine Language Development Library.  This is a library that
  1117.         allows you to debug machine language programs with only an HP
  1118.         48.
  1119.  
  1120.      PDL
  1121.         "Program Development Link".  This is an DOS program, sold by
  1122.         Hewlett-Packard, that allows you to write and develop HP48
  1123.         applications from your IBM PC clone.  Programs are written on
  1124.         your PC, transferred to the HP48, and tested from your PC (and
  1125.         not the HP48).
  1126.  
  1127.      RPL
  1128.         RPL is the name of the language used to program the HP48 and
  1129.         HP-28 series calculators.  RPL stands for "Reverse Polish Lisp".
  1130.         It's interesting to note that an HP Journal article incorrectly
  1131.         described RPL as "ROM-based Procedural Language".
  1132.  
  1133.         From Bill Wickes:
  1134.  
  1135.         RPL stands for Reverse Polish Lisp.  In the early days of RPL
  1136.         development, we got tired of calling the unnamed system "the new
  1137.         system," and one of the development team came up with "RPL,"
  1138.         both as a play on "RPN" which has been the loved/hated hallmark
  1139.         of HP calcs forever, and as an accurate indication of the
  1140.         derivation of the language from Forth and Lisp.
  1141.  
  1142.         RPL was never particularly intended to be a public term; at the
  1143.         time of the HP Journal article (August 1987) on the HP 28C there
  1144.         was an attempt to create a less whimsical name--hence "ROM-based
  1145.         procedural language," which preserved the initials but had a
  1146.         more dignified sound.  The development team never calls it
  1147.         anything but (the initials) RPL.  You can choose either of the
  1148.         two full-word versions that you prefer.  Or how about 'Rich
  1149.         People's Language?'
  1150.  
  1151.      SASS
  1152.         SASS is a simple Saturn assembler, written in C/yacc (BSD Unix &
  1153.         Bison).  It uses Alonzo Gariepy's mnemonics.
  1154.  
  1155.      Saturn
  1156.         "Saturn" is the internal code name for the processor used in the
  1157.         HP48, HP-28 series, and many other calculators (just about all
  1158.         HP calculators since the HP 18/28 series).
  1159.  
  1160.      STAR
  1161.         This is the "Saturn Macro Assembler" (how "STAR" comes from
  1162.         this, I don't know), an assembler that uses mostly Alonzo
  1163.         Gariepy's mnemonics.  It's written in C and runs on many
  1164.         different machines (PCs, Amigas, Unix, etc.).  STAR is available
  1165.         via anonymous ftp from
  1166.         <ftp://ftp.hp.com/pub/calculators/unix/star-1.04.4.tar.gz>
  1167.  
  1168.      System RPL
  1169.         This is the name for the custom "operating system/language" used
  1170.         to program the CPU used in the HP48 calculator.  System RPL is a
  1171.         superset of the normal user RPL commands; in addition to the
  1172.         normal, user-accessible RPL commands, system RPL includes many
  1173.         lower-level functions.  System RPL is a language one step higher
  1174.         than assembly language.
  1175.  
  1176.         HP has released a system development toolkit (for the IBM PC)
  1177.         containing a system RPL compiler, assembler, and loader,
  1178.         complete with a couple hundred pages of documentation.  This
  1179.         toolkit, while copyrighted, is, for the most part, freely
  1180.         copyable.  If you can find a BBS or archive site that has it,
  1181.         you can download all of the system RPL files and documentation.
  1182.  
  1183.      USRLIB
  1184.         USRLIB is a program that takes the contents of an HP48 directory
  1185.         and turns it into a library object.  It currently runs under
  1186.         MSDOS.
  1187.  
  1188.      Voyager
  1189.         Voyager is an "interactive disassembler" for IBM PC clones that
  1190.         disassembles HP48 SX RPL and machine code.  You download a copy
  1191.         of the RAM and ROM in your HP48 SX to your PC, and run Voyager.
  1192.         Using Voyager, you can then view the disassembled or unthreaded
  1193.         code.  Unfortunately (or fortunately), Voyager uses the HP
  1194.         mnemonics, and not Alonzo Gariepy's mnemonics.  Voyager is
  1195.         available from the HP BBS <ftp://ftp.hp.com/pub/calculators/>,
  1196.         and from various bulletin boards (the HP handhelds forum in
  1197.         CompuServe also has a copy).  The latest version is "1.07".
  1198.  
  1199.  
  1200.   8.2.  Is there a C compiler for the HP48?
  1201.  
  1202.   Yes.  Alex Ramos has written a GNU C back end for the Saturn
  1203.   processor.  Binaries are available for both Linux and Windows 95/NT,
  1204.   and source is available for compilation on other platforms.
  1205.  
  1206.   Check  <http://www.cris.com/~ramos/hp48/hp48xgcc.htm> for the latest
  1207.   version.
  1208.  
  1209.  
  1210.   8.3.  Why do SysRPL programs run faster than UserRPL programs?
  1211.  
  1212.   SysRPL is the built in language, custom designed for the Saturn
  1213.   processor used the HP48 family.  UserRPL is a "subset" of SysRPL.  The
  1214.   main reason for the speed difference is the fact that UserRPL commands
  1215.   have built in argument and error checking.  In SysRPL, the programmer
  1216.   is responsible for all error checking to avoid memory clears.
  1217.  
  1218.   Note that System RPL is a compiled language and that therefore you
  1219.   need a program like Jazz or GNU-Tools to create it.  This means you
  1220.   can't edit or view SysRPL on the HP48 directly, unlike UserRPL.
  1221.   However both can be run the same way.
  1222.  
  1223.  
  1224.   8.4.  What is a good reference for learning SysRPL and ML?
  1225.  
  1226.   Jim Donnelly's book "An Introduction to HP48 System RPL and Assembly
  1227.   Language Programming" provides 230 pages of step by step instructions
  1228.   for new programmers with plenty of examples.  It also comes with a 3.5
  1229.   inch disk containing the examples in source form and HP's development
  1230.   tools for DOS.  It was previously available from EduCalc, I'm not sure
  1231.   if it is available elsewhere.
  1232.  
  1233.   The ISBN number is: 1-879828-06-5
  1234.  
  1235.   Also useful are RPLMAN.DOC and SASM.DOC available on Goodies Disk 4.
  1236.   See Appendix E-5 for more information.  You might want to also have a
  1237.   look at the following URL:  <http://titan.cs.uni-
  1238.   bonn.de/~wolfrum/hpbooks.html>
  1239.  
  1240.   Examples of ML programming can be found at:
  1241.  
  1242.  
  1243.   o  <http://www.geog.ubc.ca/~amoy/>
  1244.  
  1245.   o  <http://www.ite.mh.se/~danli97/>
  1246.  
  1247.  
  1248.   8.5.  Can I make my own libraries?  Can I split others?
  1249.  
  1250.   Yes, you can either use USRLIB in HP's development tools to create
  1251.   libraries in DOS, or you can make them right on your HP with hacking
  1252.   utilities like Rick Grevelle's D->LIB and L->DIR which can both create
  1253.   and split libraries from/to directories.  These can be found in Mika
  1254.   Heiskanen's HACK library at <http://www.engr.uvic.ca/~aschoorl/>
  1255.  
  1256.  
  1257.   8.6.  How do I know what library ID number to use for my program?
  1258.  
  1259.   Note: While this document says HP48 SX, it is also valid for GX.
  1260.  
  1261.   HP48 SX Library ID Numbers Paul Swadener, HP Developer Support.  03
  1262.   Sep 1993
  1263.  
  1264.   The HP48 will become confused if two or more libraries currently in
  1265.   the machine have the same ID numbers. To help third party developer
  1266.   efforts, HP maintains a list of HP48 Allocated Library ID Numbers.
  1267.  
  1268.   Below are the "rules." The penalty suffered from not following these
  1269.   rules is that your library may not work if another library is in the
  1270.   machine with the same number.
  1271.  
  1272.  
  1273.   1. Don't use any number in the range 000h through 300h. These are
  1274.      reserved for HP's use.
  1275.  
  1276.   2. Don't use any number in the range 301h through 5A0h unless you have
  1277.      been assigned that number by HP. These numbers are reserved for
  1278.      developers who are in the business of distributing their software,
  1279.      that is, Independent Software Developers.
  1280.  
  1281.      To apply for the allocation of an ID# contact Paul Swadener,
  1282.      Hewlett-Packard Company, 1000 NE Circle Blvd., Corvallis, OR 97330,
  1283.      fax number 541-715-2192, internet address
  1284.      paul_swadener@hp6400.desk.hp.com. You must be a registered
  1285.      developer and supply the name/nature of your product, and current
  1286.      shipping address and phone/fax/internet add./etc.
  1287.  
  1288.   3. Use a number in the range 5A1h through 600h for experimental work
  1289.      and software. HP does not track the use of these numbers.
  1290.  
  1291.   4. Use a number in the range 601h through 6F6h for your personal
  1292.      applications, those which you will share, if at all, only to a
  1293.      known set of other users for personal uses. HP does not track the
  1294.      use of these numbers.
  1295.  
  1296.   5. Don't use any number in the range 6F7 through 6FF, as these numbers
  1297.      were allocated before the formal allocation process in was
  1298.      instituted.
  1299.  
  1300.   6. Don't use any number above 700h. These are also reserved for use by
  1301.      HP.
  1302.  
  1303.   Hope this helps clear up how library numbers work.
  1304.  
  1305.  
  1306.   8.7.  What information is there on the internals of the HP48?
  1307.  
  1308.   The most important documents are part of the "System RPL" development
  1309.   tools, a completely unsupported set of IBM PC tools created by HP
  1310.   Corvallis (the creators of the HP48).  The tools, which run on DOS
  1311.   machines only, contain documentation on:
  1312.  
  1313.   o  System RPL (which includes information on HP48 SX display graphics,
  1314.      keyboard control, etc.).
  1315.  
  1316.   o  Saturn assembly language ("Saturn" is the name of the CPU in the
  1317.      HP48), including information on a Saturn assembler.
  1318.  
  1319.  
  1320.   o  A system RPL compiler.
  1321.  
  1322.   o  A Saturn object file linker.
  1323.  
  1324.      However the documentation is also useful for some of the newer
  1325.      program development tools such as Jazz and GNU-Tools.  (See the
  1326.      next question on where to obtain these).
  1327.  
  1328.  
  1329.   8.8.  Where can I get some programming development tools?
  1330.  
  1331.   HP's unsupported System RPL development tools and documentation are
  1332.   available to customers free of charge to help them in HP48 application
  1333.   development, subject to certain legal terms, which are given with the
  1334.   tools (they're too long and detailed to give here).
  1335.  
  1336.   You can get a copy in one of the following ways:
  1337.  
  1338.   o  Anonymous ftp to  <ftp://ftp.hp.com/pub/calculators/>
  1339.  
  1340.   o  Get Goodies Disk 4.  For info, see Appendix E-5.
  1341.  
  1342.      Alternatively, you can use one of the packages put together by
  1343.      members of the HP community.  In particular, Jazz is a library by
  1344.      Mika Heiskanen which allows you to program in System RPL and
  1345.      Machine Language directly on your HP48!  It requires either an SX
  1346.      with a RAM card, or a GX.
  1347.  
  1348.   Jazz is available at  <http://www.engr.uvic.ca/~aschoorl/>
  1349.  
  1350.   There also is GNU-Tools by Mario Mikocevic (Mozgy) which is set of
  1351.   replacements for HP's development tools that not only runs on DOS, but
  1352.   also typical Unix systems such as Linux and Solaris.  It is
  1353.   distributed in both source and binary form.
  1354.  
  1355.   GNU-Tools is available at:
  1356.  
  1357.   o  <ftp://gnjilux.cc.fer.hr/pub/hp48/gtools/>
  1358.  
  1359.   o  <http://www.zems.fer.hr/~mozgy/jwz/hp48.html>
  1360.  
  1361.  
  1362.   8.9.  I know UserRPL.  How do I get started in SysRPL?
  1363.  
  1364.   Here is a quick guide to learning System RPL.  See the other questions
  1365.   for more information on where to obtain the items below.
  1366.  
  1367.  
  1368.   o  Learn UserRPL first, and become familiar with most commands.
  1369.  
  1370.   o  Get Goodies Disk 4 (HPTOOLS) or GNU-Tools if you have Linux etc...
  1371.  
  1372.   o  Get the new release of supported entries, available with GNU-Tools
  1373.      (not the entries in Goodies Disk 4).
  1374.  
  1375.   o  Read RPLMAN.DOC and/or get Jim's Donnelly book; it makes things
  1376.      easier.
  1377.  
  1378.   o  Get ENTRIES.SRT from the HP48 IRC channel.
  1379.  
  1380.   o  Get the tables from the SAD package by ftp to
  1381.      <ftp://ftp.hp.com/pub/calculators/>
  1382.  
  1383.   o  Get Jazz for your HP when you are ready.
  1384.  
  1385.  
  1386.   o  You can learn a lot by studying the ROM and other people's programs
  1387.      with Jazz!
  1388.  
  1389.  
  1390.   8.10.  Are there any viruses for the HP48?
  1391.  
  1392.   There are several, and most are French.  In the United States, a virus
  1393.   called the "Michigan virus" erupted a couple of years ago.  There is a
  1394.   program on Goodies Disk 8 that checks for the Michigan Virus.
  1395.   Currently, viruses do not pose an appreciable threat on HP48's.
  1396.  
  1397.  
  1398.   8.11.  How do I store fields of variable length effectively?
  1399.  
  1400.   See Appendix A-5 near the end of this file.
  1401.  
  1402.  
  1403.   8.12.  What is "Vectored Enter", and how do I use it?
  1404.  
  1405.   From: Bill Wickes
  1406.  
  1407.   The HP48 manuals do not document a very powerful feature that we call
  1408.   "Vectored ENTER," that allows you in effect to redefine or bypass the
  1409.   command line parser and to have a shot at the stack etc. after the
  1410.   command line has been executed.
  1411.  
  1412.   Keys that execute an automatic ENTER perform a two-step process:
  1413.  
  1414.   1. The command line is parsed and evaluated.
  1415.  
  1416.   2. The key definition is executed.
  1417.  
  1418.      When flags -62 and -63 are both set, the system extends this
  1419.      process as follows:
  1420.  
  1421.   1. The current path is searched for a global variable named *aENTER
  1422.      (where "*a" is the Greek alpha character--character 140).  If
  1423.      present, the command line is entered as a string object and *aENTER
  1424.      is executed.  If absent, the command line is parsed and evaluated
  1425.      normally.
  1426.  
  1427.   2. The key definition is executed.
  1428.  
  1429.   3. The current path is searched for a global variable named *bENTER
  1430.      ("*b" is Greek beta--character 223).  If present, then a string
  1431.      representing the key definition is put on the stack, and *bENTER is
  1432.      executed.  The string is the key definition object's name if it is
  1433.      a command, XLIB name, global or local name, or an empty string for
  1434.      other object types; its primary purpose is to implement things like
  1435.      the TRACE mode on other calcs, where you can print a running record
  1436.      of what you do.
  1437.  
  1438.      A simple example of the use of *aENTER is to create a more
  1439.      convenient binary calculator, where *aENTER slaps a "#" on the
  1440.      front of the command line so you don't have to bother when entering
  1441.      numbers.
  1442.  
  1443.  
  1444.   8.13.  What is "WSLOG"?
  1445.  
  1446.   It is an until recently undocumented feature which stands for "Warm
  1447.   Start Log" (it is listed in the command appendix of newer G manuals,
  1448.   as well as being fully explained in the AUR).
  1449.  
  1450.   Type in WSLOG in caps, and calc will list the time and cause of the
  1451.   last four warm starts.  This feature helps HP technical support to fix
  1452.   your HP48 in case it crashes.
  1453.  
  1454.  
  1455.        0 - log cleared by <ON> <SPC> then <ON>
  1456.        1 - low battery condition, auto deep sleep mode invoked to save battery
  1457.        2 - hardware failed during IR (time out)
  1458.        3 - run through address 0
  1459.        4 - system time corrupt
  1460.        5 - deep sleep mode wake up (alarm?)
  1461.        6 - unused
  1462.        7 - CMOS test word in RAM was corrupted
  1463.        8 - abnormality was detected about device config
  1464.        9 - corrupt alarm list
  1465.        A - problem with RAM move
  1466.        B - card module pulled
  1467.        C - hardware reset
  1468.        D - system RPL error handler not found in run stream
  1469.        E - corrupt config table
  1470.        F - system RAM card pulled
  1471.  
  1472.  
  1473.   8.14.  What are SYSEVALs?
  1474.  
  1475.   SYSEVALs are addresses that point directly to a location in the HP48's
  1476.   ROM. Many SYSEVAL hex strings are System-RPL commands.  Because there
  1477.   is no argument checking, it very easy to clear your HP48's memory.
  1478.  
  1479.   In the file SYMBOLS.GX, HP designates three types of entries.  The
  1480.   first type is "supported."  This means that a particular entry will
  1481.   work on ALL versions of the HP48 and HP supports the use of this
  1482.   entry.
  1483.  
  1484.   The second type of entry is "unsupported."  This means that HP does
  1485.   not support the use of this entry and it will not be the same on all
  1486.   versions of the HP48.
  1487.  
  1488.   The third type is "unsupported-static."  This is an entry to HP does
  1489.   not support the use of, but it is the same for all versions.
  1490.  
  1491.  
  1492.   8.15.  What are some useful SYSEVALs?
  1493.  
  1494.   For a complete list of supported entry points, see
  1495.   <http://www.engr.uvic.ca/~aschoorl/>
  1496.  
  1497.   In System-RPL, different HP object types are referred to by symbols.
  1498.   These symbols are used to construct stack diagrams, which tell the
  1499.   user how to use System-RPL commands.  Here are some of the symbols:
  1500.  
  1501.  
  1502.        Symbol  Type                        Example
  1503.        ------  --------------------        -----------------
  1504.        $       string                      "ABCDEFG"
  1505.        id      Global Name                 'A'
  1506.        arry    Array                       [[ 1 2 ] [ 3 4 ]]
  1507.        grob    HP48 Graphics Object        Graphic 131x64
  1508.        #       Binary Number               <1h>
  1509.        symb    Symbolic Object             'A^2+B^2'
  1510.  
  1511.  
  1512.      To interpret the stack diagram:
  1513.         Everything on the left of the -> arrow is the input.  That needs
  1514.         to be on the stack before executing the SYSEVAL.  The symbols
  1515.         show you which kinds of data to put on the stack.  Once you
  1516.         execute the syseval (see next paragraph), the HP will return the
  1517.         data back that is indicated on the right side of the arrow.
  1518.  
  1519.      To use the following entries, do the following:
  1520.  
  1521.         1. Make sure (triple check) that the appropriate arguments are
  1522.            on the stack.
  1523.  
  1524.         2. Push Right-shift /, you should get a # on the command line.
  1525.  
  1526.         3. Enter the hex string exactly as shown in the hex string
  1527.            column.
  1528.  
  1529.         4. Put an small case h at the end of the hex string.
  1530.  
  1531.         5. Press enter.
  1532.  
  1533.         6. Type SYSEVAL.
  1534.  
  1535.   Here are just a few examples:
  1536.  
  1537.  
  1538.        Hex    Sys-RPL Name    Category            Stack Diagram
  1539.        ---    ------------    --------            -------------
  1540.  
  1541.        15777  NULLID          Supported           ( -> '' )
  1542.        30794  VERSTRING       Supported           ( -> "HPHP48-?" )
  1543.        3A328  MakeStdLabel    Supported           ( $ -> grob )
  1544.        3A3EC  MakeDirLabel    Supported           ( $ -> grob )
  1545.        3A38A  MakeBoxLabel    Supported           ( $ -> grob )
  1546.        3A44E  MakeInvLabel    Supported           ( $ -> grob )
  1547.        3A1FC  DispMenu.1      Supported           ( -> )
  1548.        05F42  GARBAGE         Supported           ( -> )
  1549.        41F65  WaitForKey      Supported           ( -> #KeyCode #Plane )
  1550.        353AB  SYMB>IDS        Unsupported-Static  ( symb -> list )
  1551.        40D25  LockAlpha       Supported           ( -> )
  1552.        40D39  UnlockAlpha     Supported           ( -> )
  1553.        3AA0A  1A/LockA        Supported           ( -> )
  1554.        44C31  DoNewMatrix     Supported           ( -> arry )
  1555.        44FE7  DoOldMatrix     Supported           ( arry -> arry' T/F )
  1556.        1314D  TOADISP         Supported           ( -> )
  1557.        13135  TOGDISP         Supported           ( -> )
  1558.        39531  ClrDA1IsStat    Supported           ( -> )
  1559.        130AC  RECLAIMDISP     Supported           ( -> )
  1560.        4E347  TURNMENUON      Supported           ( -> )
  1561.        05B15  $>ID            Supported           ( $ -> id )
  1562.        05BE9  ID>$            Supported           ( id -> $ )
  1563.        3A1E8  DispMenu        Supported           ( -> )
  1564.        39BAD  DispStack       Unsupported-Static  ( -> )
  1565.  
  1566.  
  1567.   8.16.  What are LIBEVALs?
  1568.  
  1569.   From: Joe Horn (Copied from "libeval.doc" on GD 9)
  1570.  
  1571.   The G/GX has a new command: LIBEVAL.  It's sort of like SYSEVAL, but
  1572.   instead of taking a memory address (which could be ambiguous due to
  1573.   the G/GX's massive need for bank switching), it takes XLIB numbers.
  1574.   It's a "back door" for us hackers.  Unlike the ELSYSEVAL command in
  1575.   the HP Solve Equations Library Card, which only worked for the
  1576.   libraries in that card, LIBEVAL works for any library, including the
  1577.   hidden ones in the operating system.
  1578.  
  1579.  
  1580.        CAUTION: LIBEVAL, like SYSEVAL, is both powerful and danger-
  1581.        ous. If used with incorrect input(s) and/or in the wrong
  1582.        environment, it can nuke your memory.
  1583.  
  1584.  
  1585.   LIBEVAL takes a single user binary integer of the form #LLLFFFh, where
  1586.   LLL is the library ID (hex), and FFF is the three-digit function num-
  1587.   ber (hex, with leading zeros if necessary).
  1588.  
  1589.   For example, the R->B command is XLIB 2 9.  So you can perform a R->B
  1590.   by executing #2009h LIBEVAL.  Try it: 10 #2009h LIBEVAL -> #Ah.
  1591.  
  1592.   Using it for named commands is unnecessary, but the G/GX is highly
  1593.   XLIB oriented (again, due to the need for bank switching), and there
  1594.   are many useful and interesting features accessible only through
  1595.   LIBEVAL.
  1596.  
  1597.   A prime example is the G/GX's inability to programmatically launch the
  1598.   new "dialog boxes".  Suppose a program needs to print things; it would
  1599.   be awfully nice to be able to throw the I/O PRINT dialog box onto the
  1600.   screen.  The User's Guide is no help here, and in fact it would seem
  1601.   impossible to do.  But #B4197 LIBEVAL is all it takes!  Try it.  Cool,
  1602.   huh?
  1603.  
  1604.  
  1605.   8.17.  What are some useful LIBEVALs? (GX)
  1606.  
  1607.   See Appendix B-3 for a few GX LIBEVALs.
  1608.  
  1609.  
  1610.   8.18.  What is the format of a GROB object?
  1611.  
  1612.   Note: I received two very good answers to this question, and each
  1613.   cater to a different kind of user, so I will include them both.
  1614.  
  1615.  
  1616.      The easy way:
  1617.         First, add pixels to the right-hand edge to make the horizontal
  1618.         dimension a multiple of 8, then separate the object horizontally
  1619.         into groups of four pixels.  Suppose, for example, you want to
  1620.         make this into a 22x8 GROB:
  1621.  
  1622.  
  1623.           ---------****---------
  1624.           --------**--**--------
  1625.           -------**----**-------
  1626.           ********------********
  1627.           ********------********
  1628.           -------**----**-------
  1629.           --------**--**--------
  1630.           ---------****---------
  1631.  
  1632.  
  1633.      You would break it up like this:
  1634.  
  1635.  
  1636.      ---- ---- -*** *--- ---- ----
  1637.      ---- ---- **-- **-- ---- ----
  1638.      ---- ---* *--- -**- ---- ----
  1639.      **** **** ---- --** **** **--
  1640.      **** **** ---- --** **** **--
  1641.      ---- ---* *--- -**- ---- ----
  1642.      ---- ---- **-- **-- ---- ----
  1643.      ---- ---- -*** *--- ---- ----
  1644.  
  1645.  
  1646.      Notice, I've added two columns of pixels to make it 24x8.  Now,
  1647.      each group of four can be represented by a hexadecimal digit.
  1648.  
  1649.  
  1650.           ---- 0          --*- 4          ---* 8          --** C
  1651.           *--- 1          *-*- 5          *--* 9          *-** D
  1652.           -*-- 2          -**- 6          -*-* A          -*** E
  1653.           **-- 3          ***- 7          **-* B          **** F
  1654.  
  1655.  
  1656.      Now, replace each group of four pixels with its corresponding
  1657.      hexadecimal digit: 00E100  003300  081600  FF0CF3  FF0CF3  081600
  1658.      003300  00E100.
  1659.  
  1660.      So, your final grob is:
  1661.  
  1662.  
  1663.           GROB 22 8 00E100003300081600FF0CF3FF0CF308160000330000E100
  1664.  
  1665.  
  1666.      The technical way:
  1667.  
  1668.         1. Every HP object format is described in RPLMAN.DOC, see this
  1669.            file for more info.
  1670.  
  1671.         2. All HP objects are (of course) nibble based.  When viewing
  1672.            them on the PC, which is byte based, the low order nib is
  1673.            always read and written first.
  1674.  
  1675.         3. HP objects begin with a 5 nib prologue which identifies the
  1676.            object type (and other things).  This is the prologue for a
  1677.            grob object..
  1678.  
  1679.  
  1680.              02B1E pr HP:DOGROB
  1681.              02B1E @  Graphic prologue (/U GROB)
  1682.  
  1683.  
  1684.         4. Every 5 nib sub field of an object, such as prologue, length,
  1685.            etc., is read in reverse order (low nib first).  The grob
  1686.            prologue would appear E1B20, or 1E 2B x0 in a hex dump on a
  1687.            PC.  The least significant nibble of the next field begins
  1688.            right at the x in x0.
  1689.  
  1690.         5. It is customary to always work with HP objects on the PC with
  1691.            the HPHP48-E header (substitute your favourite rom version
  1692.            letter) preceeding the prologue.  This gives no hassles when
  1693.            downloading via Kermit or X-Modem.
  1694.         PC hex dump of a grob object.. ( remember each 5 nib field is
  1695.         reverse order )
  1696.  
  1697.         1. "HPHP48-E" 8 byte ascii string with msb off
  1698.  
  1699.         2. 5 nib prologue, 02B1E (hex)
  1700.  
  1701.         3. 5 nib length field, includes length of body AND length and
  1702.            height fields!  does not include 5 nib prologue.  So, the
  1703.            total #nibs the grob object takes in HP memory is this number
  1704.            + 5.  Important!
  1705.  
  1706.         4. 5 nib height field  ( yes, it is height then width )
  1707.  
  1708.         5. 5 nib width field
  1709.  
  1710.         6. body (described below)
  1711.  
  1712.         The grob object looking at it using command line EDIT on the
  1713.         HP..
  1714.  
  1715.  
  1716.           GROB <width (dec)> <height (dec)> < body >
  1717.  
  1718.  
  1719.      The body is exactly the same looking at it on a PC hex dump or on
  1720.      the command line EDIT.  Just remember to read low nibble first for
  1721.      hex dump.
  1722.  
  1723.      Because of hardware restrictions, the number of nibs required to
  1724.      represent one horizontal line must be even (byte aligned).  So, use
  1725.      this method to calculate the number of nibs in one line..   (pascal
  1726.      example)
  1727.  
  1728.  
  1729.           nibs := width div 4;
  1730.           if nibs mod 4 <> 0 then nibs := nibs + 1;
  1731.           if odd(nibs) then nibs := nibs + 1;
  1732.  
  1733.  
  1734.      Then to get the #nibs in the entire body, multiply it by the
  1735.      height.  Remember, the length field must be this total body length
  1736.      + 15 !
  1737.  
  1738.      For example, a 131 wide grob requires 34 nibs for one horizontal
  1739.      line, where 5 of the bits are unused.  The first nib in the second
  1740.      line begins at nib 35 for this grob, etc...  If the grob is 64
  1741.      lines, then the body is 2176 nibs.  Add 5 for the prologue, 5 for
  1742.      the length field, 5 for height, and 5 for width.  Total object size
  1743.      (on the HP) is 2196 nibs, or 1098 bytes.  The length field should
  1744.      contain 2196 minus 5 for prologue = 2191 (0088F hex)
  1745.  
  1746.      Note that for each nib, the right-most bit is the left-most pixel
  1747.      on the screen.  This is nearly always the case for graphic memory.
  1748.  
  1749.  
  1750.   8.19.  What is the AUR and what information does it contain?
  1751.  
  1752.   From: Jarno Peschier <jpeschie@cs.ruu.nl>
  1753.  
  1754.  
  1755.   In this text I will try to answer a number of frequently asked
  1756.   questions about the HP48 G Series Advanced  User's Reference Manual.
  1757.   In the remainder of this text I will use the common abbreviation AUR
  1758.   when referring to this book.
  1759.  
  1760.   A good link for AUR information is at:
  1761.   <http://www.contrib.andrew.cmu.edu/~drury/hp48gaur/>
  1762.  
  1763.   The questions I will try to answer are:
  1764.  
  1765.  
  1766.   o  What is the AUR?
  1767.  
  1768.   o  What information does the AUR contain?
  1769.  
  1770.   o  Do I need the AUR?
  1771.  
  1772.   o  Why didn't HP supply the AUR with every HP48?
  1773.  
  1774.   o  Where can I get the AUR?
  1775.  
  1776.   o  Does the AUR contain any SYSEVALs and/or LIBEVALs?
  1777.  
  1778.   o  Does the AUR say anything about SysRPL and/or ML?
  1779.  
  1780.  
  1781.      What is the AUR?
  1782.         The AUR is just what it's name tells you it is: it's a reference
  1783.         manual for the HP48 G Series.  It has the same outside
  1784.         appearance as the  HP48 G Series User Guide (the manual you get
  1785.         with your HP48 G or HP48 GX when you buy it), except that it's
  1786.         much thicker (just under 4 cm).  The AUR contains about 650
  1787.         pages of useful information about your calculator.
  1788.  
  1789.      What information does the AUR contain?
  1790.         The AUR contains information about UserRPL programming, quite a
  1791.         lot of programming examples, a complete command reference for
  1792.         all the (UserRPL) commands the G Series knows and reference
  1793.         lists about all equations, error and status messages, units,
  1794.         etc...  Of course it has an extensive index at the back of the
  1795.         book.
  1796.  
  1797.  
  1798.         Chapter 1: Programming
  1799.            Contains: Understanding Programming, Entering and Executing
  1800.            Programs, Viewing and Editing Programs, Creating Programs on
  1801.            a  Computer, Using Local Variables, Using Tests and
  1802.            Conditional Structures, Using Loop Structures, Using Flags,
  1803.            Using Subroutines, Single-Stepping through a Program,
  1804.            Trapping Errors, Input, Stopping a Program for Keystroke
  1805.            Input, Output, Using Menus with Programs, Turning Off the
  1806.            HP48 from a Program.
  1807.  
  1808.  
  1809.         Chapter 2: Programming Examples
  1810.            Contains: Fibonacci Numbers, Displaying a Binary  Integer,
  1811.            Median of Statistics Data, Expanding and Collecting
  1812.            Completely, Minimum and Maximum Array Elements, Applying a
  1813.            Program to an Array, Converting Between Number Bases,
  1814.            Verifying Program Arguments, Converting Procedures from
  1815.            Algebraic to RPN, Bessel Functions, Animation of Successive
  1816.            Taylor's Polynomials, Programmatic Use of Statistics and
  1817.            Plotting, Trace Mode, Inverse-Function  Solver, Animating a
  1818.            Graphical Image.
  1819.  
  1820.  
  1821.         Chapter 3: Command Reference
  1822.            This chapter contains one entry for every command (except for
  1823.            RULES) from ABS to ZVOL and  + to  ->.  Each entry contains:
  1824.  
  1825.         o  A description of what the command does (with stack diagrams).
  1826.  
  1827.         o  Ways in which you can access it from the keyboard (with
  1828.            submenu you need, or if you can only type it in in Alpha-
  1829.            mode).
  1830.  
  1831.         o  Which flags the command is affected by.
  1832.  
  1833.         o  Remarks, and a list of related commands.
  1834.  
  1835.            Often a command has one or more example programs too. This
  1836.            chapter is the bulk of the whole book; it's 424 pages thick.
  1837.  
  1838.  
  1839.         Chapter 4: Equation Reference
  1840.            This chapter contains one entry for every section in the
  1841.            built in Equation Library (EQLIB).  Each entry contains: a
  1842.            table of used variables and then for every set of equations
  1843.            an entry with some more info about the equation set, the
  1844.            picture that goes with it (if any), all the equations and one
  1845.            or more sets of example numbers and solutions.  The end of
  1846.            the chapter has a list of references from which all the
  1847.            equations were taken.
  1848.  
  1849.  
  1850.         Appendix A: Error and Status Messages
  1851.            This chapter contains two tables with all possible messages.
  1852.            The first has them sorted alphabetically and shows the
  1853.            message, the meaning and the ERRN number in hex.  The second
  1854.            has them sorted on ERRN number (and thus on category) and
  1855.            only contains the number in hex and the message itself.
  1856.  
  1857.  
  1858.         Appendix B: Table of Units
  1859.            This chapter contains a table with all units the HP48 G
  1860.            Series knows.  It contains the unit (both the name you use on
  1861.            the calculator as well as the full name) and the value it
  1862.            represents in SI units.
  1863.  
  1864.  
  1865.         Appendix C: System Flags
  1866.            This chapter contains a table with all the system flags of
  1867.            the HP48 G Series.  The table contains the number followed by
  1868.            a description of it's use and the results you get when the
  1869.            flag is set or clear.
  1870.  
  1871.  
  1872.         Appendix D: Reserved Variables
  1873.            This chapter contains a table with all the reserved variables
  1874.            of the HP48 G Series (ALRMDAT, CST, "der"-names, EQ, EXPR,
  1875.            IOPAR, MHpar, Mpar, n1/n2/..., Nmines, PPAR, PRTPAR,
  1876.            s1/s2/..., VPAR, ZPAR, SigmaDAT and SigmaPAR) with complete
  1877.            information about what they are used for and about all
  1878.            possible parameters that can be put into them.
  1879.  
  1880.  
  1881.         Appendix E: New Commands
  1882.            This chapter lists all the commands that are new to the HP48
  1883.            G Series, with a brief description of what the commands do.
  1884.            A list like this can be found elsewhere in the HP48 FAQ list
  1885.            as well.
  1886.  
  1887.         Appendix F: Technical Reference
  1888.            Contains:  Object sizes, Mathematical simplification rules
  1889.            used by the HP48, Symbolic differentiation patterns used by
  1890.            the HP48, the EquationWriter's expansion rules, References
  1891.            used as sources for constants and equations in the HP48
  1892.            (other than those in the Equation Library).
  1893.  
  1894.  
  1895.         Appendix G: Parallel Processing with Lists
  1896.            This chapter contains info on parallel processing that makes
  1897.            UserRPL look even more like a real functional programming
  1898.            language by letting (almost) all the commands  function on
  1899.            lists of parameters as well (i.e. adding map capabilities to
  1900.            all internal commands).
  1901.  
  1902.  
  1903.      Do I need the AUR?
  1904.         Yes, you do.  In my humble opinion the AUR is just "The Manual,
  1905.         Part II" and every owner of a HP48 G or HP48 GX should have it,
  1906.         especially if you are (going to be) programming in UserRPL for
  1907.         any reason.  A lot of the frequently asked questions that pop up
  1908.         on comp.sys.hp48 are simply questions that are meant to be
  1909.         answered by the AUR.
  1910.  
  1911.  
  1912.      Why didn't HP supply the AUR with every HP48?
  1913.         Since you're reading this FAQ, you're probably gifted: you are
  1914.         not an average HP48 user.  The set of "average users" probably
  1915.         consists mostly of people that simply never program their HP48
  1916.         in any way ("Wow, can it do that too?!").  In this case, they
  1917.         will never take one look at the AUR ever again, and since this
  1918.         is quite a thick book it would be a waste of money, trees, the
  1919.         environment, transportation costs, etc... to supply the AUR in
  1920.         every box.  This is probably why HP made it an extra accessory
  1921.         for those people that "really need" it.  I think...
  1922.  
  1923.  
  1924.      Where can I get the AUR?
  1925.         You should be able to buy (or order) it from the same shop where
  1926.         you purchased your calculator.  The HP part number is
  1927.         00048-90136.  The book does not seem to have an ISBN; it's a HP
  1928.         part, not a book.
  1929.  
  1930.  
  1931.      Does the AUR contain any SYSEVALs or LIBEVALs?
  1932.         Yes, it contains exactly one.  The example for the SYSEVAL
  1933.         command tells you that #30794h SYSEVAL gives you the version of
  1934.         your HP48.  My HP48 GX rev. P gives "HPHP48-P".
  1935.  
  1936.  
  1937.      Does the AUR say anything about SysRPL or ML?
  1938.         No, it doesn't.
  1939.  
  1940.  
  1941.   8.20.  What is the syntax for INFORM, CHOOSE, and MSGBOX? (GX)
  1942.  
  1943.   Based on a posting on HPCVBBS by Cary McCallister.  Revised by Joe
  1944.   Horn.  Re-formatted by Andre Schoorl.
  1945.  
  1946.  
  1947.      INFORM - Create a Custom Input Form
  1948.  
  1949.         INPUT:
  1950.  
  1951.         5: "title"
  1952.         4: { fields }
  1953.         3: <format>
  1954.         2: { reset_values }
  1955.         1: { initial_values }
  1956.  
  1957.  
  1958.         OUTPUT:
  1959.  
  1960.  
  1961.              Either: 2: { new_values }
  1962.                      1: 1
  1963.  
  1964.              or:     1: 0
  1965.  
  1966.  
  1967.         PURPOSE:
  1968.            INFORM creates full-screen custom input forms, similar to
  1969.            those of the built-in applications.
  1970.  
  1971.         ARGUMENTS:
  1972.  
  1973.            title
  1974.               Is displayed in font 1 (small) at the top centre of the
  1975.               screen.  It may contain any number of characters,
  1976.               including 0, but, at most, 31 characters will be
  1977.               displayed. Strings longer than 31 character will be
  1978.               truncated to 30 characters and displayed with a trailing
  1979.               ellipsis.  Line feed characters are displayed as boxes.
  1980.  
  1981.            { fields }
  1982.               Is a list of the form { field1 field2 ... fieldn } where
  1983.               each field is any one of these forms:
  1984.  
  1985.  
  1986.                 1.    "label"
  1987.                 2.    { "label" "help" }
  1988.                 3.    { "label" "help" type1 type2 ... typen }
  1989.                 4.    { }
  1990.  
  1991.  
  1992.            The "label" is a string of arbitrary text from 0 to 26 char-
  1993.            acters long (longer strings will be truncated to 25 charac-
  1994.            ters with a trailing ellipsis).  The "help" is displayed
  1995.            immediately above the menu area as a helpful prompt for the
  1996.            user.  The object type specifications list the one or more
  1997.            object types allowed in the field, in the form the TYPE com-
  1998.            mand returns.  If unspecified, the default help text is blank
  1999.            and the field will accept all object types.  If a field spec-
  2000.            ification is an empty list, no field is produced; instead,
  2001.            the field to the immediate left (if any) is expanded to fill
  2002.            the omitted field's space.  This allows further customization
  2003.            of form layout; for example, to have two fields in one row
  2004.            and three fields in the next.
  2005.  
  2006.            <format>
  2007.               May be any one of the following objects:
  2008.  
  2009.            1.    { }
  2010.            2.    columns
  2011.            3.    { columns }
  2012.            4.    { columns widths }
  2013.  
  2014.  
  2015.            Where <columns> is the number of columns that the display
  2016.            will be divided into e.g., if <columns> is 2 and there are
  2017.            two fields, they will be displayed side by side rather than
  2018.            one above the other.  <widths> is the tab width between the
  2019.            left edge of each title and its field; this makes vertical
  2020.            alignment of fields possible.  Titles longer than one tab
  2021.            width will cause the tab to be repeated automatically.  If
  2022.            unspecified, the default column count is one and the default
  2023.            tab stop width is three.
  2024.  
  2025.            { reset_values }
  2026.               Is a list of values one per input field which replace the
  2027.               values of all fields when the {RESET} key is pressed and
  2028.               "Reset all" is selected.  This list must either be empty
  2029.               or have exactly one item per field corresponding to the {
  2030.               fields } list above.  If empty, then all fields are deemed
  2031.               unspecified (i.e., blank).  Each reset value must match
  2032.               the type require by the form field. Selected fields may be
  2033.               marked as unspecified by using NOVAL as the reset value.
  2034.  
  2035.            { initial_values }
  2036.               is a list of values one per input field which specify the
  2037.               start-up values of all fields when the INFORM command is
  2038.               invoked. This list must either be empty or have exactly
  2039.               one item per field corresponding to the { fields } list
  2040.               above.  If empty, then all fields are deemed unspecified
  2041.               (i.e., blank).  Each initial value must match the type
  2042.               require by the form field.  Selected fields may be marked
  2043.               as unspecified by using NOVAL as the initial value.
  2044.  
  2045.         RESULTS:
  2046.            INFORM returns the new field values { new_values } as a list
  2047.            to level 2 and the real value 1 to level 1 if the user
  2048.            completes the input form by pressing {OK} or [ENTER].  The
  2049.            list will contain one item per field.  Each item will either
  2050.            be the last input value for the corresponding field, or NOVAL
  2051.            if the field was unspecified.
  2052.  
  2053.            INFORM returns the real value 0 to level 1 if the user
  2054.            terminates the input form by pressing {CANCL} or [CANCEL].
  2055.  
  2056.         REMARKS:
  2057.            NOVAL is basically a command (an XLIB name) that does nothing
  2058.            when evaluated. It can, however, be compared via ==, SAME and
  2059.            POS.
  2060.  
  2061.      CHOOSE - Create a User-Defined Choose-Box
  2062.  
  2063.         INPUT:
  2064.  
  2065.  
  2066.              3: "title"
  2067.              2: { items }
  2068.              1: <initial_item_number>
  2069.  
  2070.  
  2071.         OUTPUT:
  2072.  
  2073.  
  2074.              Either: 2: { chosen_item }
  2075.                      1: 1
  2076.  
  2077.              or:     1: 0
  2078.  
  2079.  
  2080.         PURPOSE:
  2081.            CHOOSE creates a user-defined "choose-box": a displayed box
  2082.            containing items from which the user can choose one.
  2083.  
  2084.            CHOOSE displays a standard choose box (normal, not maximized;
  2085.            single-pick, not multi-pick) with an optional title line.
  2086.  
  2087.         ARGUMENTS:
  2088.  
  2089.            title
  2090.               If any, is displayed in font 1 (small) in the top centre
  2091.               of the box.  It may contain any number of characters,
  2092.               including 0, but, at most, 22 characters will be
  2093.               displayed. Strings longer than 22 character will be
  2094.               truncated to 21 characters and displayed with a trailing
  2095.               ellipsis.  Line feed characters are displayed as boxes.
  2096.               If there are more than four items such that the scroll
  2097.               arrows are displayed, the maximum number of title
  2098.               characters is reduced to 21.  The title text is displayed
  2099.               in the title area in character font 1 (the menu font).  If
  2100.               the title string is empty, no title area will be created
  2101.               in the choose box, and the whole box will be devoted to
  2102.               the items.
  2103.  
  2104.            { items }
  2105.               Is a list of arbitrary objects.  Each item occupies one
  2106.               line in the choose box and is displayed in its command
  2107.               line form.  Only the first 14 characters of the displayed
  2108.               object will be shown (13 if the scroll arrows are
  2109.               present).  If an item contains more than 14 (13)
  2110.               characters, it will be truncated to 13 (12) and the final
  2111.               character will be replaced by an ellipsis.  If every item
  2112.               is a list of exactly two objects, the first object will be
  2113.               displayed and the second returned if the item is selected.
  2114.               If the number of items exceeds 4 with a title and 5
  2115.               without, scroll arrows will be displayed, and moving the
  2116.               highlight past the top or bottom of the box will scroll
  2117.               through the undisplayed items.
  2118.  
  2119.            <initial_item_number>
  2120.               Specifies the initial field to be highlighted when the
  2121.               display first comes up (ordinarily 1).  A value of 0
  2122.               indicates that no field is to be highlighted and that the
  2123.               {CANCL} key is to be omitted from the menu, making the
  2124.               choose box act as an informational display without user
  2125.               selection.
  2126.  
  2127.         RESULTS:
  2128.            CHOOSE returns the chosen item (or the second object in a
  2129.            two-element item list) and the real number 1 if the user
  2130.            completes the choose box by pressing {OK} or [ENTER].  CHOOSE
  2131.            returns the real number 0 if the user terminates the choose
  2132.            box by pressing {CANCL} or [CANCEL].
  2133.  
  2134.      MSGBOX - Create a Simple Message Box
  2135.  
  2136.         INPUT:
  2137.  
  2138.  
  2139.              1: "Message_string"
  2140.  
  2141.  
  2142.         OUTPUT:
  2143.  
  2144.  
  2145.              None
  2146.  
  2147.  
  2148.         PURPOSE:
  2149.            MSGBOX creates a simple pop-up message box over the current
  2150.            display, with a 3D shadow to make it easy to recognize, and
  2151.            containing any arbitrary text.
  2152.  
  2153.         ARGUMENTS:
  2154.  
  2155.            Message_string
  2156.               Is any string of characters.  The text is displayed in
  2157.               font 2 (medium size), left justified, with a maximum line
  2158.               length of 15 characters.  Longer lines are broken into
  2159.               multiple lines automatically, at word breaks when
  2160.               possible, up to a maximum of 5 lines.  Line feeds may be
  2161.               included to force line breaks.  The minimum number of
  2162.               lines is 2, so single-line messages will have a blank line
  2163.               at the bottom of the box.
  2164.  
  2165.         RESULTS:
  2166.            None.  MSGBOX is exited when the user presses CANCEL, ENTER,
  2167.            or OK, but nothing is returned to the stack.
  2168.  
  2169.   For examples of INFORM, CHOOSE, and MSGBOX see Appendix B-2.
  2170.  
  2171.  
  2172.   8.21.  How do I put checkfields in my INFORM menus?
  2173.  
  2174.   From: Matt Willis
  2175.  
  2176.   You can't normally do this directly in User RPL.  You can do it in
  2177.   System RPL (see Jim Donnelly's book for details), or you can use the
  2178.   library at  <http://www.hpcalc.org/programming/misc/infm2v1.zip>
  2179.  
  2180.   I figured that the System RPL version of DoInputForm was unpleasant
  2181.   enough to use on a casual basis so I wrote a simple library that lets
  2182.   you use check boxes and choose lists from User RPL.
  2183.  
  2184.   All it does is stop execution of INFORM just before DoInputForm, then
  2185.   search the stack and change object types to check and choose objects.
  2186.   Then it restarts the INFORM command.  At the end, it tidies up
  2187.   TRUE/FALSE to 1/0 etc...
  2188.  
  2189.   Example syntax:
  2190.  
  2191.  
  2192.   "Test" {
  2193.   "A" "B" "C" } 1 {} { :CHECK: 1  :CHOOSE: { 1 2 3 }  NOVAL }
  2194.   IF INFORM2 THEN
  2195.      ...insert code here...
  2196.   END
  2197.  
  2198.  
  2199.   8.22.  What is the syntax for the INPUT command?
  2200.  
  2201.   From: John Meyers
  2202.  
  2203.   INPUT allows you to display a message and then edit a given string
  2204.   using the command line editor; the edited string is its result.
  2205.  
  2206.   Arguments:
  2207.  
  2208.  
  2209.      Level 2:
  2210.  
  2211.         "message"
  2212.  
  2213.  
  2214.         The message is displayed in "medium font" in the upper part of
  2215.         the "stack display area" (the stack itself is not visible during
  2216.         the INPUT command).  The message may be an empty string, or may
  2217.         contain newlines for a multiple-line message.
  2218.  
  2219.  
  2220.      Level 1:
  2221.         The most general format is a non-empty list containing up to
  2222.         three optional specifications, which may appear in any order:
  2223.  
  2224.  
  2225.         { "string" { row column } mode(s) }
  2226.  
  2227.  
  2228.         "String" is the initial text which will appear in the command
  2229.         line; it may be an empty string, or may contain newlines for a
  2230.         multiple- line text.  If you do not need to specify any other of
  2231.         the optional arguments, you may omit the list itself and supply
  2232.         only the string on level 1.  If the string is omitted from an
  2233.         argument list, the default is an empty string.
  2234.  
  2235.  
  2236.         Mode(s) are zero or more of the following special reserved
  2237.         names:
  2238.  
  2239.  
  2240.      o  Type a Greek Alpha symbol (Alpha right-shift A) to start the
  2241.         editor with Alpha keyboard mode on.
  2242.  
  2243.  
  2244.         You might select this mode if you are inviting the user to type
  2245.         general text; you would not type quotation marks around the
  2246.         entered text, because INPUT automatically returns as a string
  2247.         all the characters that are typed into the edit line.
  2248.  
  2249.  
  2250.      o  The word ALG starts the editor in Algebraic entry mode (ALG
  2251.         annunciator on); PRG mode is always on by default.
  2252.  
  2253.      o  The letter V will check the syntax of the entire command line
  2254.         when ENTER is finally pressed, in exactly the same way that the
  2255.         command line editor normally does, disallowing an exit if there
  2256.         is an RPL syntax error.  However, unlike ordinary editing in the
  2257.         command line, the command line text is still returned as a
  2258.         string, and is not compiled for you (you can do OBJ-> yourself
  2259.         afterwards if you want to compile the string).
  2260.  
  2261.  
  2262.         For example, if you are expecting two numeric values to be
  2263.         entered, and if you enter 123 456, INPUT returns "123 456"; if
  2264.         you then do OBJ-> on that result, you will finally get 123 and
  2265.         456 as separate values on the stack.
  2266.  
  2267.  
  2268.         Row and Column optionally specify where the cursor will
  2269.         initially appear (default is at the end of the entire string),
  2270.         and whether the cursor will start in "insert" or "replace" mode
  2271.         (default is insert).
  2272.  
  2273.  
  2274.         Row numbers start at 1 for the topmost row; column numbers start
  2275.         at 1 for the first character in a row.  Row zero means the
  2276.         bottom row; column zero means the end of a row.
  2277.  
  2278.  
  2279.         Instead of { row column } you may also simply count character
  2280.         positions within the original "string" argument, supplying just
  2281.         one number instead of a list of two numbers.
  2282.  
  2283.  
  2284.         To cause the cursor to be in "replace" mode rather than "insert"
  2285.         mode, the first number specifying cursor position should be made
  2286.         negative.
  2287.  
  2288.  
  2289.   If the user presses CANCEL during INPUT when there is some text in the
  2290.   command line, all the text will be erased without canceling INPUT; if
  2291.   CANCEL is pressed again (or with no text), then INPUT is canceled.
  2292.  
  2293.  
  2294.   Examples of use in a program:
  2295.  
  2296.  
  2297.        "Enter A, B, C" {
  2298.        ":A:
  2299.        :B:
  2300.        :C:" { 1 0 } V } INPUT
  2301.  
  2302.  
  2303.   Note: Put newlines between the three lines of the initial string.
  2304.  
  2305.   When executed, the screen shows:
  2306.  
  2307.  
  2308.        Enter A, B, C
  2309.        :A:(cursor appears here)
  2310.        :B:
  2311.        :C:
  2312.  
  2313.  
  2314.   If you now press 1 DownArrow 2 DownArrow 3 ENTER, the string returned
  2315.   on the stack is:
  2316.  
  2317.  
  2318.        ":A:1
  2319.        :B:2
  2320.        :C:3"
  2321.  
  2322.  
  2323.   If you then do OBJ-> on this string, you get (on separate stack
  2324.   levels):
  2325.  
  2326.  
  2327.        :A: 1
  2328.        :B: 2
  2329.        :C: 3
  2330.  
  2331.  
  2332.   The optional "tags" do not interfere with using the numeric values in
  2333.   functions, or storing them (tags are automatically removed in each
  2334.   case).
  2335.  
  2336.  
  2337.   Another example:
  2338.  
  2339.  
  2340.        "Type a new notecard" { Alpha-symbol } INPUT
  2341.  
  2342.  
  2343.   This allows the user to type any free-form text, which is returned as
  2344.   a string upon pressing ENTER.
  2345.  
  2346.   Simplest possible example:
  2347.  
  2348.  
  2349.        "" "" INPUT  (no message, empty initial command line)
  2350.  
  2351.  
  2352.   Potential problems with INPUT (if OBJ-> is to be used afterwards to
  2353.   get the values entered):
  2354.  
  2355.  
  2356.   o  You can't force the user to enter the exact number of values
  2357.      expected, so you may want to program defensively (check stack
  2358.      depth, etc...)
  2359.  
  2360.   o  Entries such as command names (e.g. CLVAR), program names, etc...
  2361.      will get executed by a subsequent OBJ->, producing undesirable
  2362.      effects (methods for dealing with this problem are available).
  2363.  
  2364.   For applications expecting non-text values to be entered, the HP48G/GX
  2365.   INFORM command is more immune to these problems, and affords much
  2366.   tighter control over what is entered, in addition to providing a more
  2367.   beautified display form, a separate prompt for each input field, etc.
  2368.   The syntax for INFORM is detailed elsewhere in the FAQ.
  2369.  
  2370.  
  2371.  
  2372. -----BEGIN PGP SIGNATURE-----
  2373. Version: PGPfreeware 5.0i for non-commercial use
  2374. Charset: noconv
  2375.  
  2376. iQA/AwUBOPgDMuhzXOws+qC7EQIJrACfY6zCI0h+lIAilncWchHYsfMQGPwAoMdB
  2377. r1vJvcbMYgutyGdSE5eFQCe2
  2378. =OAqz
  2379. -----END PGP SIGNATURE-----
  2380.  
  2381.