Search the FAQ Archives

3 - A - B - C - D - E - F - G - H - I - J - K - L - M
N - O - P - Q - R - S - T - U - V - W - X - Y - Z
faqs.org - Internet FAQ Archives

comp.sys.hp48 FAQ : 2 of 4 - Hardware, Programs, and Programming

( Part1 - Part2 - Part3 - Part4 )
[ Usenet FAQs | Web FAQs | Documents | RFC Index | Forum archive ]
Archive-name: hp/hp48-faq/part2
Last-modified: 4/14/2000
Version: 4.62
Posting-Frequency: Every 14 days or so

See reader questions & answers on this topic! - Help others by sharing your knowledge
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

post739
  6.1.  My HP48 seems to making a high pitched noise.

  From: Dave Arnett

  The guts of the HP48 keyboard are assembled from several layers of
  mylar and similar material.  Some of the layers have conductive ink to
  create switch contacts.  Some are insulators, with appropriately
  located holes through which the switch contacts meet.  Some are
  embossed with spherically domed areas, to provide the snap-spring feel
  when you press the plastic keys.  The entire multi-layer sandwich is
  assembled onto plastic pegs on the backside of the HP48 top case,
  along with the metal chassis, and then the pegs are "heat stacked",
  positively capturing and holding the matrix together.

  These parallel planes can act like a capacitive speaker.  Most
  loudspeakers in home electronics are inductive: a sheet or cone moves
  because current passes through an attached coil positioned in a
  magnetic field.  A capacitive speaker creates sound by moving a sheet
  or diaphragm due to electric charge forces, whether attracting or
  repelling.  The HP48 keyboard has the necessary characteristics to be
  a very inefficient (therefore quiet) capacitive speaker.

  When the HP48 "scans" the keyboard, charges are placed on the parallel
  sheets of mylar.  They tend to move as a result of the charge, and
  create a faint squeal or whine.  The loudness will depend on a number
  of factors, and can vary significantly from HP48 to HP48.  Some folks
  report that, on their HP48, the sound is stronger on the back than on
  the front; others report the opposite.


  6.2.  Can I upgrade my S or G to more than 32K ram?

  It is possible to do this by opening up the case and adding some
  memory chips.  There are several containing instructions and
  schematics available at:

  <http://www.hpcalc.org/docs/opening/>

  There is a web page on how to open your HP48 from the back at
  <http://www.contrib.andrew.cmu.edu/~drury/how2open.htm>

  This is an illustrated guide on how to open your HP48 from the back.
  It has full instructions, as well as 15 pictures of the calculator in
  various stages of disassembly.

  An alternate way to open your HP48 and upgrade it to 256K is described
  at the following site, along with lots of pictures:

  <http://studwww.eurecom.fr/~grundsch/>

  Another good site is:

  <http://www.geocities.com/CapeCanaveral/7584/index.html>

  WARNING:  It is possible to ruin your HP in the process of performing
  any one of these upgrades.  Do not even attempt it unless you are
  adept at working with small electronics.  The FAQ maintainer and the
  authors of the instructions take no responsibility for anything you do
  to your HP!


  6.3.  Can I add a lithium battery backup?

  From: Lee Studley <RStud39515@aol.com>

  I recently did a modification to my 48G by replacing the 32K ram with
  a surface mount 128x8 RAM.  Afterwards, I sandwiched 2nd and 3rd RAM
  chips by stacking them up and soldering.  The 2nd CS was jumpered over
  to the expansion pin 21a.  The decode for the 3rd part was easy to
  figure out.  I've also added a lithium battery to insure memory
  retention.  This thing now has 128K user memory, 128K in port 1, and
  128K in port 2.  Additional port 2 chips can easily be added.


  The 3 volt lithium battery used was the generic coin type. I just made
  room for the holder and battery by removing the aluminum shield up to
  the plastic post near the piezo element.  The positive terminal of the
  battery goes through a 470 ohm resistor into the anode of a schotky
  diode (only 0.2 volt forward drop).  The cathode end of the diode
  feeds the positive side of the big 1000 uF capacitor near the added
  74HC00.  This is the memory retention cap when the batteries are
  removed.

  This way, the lithium battery only gets used if the main batteries are
  removed or very low.  Seems to work well so far.  The ground
  connection broken by cutting the aluminum shield kills the reset and
  piezo contact points.  To fix this, I stretched the original piezo
  contact spring and cut it in half.  Then I soldered the cut piece to
  the ground "twisted" tab near the original spring.  (readers should
  verify this ground with a meter.)  This restored the lost functions.


  6.4.  How can I get/build a cable for my HP48?

  Some places that sell the HP48 also sell the cable required for
  interfacing with a PC.  Unfortunately, most don't.

  For information on how to build your own cable, see Appendix D-1.

  If you want to buy one, there are a few options.  Places like ElekTek
  sell them for around $20-$25.

  There are a few netters that make cables for sale also.  Contact:


  o  Chris Edmunds <chris@muffet.com>  Web page:
     <http://muffet.com/hp/cables/ad.html>

  o  Joel Kolstad <kolstadj@peak.org>

  o  Greg Lousteau <greg@gregjeff.com>
     <http://www.gregjeff.com/greg/cable.html>

  If you live in a larger city, you can look in the Yellow Pages for a
  listing of HP authorized dealers who either have the cables in stock
  or can order them in about the same time a mail order place can, but
  for a lower price..


  6.5.  HP seems to offer two link kits with different prices.

  HP offers two link kits, one which sells for about US$20, and the
  other which sells for about US$50.  The only difference between the
  two is the higher priced kit comes with software and a manual.  The
  cable, however, is the same in both kits.

  As mentionned in the next question, free alternatives to this software
  are readily available.  HP's software also includes some assorted
  miscellaneous programs and games, all of which are also available from
  HP via FTP or WWW.


  6.6.  Is there any communications software available?

  In Windows 3.x you can use Terminal (in Accessories).  In Windows 95
  and OS/2 Warp, HyperTerminal can be used, or you can use any other
  "terminal emulator" package with some level of embedded Kermit file
  transfer capability.


  However, the most complete functionality is available with full
  Kermit, which can be downloaded from  <ftp://kermit.columbia.edu/> or
  HP.  Columbia University is the original site for Kermit and has
  versions for nearly all operating systems, including all forms of
  Unix, Amiga, and Macintosh.

  Of course if you have a G/GX machine you can use X-Modem instead of
  Kermit (X-Modem is generally faster).  [Hyper]Terminal works fine for
  X-Modem as well.  Alternative file transfer software is available from
  the FTP sites mentionned in the Appendix, or can be purchased (e.g.
  Donnelly's HP48 File Manager).

  Also of interest are several freeware/shareware programs, including
  the HP48 Explorer for use with Windows 95.  This can be obtained at
  <http://members.tripod.com/~nberry/hp48g/index.html>.


  6.7.  Why doesn't the I/R port work farther than a few inches?

  It turns out that it is the receiver that is "crippled".  The transmit
  range is somewhere around several feet, and some people have actually
  written programs to make the HP48 emulate some remote controls (see
  Appendix E-1 for suggested programs).

  There are currently two stories going around as to why.  I will
  present both of them in the interest showing all sides of the story.
  You are free to decide which you believe:

  1. The head of the HP48 design team, Dr. William Wickes himself,
     alluded during the Chicago Handheld Conference that the IR was
     intentionally crippled due to the concerns of certain individuals
     in academia that students could literally 'beam' information from
     one 48 to another during examinations. (from Rick Grevelle)

  2. The reason the IR reception distance is so short is battery
     capacity.  The Infrared Transmitter is semaphore: It is only turned
     on when it needs to be on, and the transmission protocol is defined
     to minimize the ON time.  The receiver, by contrast, must be on
     continually when a transmission is in process, or when a
     transmission is expected. If you set your HP48 to Server mode, that
     receiver is drawing power. If you tweak the control bits to
     activate the receiver for any other reason, it is drawing power.
     The instantaneous peak power drawn by the transmitter is much
     higher than that of the receiver.  But in the long run, the
     receiver will draw more energy from the batteries.  Increasing the
     receiver sensitivity costs even more power.


  6.8.  Can my HP48 talk to my HP100LX via Infrared?

  Yes, it can, although slowly.  Set the HP100LX at 2400 bps, and put it
  in server mode (under the Kermit Commands menu).  Then you can send
  stuff from your HP48 to your HP100LX.


  6.9.  Can I use my HP48 to communicate with IrDA devices?

  From: David Johnson

  I have had great success communicating via IR with my HP48 GX rev. R
  and a NEC Versa 6050MH notebook PC.  However, I have found that speed
  is limited to 2400 bps.  I have successfully used IR communication
  under Win95 with DOS Kermit 3.14, HyperTerminal, HP48 Explorer, Yellow
  Computing Transfile Win 48, and Kermit v0.85 (Win32).


  I have had no success with Grab48 screen capture by HP or with HP PDL
  (only because I can't use a port higher than COM2).  In my case DOS
  Kermit requires a command like:


       set com3 \x03E8 \9     ; Syntax for nonstandard address or irq


  Which is the port and IRQ specified in my BIOS setup.  It doesn't seem
  to matter what IR speed I choose in the BIOS setup.  However, in all
  cases (even native Win95 applications) I must disable the IR drivers
  in Win95 and talk straight to the port/IRQ specified in the BIOS.  I
  can easily turn IR support on and off within a Win95 session with no
  ill effects via the control panel.

  Note that the HP48 is not actually IrDA compatible, but communicates
  with IR devices in non-IrDA mode.


  6.10.  Can I print to a LaserJet printer with an HP48?

  From: Derrik Pates

  Yes you can, but you need the HP PCL library from
  <http://www.hpcalc.org/utils/misc/pcl.zip>.  It allows you to
  communicate with any printer that supports PCL (all HP DeskJets and
  LaserJets, as well as some other laser printers and inkjet printers).
  You can hot-switch your resolution and turn PCL on/off with software
  commands.

  Although newer HP printers such as the 5P and 5MP have an IR port, you
  cannot use it to print directly from your HP48.


  6.11.  I downloaded a program but all I get is "HPHP48-..."!

  Some versions of Kermit distinguish between ASCII and binary files,
  and so you have to worry about the transfer modes at both ends of the
  connection (the HP48 SX end and the computer end).  For example, when
  receiving ASCII files, Unix Kermit must translate CR/LF pairs into LF.
  If the HP48 SX is transmitting a binary file, but the Unix Kermit is
  expecting ASCII, any CR/LF pairs in the binary file will get
  translated to LF, corrupting the binary file.  Unfortunately, you
  cannot "uncorrupt" the corrupted binary file by simply reversing the
  transfer and expecting Kermit to translate LF to CR/LF.  This is
  because the binary file may contain occurrences of LF that were not
  originally part of a CR/LF sequence.

  When a binary file gets corrupted, it will display on the stack as a
  string, starting with the characters "HPHP48-", and continuing on with
  a bunch of garbage.  Thanks to two programs, these strings can be
  reconverted to binary files right on the HP48.  These programs are:
  FIXIT, by Joe Horn and Mika Heiskanen, or OBJFIX, written by our
  friends at HP.  These are included in Appendix A-2.

  The major difference between FIXIT and OBJFIX is the way they operate.
  I have never personally had any problems with either.  FIXIT takes the
  bad "HPHP48-" string from level 1 of the stack, and replaces it with
  the correct binary object.  OBJFIX takes the name of the variable in
  which the "HPHP48-" string is stored from level 1 of the stack, and
  puts the correct binary object directly in the variable where the bad
  string was stored.  It's up to you which you prefer.  I would suggest
  reading the documentation of both before using either of them.
  There is also a quick fix available from Dan Kirkland:

  Here is a simple SYSEVAL program that will return a pointer to the
  object in those data transfer strings that start with "HPHP48-"

  Checksum: # 8FEh


       << "12" SWAP + # 402Bh SYSEVAL # 62B9Ch SYSEVAL >>


  That's all!  (Simple huh!)  Name?  Whatever you want!!  Works on all
  48s (S/SX, G/GX)


  6.12.  What is the structure of HP48 ASCII headers?

  From: Jorge Costa

  ASCII file headers such as %HPHP: T(3)A(D)F(.); are created by the
  HP48 when an ASCII file is sent to the PC and read when a HP48 ASCII
  file is received from the PC.  They serve to preserve various settings
  on your HP that affect ASCII transfers.  They do not affect binary
  mode transfers.

  Three parameters are saved: (T)ranslation Mechanism, (A)ngle Mode, and
  (F)raction Mark.


     Translation Mechanism:
        The possible ASCII translation schemes are as follows:


          T   HP48 -> PC                  PC -> HP48
          ---------------------------------------------------------
          0   No translation              No translation

          1   char 10 -> chars 10,13      chars 10,13 -> char 10

          2   Action 1 & translate        Action 1 & translate
              chars 128 - 159             \000 - \159 to HP48 chars

          3   Action 1 & translate        Action 1 and translate
              chars 128 - 255             \000 - \255 to HP48 chars


     To choose your favorite set, just type the number followed by the
     command TRANSIO on the HP48 command line.  Depending on which
     translation scheme you are using, the HP48 converts a different set
     of characters to PC ASCII format.  I would advise using option 3,
     since this forces the calculator to translate all symbols to pure
     ASCII (look for the table in page 27 - 16 of the HP48G series
     user's guide).  If you choose to use option 0 or 1, all characters
     from code 128 to 255 would be interpreted following the current
     code page of the PC setup - it will be unreadable!

     Also, if you are receiving ASCII files in your machine and you get
     a bunch of black squares, you can be fairly certain you are using
     translation mode 0, which makes the HP receive and store all
     newline characters (instead of eliminating them).
     Angle Mode:

     o  A(D) stands for degrees.

     o  A(R) stands for radians.

     o  A(G) stands for gradians.


     Fraction Mark:
        The HP48 can handle two types of fractions marks - the decimal
        dot or comma.  This option is available from the MODES input
        form (48G/GX) or menu 64.01.

        With regards to the ASCII header we have:

     o  F(.) means the format is dot.

     o  F(,) means the format is comma.

        If you try manually editing an ASCII file on the PC without a
        header, then try to send it to the HP48 using Kermit, you can
        obtain the following results:


          Number format     Text sent       Result (object stored)
               .               3.4             3.4
               .               3,4             3 4
               ,               3.4             3 4
               ,               3,4             3,4


     As you would expect, sending files with ASCII headers to the HP48
     with mismatching fraction mark settings, leads to an "Invalid
     Syntax" error during transfer.

     Now take a look at rows 2 and 3 of the table above - the object
     received by the HP48 is stored as a program object without the <<
     and >> composed by two real numbers - well, that normally can't be
     done in User RPL!

     In fact the resulting object is a very simple System RPL program
     object (the internal language of the HP48).  The conclusion is that
     when a file is sent without an ASCII header, the HP48 translates
     numbers with mismatching formats into System RPL secondaries
     (programs) of the form:


          :: %IntegerPart %FractionalPart ;


  6.13.  Why do Kermit transfers seem to get slower?

  From: Dan Kirkland

  The reason the HP48 Kermit routines are so slow is because they are
  written in System RPL.  Everytime the HP48 receives a packet (received
  as a string), it copies the previously received packets (string #1)
  and the new packet (string #2) to a new string (which becomes string
  #1 when the next packet is received).  This is why the HP48 Kermit
  gets slower and slower on big transfers (string #1 just keeps getting
  bigger).

  As to sliding windows...  Sliding windows really don't help much with
  a clean, lag-free connection.  And as most people connect their HP48
  directly to the computer they are transfering to/from with a very
  short line, it is almost always very clean and lag-free.  So, sliding
  windows have very little to offer HP48 transfers.

  Yes, properly written Kermit routines should be at least as good as
  ZModem, even without sliding windows.  And with a dirty, lagged
  connection, Kermit with sliding windows will blow ZModem away.  But
  then, this just doesn't happen very often with HP48 connections.

  Some claim that the HP48 can't do ZModem without tons of trickery
  because it doesn't have a large enough input buffer.  While this is
  true, it shouldn't be too hard to do.  And the same is true for Kermit
  if it is going to get ZModem type speed!  Small packets are more
  reliable, but much bigger packets are needed for speed.


  6.14.  Why does XRECV not work sometimes? (GX)

  Pre-Rev R. G Series 48's had a bug that would sometimes cause XRECV to
  fail if there was not twice the amount of room free for the incoming
  file. FXRECV, a fix for this bug, is available on the Horn 9 disk in
  the directory \HP as FXRECV.  There is more info about this bug there
  as well.   Note that FXRECV is not required for Rom R, and in fact
  will not run properly on Rom R.


  6.15.  Additional Tips on Transfers

  To use the least memory when doing transfers, it is a good idea to use
  the built-in "Transfer..." application only to set parameters (Wire,
  Baud, etc...)  but not to actually start a transfer with it; instead,
  press ENTER, then do either left-shift RECV (Kermit) or 0 FXRECV
  (Modified X-Modem).  Avoiding the fancy "dialog box" application
  leaves more memory free at the time of actual transfer.

  For best quick-start of a transfer, start the Kermit receive side
  before the transmit side.  For X-Modem the opposite is true: start the
  transmit side before the receive side (with only a short interval
  between each side's start).  Experiment a bit to find out what works
  best for you.

  Here is a small program for Kermit that lets you receive directly to a
  port:


       \<< -36 SF 1 \-> a \<< 'a' RECN a \>> SWAP STO \>>


  For the argument use either just a number (if receiving a library) or
  a port-tagged name such as :0: name (for other objects, and in fact
  for libraries as well, but only the port number is used).

  This program may be simpler to follow than the User's Guide directions
  for installing a library, since it encapsulates the several steps of
  storing in memory, recalling to stack, purging the variable, and
  finally storing to a port.  Even if you forget to supply the portname
  argument, the received object will still appear on the stack (provided
  flag -55 is clear), and you can finish storing it afterwards.


  6.16.  What do the funny symbols in this document mean?

  The symbols in this document such as \-> and \GS+ are the ASCII
  representation of the special HP48 graphical characters.  See the
  section "Character Translations" in the manual for a complete table of
  symbols <--> ASCII representations.


     SX:
        Chapter 33 (Volume II if 2 volumes)

     GX:
        Page 27-16 HP48 G Series User's Guide


  6.17.  What are the pinouts for the HP48 serial connector?

  Looking at the pins of the HP48 (the following diagram is showing the
  pins on the HP48, as you look at the calculator):


                      _________
                     | o o o o |
                      \_______/
                       ^ ^ ^ ^
                       | | | \------ 4 Signal GND
                       | | \-------- 3 RX (input to the HP48)
                       | \---------- 2 TX (output from the HP48)
                       \------------ 1 SHIELD

       Stated another way:

           HP48                    IBM 9 PIN               IBM 25 PIN
           (From the outside
            edge -> inward)
           SHIELD-------------------  SHIELD----------------  SHIELD
           TX (Output)<-------------2 RX (Input)------------3 RX (Input)
           RX (Input)-------------->3 TX (Output)---------->2 TX (Output)
           SGND---------------------5 GND-------------------7 GND


  This information is also on page 27-7 of the G/GX manual.


  6.18.  Is there any information on interfacing to the HP48?

  HP has made available an UNSUPPORTED document called the "HP48 I/O
  Technical Interfacing Guide", which contains information on the wired
  and serial I/O hardware.  Another HP document available is the "HP48
  I/O Software Interfacing Guide".  Also, there are a number of guides
  contributed by users on making your own serial/IR hardware.

  Look at  <http://www.hpcalc.org/docs/programming/> as well as the ftp
  sites listed in the Appendix.  If you find a good document, let me
  know so I can put it here!


  6.19.  How can I transfer programs/data from my HP-28S to my HP48?

  You use a program called "INPRT", which is available on GD #9.  Any
  previous version will crash the GX.  The new version's checksum is
  #EDF3h, and the old, SX-only version's checksum is #2280h.

  For each program that you want to transfer, you use the HP 28S to
  print it to the I/R output; INPRT, running on the HP48, reads the I/R
  output of the HP 28S and converts it into a program string.


  6.20.  Can I use rechargeable batteries with the HP48?

  The Rayovac "Renewal" batteries have proven themselves to be reliable
  in the HP48, but there are some problems with Nickel Cadmium (Ni-Cad)
  batteries.   You'll have to decide if using rechargeable batteries is
  worth putting up with the problems associated with them:


  o  You'll have to change batteries more often with rechargeable
     batteries.  Alkaline batteries can deliver power for a longer
     period of time, compared to rechargeable batteries.

  o  Once the low-battery indicator comes on, you'll have to change the
     rechargeable batteries pretty quickly.  With rechargeable
     batteries, you have only a few minutes before the calculator dies
     (it's been said that you have up to 15 minutes or so).  With
     alkaline batteries, you have an amount of time that is supposedly
     measured in hours.

  o  Ni-Cad batteries lose their charge with time, even if you are not
     using them.  Even if a Ni-Cad battery is just sitting unused on a
     shelf, it slowly loses its charge.  Alkaline batteries keep their
     charge for a very long time.


  6.21.  How can I tell, from within a program, if the battery is low?

  The following 48 program reports the status of the ALERT annunciator.
  The ALERT annunciator is activated by alarms or low battery.

  This program is provided free of charge "as is" and has no warranty.
  No one is liable for any consequential damages.  Preston


       %%HP:T(3)A(D)F(.);
       \<<
       RCLF
       8 STWS #FFh #0h +
       #10Bh
       #6595Ah SYSEVAL
       #8h AND #0h >
       SWAP STOF
       \>>


  6.22.  I lost the information on my RAM Card when I changed the bat-
  tery!

  You forgot to turn ON the calculator before changing the battery.  The
  HP only supplies power to the RAM card while the HP is turned on.
  While the calculator is turned off, no power is supplied by the
  calculator, and all power comes from the RAM card battery.  If you
  then take out the battery from the RAM card while the calculator is
  turned OFF, the RAM card has no source of power, and you will lose all
  of the contents in the RAM card.


  6.23.  Why do I get an "Invalid card data" error when I merge a RAM
  card?

  This message is usually seen when you plug a brand-new RAM card into
  an HP48.  In this case, this message is normal and is harmless.  It
  just means that there was no (valid) data on the card.


     GX:
        This message can appear when a RAM card contains ports you have
        never used.  Press purple/left shift-LIBRARY. Hit NXT, then the
        PINIT softkey.  This will initialize all available RAM ports.
        It does not affect data already stored on the card.

        If you see this message under any other conditions, it could be
        one of the following:


        1. You took the battery out of the RAM card while the card was
           out of the calculator, therefore erasing the memory.

        2. You took the battery out of the RAM card while the card was
           in the calculator BUT the calculator was turned off.  Note
           that the calculator supplies power to the RAM card ONLY when
           the calculator is turned ON.  Again the memory on the card is
           gone.

        3. The RAM card battery is dead.

        4. There is a problem with either the calculator, the RAM card,
           or both.

        If the battery is operational, then try to store something on
        the card.  If you still get the error message, then backup all
        your info to a computer or another 48, and do a hardware reset.


  6.24.  I've heard about other manufacturer's RAM cards.  Will they
  work?

  While some cards may work, there is a chance that you may severely
  damage your HP48.  You should only use cards specifically designed for
  the HP48.  Naturally, HP sells such cards, and some third parties also
  make cards that will work in an HP48.  Some cards work with both the
  S/SX and the G/GX.  Some, however only work on the S/SX, or only on
  the G/GX.  Make sure that the card is designed to work for your
  version before using it.

     SX:
        The S/SX can only naturally support up to 128K per port.  HP
        sells 32K and 128K RAM cards.   However, TDS, using software
        "bank switches" produces 256K and 512K RAM cards.  These bank
        switching cards do not work in the G/GX series.  CMT also makes
        128K cards, which work in all HP48 calculators.

     GX:
        While you cannot use the TDS 256K and 512K cards, Sparcom has
        come out with 256K and 512K cards for the G/GX only.  HP also
        sells 1MB RAM cards that work for G/GX only.  The G/GX is able
        to accept a 4MB RAM card, but none are on the market at this
        time.


  6.25.  How does RAM card locking work?

  From: Dave Arnett

  The HP48SX had three layers of write protection:


  o  The Seiko-Epson memory cards contain write protection.  Seiko-Epson
     is the OEM manufacturer for HP brand cards.  They developed the
     format, connector and pin definitions for the memory card
     interface.  We have a slightly modified version of their standard
     card where the low battery alarm limits are changed slightly.

     On an HP-branded RAM card, if you move the write-protect switch to
     the Protect position, two things happen.  First, the card itself
     ignores write cycles.  This is the first layer of defense for data
     integrity.  The card also changes the voltage level of one of its
     output pins to tell the HP that it is write-protected.

  o  The HP CPU chip detects the write protect indicator line of the
     card.  If it is reporting as unwriteable, the hardware locks out
     write functionality from the CPU chip.  This is the second layer of
     defense.  If this Card Detect line reports as writeable, then write
     transactions are permitted in hardware.  If the Card Detect line
     floats, the hardware reports that no card is installed.

  o  The HP system firmware checks the status of the write protection
     bits before writing to a memory card.  If the status bits indicate
     that the card is unwriteable (ROM or protected RAM), then the
     system code refuses to write to the card.

  In developing the HP48GX, we changed card handling in some significant
  respects.  I have recently posted information to the newsgroup on how
  the upper half of ROM and the card slot 2 are controlled through one
  pin of the Yorke CPU IC in a multiplexed fashion.  There are some
  details about the Yorke chip related to how various Saturn Bus deviced
  configure and unconfigure which required me to make the following
  hardware assignment changes:


       Hardware Resource            HP48SX            HP48GX

       CE1- Card Controller 1       Card 1            Bank Select Controller
       CE2- Card Controller 2       Card 2            Card 1
       CE3- Card Controller 3       Unused            Card 2

       CDT1- Card Detect 1          Card 1            Card 2
       CDT2- Card Detect 2          Card 2            Card 1


  Clearly, we had to assign Card Controllers and Card Detects in pairs,
  as much as possible.  Otherwise the hardware lockout would make a mess
  of things.

  A write protected RAM card in GX slot 1 has hardware lockout
  protection, since CDT2 can lock write actions to CE2.

  A write protected RAM card in GX slot 2 does not have the same HP
  hardware protection.  CDT1 is hardware coupled to CE1, which drives
  the Bank Select Controller.  Some may have wondered in my recent posts
  why the protocol for setting up bank settings uses READ operations
  rather than WRITE operations.  Now you know:  A WRITE operation to the
  Bank Select Controller would be ineffective if a ROM or Write-
  Protected RAM card is in Slot 2!

  The closest approximation to hardware write protection lies in the BEN
  (Bank Enable) line, which is bit 6 of the Bank setting.  Unless BE is
  set high, all attempts to access slot 2 are forbidden.  BEN is pin 10
  of the 74HC174 chip.  This line goes to pin 5 of the NAND chip to
  prevent Card Pin 21 from going active.

  The protocol in the HP48GX RPL Opertaing System implementation is to
  always leave BEN low, unless slot 2 activity is needed.  BEN should be
  set low again after card access is complete.

  So an HP48GX has three levels of card write protection as well:


  o  The card should prohibit Write activity if the protection switch is
     set.

  o  Slot 1 has the same hardware lockout as in the SX.  Slot 2 has a
     multi-step process necessary to enable access.

  o  The RPL system code checks the write-protect status before writing
     to a card.  It understands that CDT1 and CE3 map to card 2.


  6.26.  What are the advantages and disadvantages of covered ports?
  (GX)

  Covered ports are created when a card is placed in slot 2 of the GX,
  that is all ports >= 2.  The advantage of this is very large RAM cards
  are possible: 256K, 512K, etc... up to 4 MB.  Cards larger than 128K
  are split into multiple ports of 128K each controlled by a bank
  switching mechanism.

  The disadvantages are that the memory cannot be merged with user
  memory (even if only a 128K card is used).  Furthermore, some programs
  may be sensitive to the bank switching in covered ports, and may run
  slightly slower, improperly, or simply refuse to run at all.  In
  particular, many of the freeware programs written in machine language
  are affected.  Some contain special code to allow them to execute from
  both covered and standard ports.


  6.27.  Why does the HP48 display flicker slightly?

  Display flicker is usually caused by fluorescent lights.  The rapid
  pulsing of the fluorescent lights (60 Hz in the the U.S. and Canada),
  which is normally unnoticeable, interacts with the rapid
  pulsing/scanning of the HP48 LCD display (64 Hz refresh rate), which
  is also normally unnoticeable.  The 60 Hz fluorescent lights alias
  with the display refresh (64 Hz) to produce a 4 Hz "flicker".  It's
  normal and harmless.

  Outside the U.S. and Canada, power is supplied at a 50 Hz rate, not 60
  Hz.  This means that the display "flickers" at a 14 Hz rate, which is
  still noticeable.


  6.28.  I broke the LCD screen - is there an easy way to get another?

  Unfortunately, as far as I am aware, you cannot get a replacement, the
  cheapest alternative is to send the calc in for "standard service" at
  HP, which is slightly cheaper than a new calculator.  Opening an HP48
  is quite difficult anyway.


  6.29.  How can I protect my LCD?

  There are many ways to protect the HP48's LCD.  The solutions include:


  o  Inserting a piece of cardboard into the case.

  o  Cutting plexi-glass and putting it into the case (slightly better
     than cardboard).  A piece of plastic cut out of a CD jewel case
     works too.

  o  Even better than plexiglass (because it's really unbreakable and
     will resist any twisting) is an electronic circuit board as used
     for computer mainboards etc... which should be available in any
     electronics shop.  Another advantage to this method is the possible
     electrical shielding you get if there is a thin film of copper on
     one or both sides.  I would recommend a board with the copper on
     one side only - on the side pointing to the outer side of the HP's
     soft case.  After sawing it to the dimensions 79.5 mm x 179 mm x
     1.25 mm and rounding the four corners (radius 4 mm), it will fit
     perfectly in the inner sleeve of the HP48's soft case and can also
     be used to hold a self-adhesive label with the owner's name.  The
     small messages booklet will still fit, but it is better to store it
     on the outer side of the board so that the circuit board and the
     calculator will still fit together as tightly as possible
     (otherwise the booklet may break the LCD).

  o  Buying a hard case.  A variety of types are available, including a
     hard leather case or a totally waterproof case.

  o  Keeping it in a video cassette or pencil case during transport.

  o  Using the cover from an old TI-8x calculator and fitting it into
     the grooves on the side of the HP48.  Some people have had some
     success with this, but I find it barely fits.


  6.30.  Is there a rigid (protective) case for the HP48?

  An inexpensive solution to this is to go to Sears and get a Black
  Plastic Tool Box #9 65283 in the hardware deptartment.  It sells for
  only US $4.95.  The case is big enough for the calculator in its case,
  plus extra batteries.

  The case is a good fit for the calculator.  If you want to go a step
  further, you can get some foam, glue it into the top and bottom halves
  of the case, and cut out a calculator shaped hole in the bottom.  The
  result is lightweight, strong, secure and still leaves a little room
  for you to store extra batteries, a cable, and/or cards for your
  ports.  Another solution is to use a cheque book as a case.  Some
  cheque books just happen to fit the HP48, and provide a fair amount of
  protection.

  The final alternative is to purchase a case.  Eric Finley
  <etfinley@ucdavis.edu> sells protective hard cases for the HP48.  They
  are stainless steel, very strong, and look nice.  The cost is US $30.
  For more information, either e-mail Eric or check his web page at
  <http://www.ece.ucdavis.edu/~etfinley/>.


  6.31.  Can I use my Amateur Radio with my HP48?

  Yes, however you need to have a few things, the first being an amateur
  radio license.  The next thing you need is a terminal node controller.
  If you are able to, get a terminal node controller that supports XON
  and XOFF software flow control.  This is good to have because the HP48
  only has a 256 character buffer.  When the buffer is full, the HP48
  sends the "buffer full" signal and a terminal node controller with
  software flow control can quit sending data until the HP48 can keep
  new data in the buffer.  If you don't have a terminal node controller
  with software flow control, you can still use it, but you may lose
  some data.

  The next thing you will want is some software to use with the terminal
  node controller.  You could make your own software using user-rpl
  commands such as BUFLEN, SRECV, and XMIT.  However, there is a
  plethora of software available.  All you need is software then can
  send and receive data from the serial port.  There are several
  programs at  <http://www.hpcalc.org/utils/comms/terminal/> that you
  might like to try.

  There is also a site that has a lot of hp48 programs relating to ham
  radio.  Connect to  <ftp://oak.oakland.edu/pub/hamradio/hp48/> Please
  inform the FAQ maintainer if you find additional software, so it can
  be added to this list.


  7.  Questions about programs

  7.1.  Where can I get programs and information for the HP48?

  See Appendix E-1 for more info.


  7.2.  What are the Goodies Disks and where do I get them?

  See Appendix E-5 for more info.


  7.3.  How do I get access to the HP Calculator BBS?

  You can also access the BBS online at
  <ftp://ftp.hp.com/pub/calculators/>

  You can also access the HP Calculator BBS via a modem (note that this
  is a long distance call for most people):


       (208)-344-1691          2400 bps, 8N1
       (541)-715-3277          9600 bps, 8N1


  See Appendix E-4 for more BBS sites.


  7.4.  What are files that end with ".zip", ".Z", ".gz", or ".bz2"?


     zip
        Files that end with ".zip" are pkzip archives, which originated
        in the MSDOS world.  One program that can extract the files in
        ".zip" archives is the InfoZip "unzip" program.

        Binaries and source can be found at
        <http://www.cdrom.com/pub/infozip/>


     gzip
        Files that end with ".gz" have been compressed using the "gzip"
        compression command.  To uncompress these files, you must use
        either the "gunzip" or "gzip -d" command.  The "gunzip" program
        can also uncompress ".Z" files.  Binaries should be on all Unix
        systems, but if not you can try <ftp://ftp.gnu.org/pub/gnu/>

        More information should be there on binaries for other
        platforms.


     compress
        Files that end with ".Z" have been compressed using the Unix
        "compress" command.  To uncompress these files, you can use the
        "uncompress" command on Unix.  The "gunzip" program can also
        decompress these files.


     bzip2
        Another compression program gaining popularity is bzip2.  bzip2
        is a freely available, patent free, high-quality data
        compressor.  It typically compresses files to within 10% to 15%
        of the best available techniques, whilst being around twice as
        fast at compression and six times faster at decompression.

        Source and binaries for common platforms are available at
        <http://www.muraroa.demon.co.uk/>


  7.5.  What is a "ship" file?

  In the past, programs for the HP48 posted on comp.sources.hp48 were
  posted in the "ship" format.  This format made it easier for the
  moderator to distribute programs, but made it more difficult for users
  to extract and use these programs.  Some people still use ship.

  To extract programs distributed in the "ship" format, you need the
  following:


  1. A copy of the "ship" program, compiled for your platform.

  o  Sources for ship can be found at
     <ftp://ftp.cis.com/pub/hp48g/dos/> which also includes
     the DOS executable.

  o  Binaries for other platforms can be also be found at
     <ftp://wuarchive.wustl.edu/systems/hp/hp48/Posting/>

  2. A copy of the latest InfoZip "unzip" program or an unarchiver that
     understands the pkunzip v2.04g format.  Note that you cannot use
     older unzip programs, as old unzip programs do not understand the
     new compression formats.  See the previous section for information
     on where to get source and binaries.

  Once you have a copy of the "ship" and "unzip" programs, you use
  "ship" to convert the ship-encoded file into a .zip file, and you use
  the "unzip" program to extract the HP48 files from the ".zip" file.


  7.6.  What is the ASC format and how can I use it?

  The functions ASC\-> and \->ASC were written by William Wickes to
  facilitate transferring HP48 binary objects in an ASCII format (useful
  when transferring objects via electronic mail or bulletin boards).
  Some HP48 objects, like libraries, cannot normally be converted into
  ASCII, unlike program objects, and these functions make it possible to
  do so.

  The \->ASC function converts the object in level 1 into an ASCII
  string, which can then be uploaded to a computer for mailing.

  The ASC\-> function converts the string object in level 1 back into an
  object.  A checksum is used to ensure that the decoding is correct.

  A copy of these programs are given in Appendix A-1, near the end of
  this file.  Note however, that these functions aren't used much
  anymore.  The standard in the newsgroup seems to first zip the
  programs together and post them uuencoded.  But, you may still need
  these utilities for extracting older files you download.


  7.7.  What is the HYDE library, and how do I get rid of it?

  The HYDE library is a library that changes the messages on your HP48.
  It works on all versions of the HP48 and is available on Goodies Disk
  2.  The program (HYDE.TXT) is in the DNICKEL directory needs to be
  converted with ASC\->.  The instructions (HYDE.DOC) for the program
  are in the HORN2 directory.  The library is 3679.5 bytes, small enough
  to keep on your HP48 so you can install it on a friend's when they're
  not looking.

  Follow the previous instructions for installing the library, then go
  to the library menu and run HYDE.

  However, getting rid of the HYDE library is a little trickier.  First
  you must type JEKY on the command line.  This will disable the HYDE
  library and restore the standard set of messages.  Then you can follow
  the normal instructions for deleting a library.


  7.8.  What is the Minehunt game, and how do I use it?

  The Minehunt game is a game built in to the G/GX.  It was also
  included on the HP Equation-Library Card (for the HP48 SX).

     GX:
        It is located in the UTILS menu of the left-shift(purple) EQ LIB
        menu.  (Left-Shift {EQ LIB], {UTILS}, {MINEHUNT}).  See page
        25-14 of the manual for a game explanation and picture.

     SX:
        It is located in the UTILS library.

  You can save a game by pressing the STO button. This creates a
  variable with the name MHpar. If you are in the directory containing
  that variable, you will resume your old game when you run MINEHUNT.

  To select the number of mines for your next game just store a number
  in a variable, Nmines (it's case sensitive), and you'll get that many
  mines.  If you store a negative number, you'll get the absolute value
  of that many mines, AND all mines will be visible.

  You can also move diagonally if you use the numbers as arrows: 1 is
  down+left, 2 is down, 3 is down+right, 4 is left, 6 is right, 7 is
  up+left, 8 is up, and 9 is up+right.
  8.  Questions about programming and advanced user functions

  8.1.  I've heard the names RPL, Saturn, STAR, GL etc...  What are
  they?


     ASAP
        This is a simple Saturn assembler, written in the Perl language.

     Chip8, Chip48, Schip, Schip8
        This is a machine-code program that was inspired by the chip8
        video game interpreter for the RCA CDP1802 microprocessor
        several years back.  Chip8 allows you to write a simple
        graphics-based video game for the HP48 SX.  Among the games
        written are "clones" of Breakout, PacMan, and Pong, to name a
        few.

        Chip48, Schip and Schip8 are two different names for an enhanced
        version of chip8 specifically designed for the HP48 SX.  People
        have written programs to assemble Schip assembly language into a
        form directly usable by Schip on an HP48.  Schip interpreters
        are available for both G and S series.

     GL GL (Game Language) is a language for the programmer who wants
        almost the speed of assembly, but who doesn't want to spend a
        lot of time and effort to learn all the tricks of assembly
        programming on the HP48. GL has an assembly-like syntax, and
        there is an assembler for PC and one for the HP48 itself. Since
        GL is an interpreter, the GL library (3 KB in size) must be
        installed on the HP48 to run GL programs. The instruction set is
        powerful, with sprites and pixel based graphics, scrolling,
        sound, keyboard control, and more. There are 256 1-byte
        registers which can be used in pairs as 2-byte words. A GL
        program can be up to 64 KB in size.  GL was inspired by SCHIP,
        but it is much better in all aspects.  It is suitable for many
        applications, not only games, that require high speed.  Of
        course it works on both the HP48 S/SX and the G/GX.  GL is
        written by Erik Bryntse.

     Java
        Java is a library that displays an improved 5 level stack.  It
        combines the best of SOL, HPSauce, EQStk, and others.  Plus
        there are several new features and improvements!  The intent of
        Java is to provide a more useful and faster stack environment
        for HP48 calculators.

        The HP48 Java library has no connection at all to the Sun
        Microsystems product of the same name.  Since the Java library
        is not a commercial product, we do not expect this to a problem.

     Jazz
        This is best System RPL and Machine Language development library
        that runs right on your HP48!  Written by Mika Heiskanen.  The
        Jazz library provides commands for assembling, disassembling and
        debugging both System RPL and machine language.

     ML Machine Language.  This is usually used in reference to HP48
        assembly language programming.

     MLDL
        Machine Language Development Library.  This is a library that
        allows you to debug machine language programs with only an HP
        48.

     PDL
        "Program Development Link".  This is an DOS program, sold by
        Hewlett-Packard, that allows you to write and develop HP48
        applications from your IBM PC clone.  Programs are written on
        your PC, transferred to the HP48, and tested from your PC (and
        not the HP48).

     RPL
        RPL is the name of the language used to program the HP48 and
        HP-28 series calculators.  RPL stands for "Reverse Polish Lisp".
        It's interesting to note that an HP Journal article incorrectly
        described RPL as "ROM-based Procedural Language".

        From Bill Wickes:

        RPL stands for Reverse Polish Lisp.  In the early days of RPL
        development, we got tired of calling the unnamed system "the new
        system," and one of the development team came up with "RPL,"
        both as a play on "RPN" which has been the loved/hated hallmark
        of HP calcs forever, and as an accurate indication of the
        derivation of the language from Forth and Lisp.

        RPL was never particularly intended to be a public term; at the
        time of the HP Journal article (August 1987) on the HP 28C there
        was an attempt to create a less whimsical name--hence "ROM-based
        procedural language," which preserved the initials but had a
        more dignified sound.  The development team never calls it
        anything but (the initials) RPL.  You can choose either of the
        two full-word versions that you prefer.  Or how about 'Rich
        People's Language?'

     SASS
        SASS is a simple Saturn assembler, written in C/yacc (BSD Unix &
        Bison).  It uses Alonzo Gariepy's mnemonics.

     Saturn
        "Saturn" is the internal code name for the processor used in the
        HP48, HP-28 series, and many other calculators (just about all
        HP calculators since the HP 18/28 series).

     STAR
        This is the "Saturn Macro Assembler" (how "STAR" comes from
        this, I don't know), an assembler that uses mostly Alonzo
        Gariepy's mnemonics.  It's written in C and runs on many
        different machines (PCs, Amigas, Unix, etc.).  STAR is available
        via anonymous ftp from
        <ftp://ftp.hp.com/pub/calculators/unix/star-1.04.4.tar.gz>

     System RPL
        This is the name for the custom "operating system/language" used
        to program the CPU used in the HP48 calculator.  System RPL is a
        superset of the normal user RPL commands; in addition to the
        normal, user-accessible RPL commands, system RPL includes many
        lower-level functions.  System RPL is a language one step higher
        than assembly language.

        HP has released a system development toolkit (for the IBM PC)
        containing a system RPL compiler, assembler, and loader,
        complete with a couple hundred pages of documentation.  This
        toolkit, while copyrighted, is, for the most part, freely
        copyable.  If you can find a BBS or archive site that has it,
        you can download all of the system RPL files and documentation.

     USRLIB
        USRLIB is a program that takes the contents of an HP48 directory
        and turns it into a library object.  It currently runs under
        MSDOS.

     Voyager
        Voyager is an "interactive disassembler" for IBM PC clones that
        disassembles HP48 SX RPL and machine code.  You download a copy
        of the RAM and ROM in your HP48 SX to your PC, and run Voyager.
        Using Voyager, you can then view the disassembled or unthreaded
        code.  Unfortunately (or fortunately), Voyager uses the HP
        mnemonics, and not Alonzo Gariepy's mnemonics.  Voyager is
        available from the HP BBS <ftp://ftp.hp.com/pub/calculators/>,
        and from various bulletin boards (the HP handhelds forum in
        CompuServe also has a copy).  The latest version is "1.07".


  8.2.  Is there a C compiler for the HP48?

  Yes.  Alex Ramos has written a GNU C back end for the Saturn
  processor.  Binaries are available for both Linux and Windows 95/NT,
  and source is available for compilation on other platforms.

  Check  <http://www.cris.com/~ramos/hp48/hp48xgcc.htm> for the latest
  version.


  8.3.  Why do SysRPL programs run faster than UserRPL programs?

  SysRPL is the built in language, custom designed for the Saturn
  processor used the HP48 family.  UserRPL is a "subset" of SysRPL.  The
  main reason for the speed difference is the fact that UserRPL commands
  have built in argument and error checking.  In SysRPL, the programmer
  is responsible for all error checking to avoid memory clears.

  Note that System RPL is a compiled language and that therefore you
  need a program like Jazz or GNU-Tools to create it.  This means you
  can't edit or view SysRPL on the HP48 directly, unlike UserRPL.
  However both can be run the same way.


  8.4.  What is a good reference for learning SysRPL and ML?

  Jim Donnelly's book "An Introduction to HP48 System RPL and Assembly
  Language Programming" provides 230 pages of step by step instructions
  for new programmers with plenty of examples.  It also comes with a 3.5
  inch disk containing the examples in source form and HP's development
  tools for DOS.  It was previously available from EduCalc, I'm not sure
  if it is available elsewhere.

  The ISBN number is: 1-879828-06-5

  Also useful are RPLMAN.DOC and SASM.DOC available on Goodies Disk 4.
  See Appendix E-5 for more information.  You might want to also have a
  look at the following URL:  <http://titan.cs.uni-
  bonn.de/~wolfrum/hpbooks.html>

  Examples of ML programming can be found at:


  o  <http://www.geog.ubc.ca/~amoy/>

  o  <http://www.ite.mh.se/~danli97/>


  8.5.  Can I make my own libraries?  Can I split others?

  Yes, you can either use USRLIB in HP's development tools to create
  libraries in DOS, or you can make them right on your HP with hacking
  utilities like Rick Grevelle's D->LIB and L->DIR which can both create
  and split libraries from/to directories.  These can be found in Mika
  Heiskanen's HACK library at <http://www.engr.uvic.ca/~aschoorl/>


  8.6.  How do I know what library ID number to use for my program?

  Note: While this document says HP48 SX, it is also valid for GX.

  HP48 SX Library ID Numbers Paul Swadener, HP Developer Support.  03
  Sep 1993

  The HP48 will become confused if two or more libraries currently in
  the machine have the same ID numbers. To help third party developer
  efforts, HP maintains a list of HP48 Allocated Library ID Numbers.

  Below are the "rules." The penalty suffered from not following these
  rules is that your library may not work if another library is in the
  machine with the same number.


  1. Don't use any number in the range 000h through 300h. These are
     reserved for HP's use.

  2. Don't use any number in the range 301h through 5A0h unless you have
     been assigned that number by HP. These numbers are reserved for
     developers who are in the business of distributing their software,
     that is, Independent Software Developers.

     To apply for the allocation of an ID# contact Paul Swadener,
     Hewlett-Packard Company, 1000 NE Circle Blvd., Corvallis, OR 97330,
     fax number 541-715-2192, internet address
     paul_swadener@hp6400.desk.hp.com. You must be a registered
     developer and supply the name/nature of your product, and current
     shipping address and phone/fax/internet add./etc.

  3. Use a number in the range 5A1h through 600h for experimental work
     and software. HP does not track the use of these numbers.

  4. Use a number in the range 601h through 6F6h for your personal
     applications, those which you will share, if at all, only to a
     known set of other users for personal uses. HP does not track the
     use of these numbers.

  5. Don't use any number in the range 6F7 through 6FF, as these numbers
     were allocated before the formal allocation process in was
     instituted.

  6. Don't use any number above 700h. These are also reserved for use by
     HP.

  Hope this helps clear up how library numbers work.


  8.7.  What information is there on the internals of the HP48?

  The most important documents are part of the "System RPL" development
  tools, a completely unsupported set of IBM PC tools created by HP
  Corvallis (the creators of the HP48).  The tools, which run on DOS
  machines only, contain documentation on:

  o  System RPL (which includes information on HP48 SX display graphics,
     keyboard control, etc.).

  o  Saturn assembly language ("Saturn" is the name of the CPU in the
     HP48), including information on a Saturn assembler.


  o  A system RPL compiler.

  o  A Saturn object file linker.

     However the documentation is also useful for some of the newer
     program development tools such as Jazz and GNU-Tools.  (See the
     next question on where to obtain these).


  8.8.  Where can I get some programming development tools?

  HP's unsupported System RPL development tools and documentation are
  available to customers free of charge to help them in HP48 application
  development, subject to certain legal terms, which are given with the
  tools (they're too long and detailed to give here).

  You can get a copy in one of the following ways:

  o  Anonymous ftp to  <ftp://ftp.hp.com/pub/calculators/>

  o  Get Goodies Disk 4.  For info, see Appendix E-5.

     Alternatively, you can use one of the packages put together by
     members of the HP community.  In particular, Jazz is a library by
     Mika Heiskanen which allows you to program in System RPL and
     Machine Language directly on your HP48!  It requires either an SX
     with a RAM card, or a GX.

  Jazz is available at  <http://www.engr.uvic.ca/~aschoorl/>

  There also is GNU-Tools by Mario Mikocevic (Mozgy) which is set of
  replacements for HP's development tools that not only runs on DOS, but
  also typical Unix systems such as Linux and Solaris.  It is
  distributed in both source and binary form.

  GNU-Tools is available at:

  o  <ftp://gnjilux.cc.fer.hr/pub/hp48/gtools/>

  o  <http://www.zems.fer.hr/~mozgy/jwz/hp48.html>


  8.9.  I know UserRPL.  How do I get started in SysRPL?

  Here is a quick guide to learning System RPL.  See the other questions
  for more information on where to obtain the items below.


  o  Learn UserRPL first, and become familiar with most commands.

  o  Get Goodies Disk 4 (HPTOOLS) or GNU-Tools if you have Linux etc...

  o  Get the new release of supported entries, available with GNU-Tools
     (not the entries in Goodies Disk 4).

  o  Read RPLMAN.DOC and/or get Jim's Donnelly book; it makes things
     easier.

  o  Get ENTRIES.SRT from the HP48 IRC channel.

  o  Get the tables from the SAD package by ftp to
     <ftp://ftp.hp.com/pub/calculators/>

  o  Get Jazz for your HP when you are ready.


  o  You can learn a lot by studying the ROM and other people's programs
     with Jazz!


  8.10.  Are there any viruses for the HP48?

  There are several, and most are French.  In the United States, a virus
  called the "Michigan virus" erupted a couple of years ago.  There is a
  program on Goodies Disk 8 that checks for the Michigan Virus.
  Currently, viruses do not pose an appreciable threat on HP48's.


  8.11.  How do I store fields of variable length effectively?

  See Appendix A-5 near the end of this file.


  8.12.  What is "Vectored Enter", and how do I use it?

  From: Bill Wickes

  The HP48 manuals do not document a very powerful feature that we call
  "Vectored ENTER," that allows you in effect to redefine or bypass the
  command line parser and to have a shot at the stack etc. after the
  command line has been executed.

  Keys that execute an automatic ENTER perform a two-step process:

  1. The command line is parsed and evaluated.

  2. The key definition is executed.

     When flags -62 and -63 are both set, the system extends this
     process as follows:

  1. The current path is searched for a global variable named *aENTER
     (where "*a" is the Greek alpha character--character 140).  If
     present, the command line is entered as a string object and *aENTER
     is executed.  If absent, the command line is parsed and evaluated
     normally.

  2. The key definition is executed.

  3. The current path is searched for a global variable named *bENTER
     ("*b" is Greek beta--character 223).  If present, then a string
     representing the key definition is put on the stack, and *bENTER is
     executed.  The string is the key definition object's name if it is
     a command, XLIB name, global or local name, or an empty string for
     other object types; its primary purpose is to implement things like
     the TRACE mode on other calcs, where you can print a running record
     of what you do.

     A simple example of the use of *aENTER is to create a more
     convenient binary calculator, where *aENTER slaps a "#" on the
     front of the command line so you don't have to bother when entering
     numbers.


  8.13.  What is "WSLOG"?

  It is an until recently undocumented feature which stands for "Warm
  Start Log" (it is listed in the command appendix of newer G manuals,
  as well as being fully explained in the AUR).

  Type in WSLOG in caps, and calc will list the time and cause of the
  last four warm starts.  This feature helps HP technical support to fix
  your HP48 in case it crashes.


       0 - log cleared by <ON> <SPC> then <ON>
       1 - low battery condition, auto deep sleep mode invoked to save battery
       2 - hardware failed during IR (time out)
       3 - run through address 0
       4 - system time corrupt
       5 - deep sleep mode wake up (alarm?)
       6 - unused
       7 - CMOS test word in RAM was corrupted
       8 - abnormality was detected about device config
       9 - corrupt alarm list
       A - problem with RAM move
       B - card module pulled
       C - hardware reset
       D - system RPL error handler not found in run stream
       E - corrupt config table
       F - system RAM card pulled


  8.14.  What are SYSEVALs?

  SYSEVALs are addresses that point directly to a location in the HP48's
  ROM. Many SYSEVAL hex strings are System-RPL commands.  Because there
  is no argument checking, it very easy to clear your HP48's memory.

  In the file SYMBOLS.GX, HP designates three types of entries.  The
  first type is "supported."  This means that a particular entry will
  work on ALL versions of the HP48 and HP supports the use of this
  entry.

  The second type of entry is "unsupported."  This means that HP does
  not support the use of this entry and it will not be the same on all
  versions of the HP48.

  The third type is "unsupported-static."  This is an entry to HP does
  not support the use of, but it is the same for all versions.


  8.15.  What are some useful SYSEVALs?

  For a complete list of supported entry points, see
  <http://www.engr.uvic.ca/~aschoorl/>

  In System-RPL, different HP object types are referred to by symbols.
  These symbols are used to construct stack diagrams, which tell the
  user how to use System-RPL commands.  Here are some of the symbols:


       Symbol  Type                        Example
       ------  --------------------        -----------------
       $       string                      "ABCDEFG"
       id      Global Name                 'A'
       arry    Array                       [[ 1 2 ] [ 3 4 ]]
       grob    HP48 Graphics Object        Graphic 131x64
       #       Binary Number               <1h>
       symb    Symbolic Object             'A^2+B^2'


     To interpret the stack diagram:
        Everything on the left of the -> arrow is the input.  That needs
        to be on the stack before executing the SYSEVAL.  The symbols
        show you which kinds of data to put on the stack.  Once you
        execute the syseval (see next paragraph), the HP will return the
        data back that is indicated on the right side of the arrow.

     To use the following entries, do the following:

        1. Make sure (triple check) that the appropriate arguments are
           on the stack.

        2. Push Right-shift /, you should get a # on the command line.

        3. Enter the hex string exactly as shown in the hex string
           column.

        4. Put an small case h at the end of the hex string.

        5. Press enter.

        6. Type SYSEVAL.

  Here are just a few examples:


       Hex    Sys-RPL Name    Category            Stack Diagram
       ---    ------------    --------            -------------

       15777  NULLID          Supported           ( -> '' )
       30794  VERSTRING       Supported           ( -> "HPHP48-?" )
       3A328  MakeStdLabel    Supported           ( $ -> grob )
       3A3EC  MakeDirLabel    Supported           ( $ -> grob )
       3A38A  MakeBoxLabel    Supported           ( $ -> grob )
       3A44E  MakeInvLabel    Supported           ( $ -> grob )
       3A1FC  DispMenu.1      Supported           ( -> )
       05F42  GARBAGE         Supported           ( -> )
       41F65  WaitForKey      Supported           ( -> #KeyCode #Plane )
       353AB  SYMB>IDS        Unsupported-Static  ( symb -> list )
       40D25  LockAlpha       Supported           ( -> )
       40D39  UnlockAlpha     Supported           ( -> )
       3AA0A  1A/LockA        Supported           ( -> )
       44C31  DoNewMatrix     Supported           ( -> arry )
       44FE7  DoOldMatrix     Supported           ( arry -> arry' T/F )
       1314D  TOADISP         Supported           ( -> )
       13135  TOGDISP         Supported           ( -> )
       39531  ClrDA1IsStat    Supported           ( -> )
       130AC  RECLAIMDISP     Supported           ( -> )
       4E347  TURNMENUON      Supported           ( -> )
       05B15  $>ID            Supported           ( $ -> id )
       05BE9  ID>$            Supported           ( id -> $ )
       3A1E8  DispMenu        Supported           ( -> )
       39BAD  DispStack       Unsupported-Static  ( -> )


  8.16.  What are LIBEVALs?

  From: Joe Horn (Copied from "libeval.doc" on GD 9)

  The G/GX has a new command: LIBEVAL.  It's sort of like SYSEVAL, but
  instead of taking a memory address (which could be ambiguous due to
  the G/GX's massive need for bank switching), it takes XLIB numbers.
  It's a "back door" for us hackers.  Unlike the ELSYSEVAL command in
  the HP Solve Equations Library Card, which only worked for the
  libraries in that card, LIBEVAL works for any library, including the
  hidden ones in the operating system.


       CAUTION: LIBEVAL, like SYSEVAL, is both powerful and danger-
       ous. If used with incorrect input(s) and/or in the wrong
       environment, it can nuke your memory.


  LIBEVAL takes a single user binary integer of the form #LLLFFFh, where
  LLL is the library ID (hex), and FFF is the three-digit function num-
  ber (hex, with leading zeros if necessary).

  For example, the R->B command is XLIB 2 9.  So you can perform a R->B
  by executing #2009h LIBEVAL.  Try it: 10 #2009h LIBEVAL -> #Ah.

  Using it for named commands is unnecessary, but the G/GX is highly
  XLIB oriented (again, due to the need for bank switching), and there
  are many useful and interesting features accessible only through
  LIBEVAL.

  A prime example is the G/GX's inability to programmatically launch the
  new "dialog boxes".  Suppose a program needs to print things; it would
  be awfully nice to be able to throw the I/O PRINT dialog box onto the
  screen.  The User's Guide is no help here, and in fact it would seem
  impossible to do.  But #B4197 LIBEVAL is all it takes!  Try it.  Cool,
  huh?


  8.17.  What are some useful LIBEVALs? (GX)

  See Appendix B-3 for a few GX LIBEVALs.


  8.18.  What is the format of a GROB object?

  Note: I received two very good answers to this question, and each
  cater to a different kind of user, so I will include them both.


     The easy way:
        First, add pixels to the right-hand edge to make the horizontal
        dimension a multiple of 8, then separate the object horizontally
        into groups of four pixels.  Suppose, for example, you want to
        make this into a 22x8 GROB:


          ---------****---------
          --------**--**--------
          -------**----**-------
          ********------********
          ********------********
          -------**----**-------
          --------**--**--------
          ---------****---------


     You would break it up like this:


     ---- ---- -*** *--- ---- ----
     ---- ---- **-- **-- ---- ----
     ---- ---* *--- -**- ---- ----
     **** **** ---- --** **** **--
     **** **** ---- --** **** **--
     ---- ---* *--- -**- ---- ----
     ---- ---- **-- **-- ---- ----
     ---- ---- -*** *--- ---- ----


     Notice, I've added two columns of pixels to make it 24x8.  Now,
     each group of four can be represented by a hexadecimal digit.


          ---- 0          --*- 4          ---* 8          --** C
          *--- 1          *-*- 5          *--* 9          *-** D
          -*-- 2          -**- 6          -*-* A          -*** E
          **-- 3          ***- 7          **-* B          **** F


     Now, replace each group of four pixels with its corresponding
     hexadecimal digit: 00E100  003300  081600  FF0CF3  FF0CF3  081600
     003300  00E100.

     So, your final grob is:


          GROB 22 8 00E100003300081600FF0CF3FF0CF308160000330000E100


     The technical way:

        1. Every HP object format is described in RPLMAN.DOC, see this
           file for more info.

        2. All HP objects are (of course) nibble based.  When viewing
           them on the PC, which is byte based, the low order nib is
           always read and written first.

        3. HP objects begin with a 5 nib prologue which identifies the
           object type (and other things).  This is the prologue for a
           grob object..


             02B1E pr HP:DOGROB
             02B1E @  Graphic prologue (/U GROB)


        4. Every 5 nib sub field of an object, such as prologue, length,
           etc., is read in reverse order (low nib first).  The grob
           prologue would appear E1B20, or 1E 2B x0 in a hex dump on a
           PC.  The least significant nibble of the next field begins
           right at the x in x0.

        5. It is customary to always work with HP objects on the PC with
           the HPHP48-E header (substitute your favourite rom version
           letter) preceeding the prologue.  This gives no hassles when
           downloading via Kermit or X-Modem.
        PC hex dump of a grob object.. ( remember each 5 nib field is
        reverse order )

        1. "HPHP48-E" 8 byte ascii string with msb off

        2. 5 nib prologue, 02B1E (hex)

        3. 5 nib length field, includes length of body AND length and
           height fields!  does not include 5 nib prologue.  So, the
           total #nibs the grob object takes in HP memory is this number
           + 5.  Important!

        4. 5 nib height field  ( yes, it is height then width )

        5. 5 nib width field

        6. body (described below)

        The grob object looking at it using command line EDIT on the
        HP..


          GROB <width (dec)> <height (dec)> < body >


     The body is exactly the same looking at it on a PC hex dump or on
     the command line EDIT.  Just remember to read low nibble first for
     hex dump.

     Because of hardware restrictions, the number of nibs required to
     represent one horizontal line must be even (byte aligned).  So, use
     this method to calculate the number of nibs in one line..   (pascal
     example)


          nibs := width div 4;
          if nibs mod 4 <> 0 then nibs := nibs + 1;
          if odd(nibs) then nibs := nibs + 1;


     Then to get the #nibs in the entire body, multiply it by the
     height.  Remember, the length field must be this total body length
     + 15 !

     For example, a 131 wide grob requires 34 nibs for one horizontal
     line, where 5 of the bits are unused.  The first nib in the second
     line begins at nib 35 for this grob, etc...  If the grob is 64
     lines, then the body is 2176 nibs.  Add 5 for the prologue, 5 for
     the length field, 5 for height, and 5 for width.  Total object size
     (on the HP) is 2196 nibs, or 1098 bytes.  The length field should
     contain 2196 minus 5 for prologue = 2191 (0088F hex)

     Note that for each nib, the right-most bit is the left-most pixel
     on the screen.  This is nearly always the case for graphic memory.


  8.19.  What is the AUR and what information does it contain?

  From: Jarno Peschier <jpeschie@cs.ruu.nl>


  In this text I will try to answer a number of frequently asked
  questions about the HP48 G Series Advanced  User's Reference Manual.
  In the remainder of this text I will use the common abbreviation AUR
  when referring to this book.

  A good link for AUR information is at:
  <http://www.contrib.andrew.cmu.edu/~drury/hp48gaur/>

  The questions I will try to answer are:


  o  What is the AUR?

  o  What information does the AUR contain?

  o  Do I need the AUR?

  o  Why didn't HP supply the AUR with every HP48?

  o  Where can I get the AUR?

  o  Does the AUR contain any SYSEVALs and/or LIBEVALs?

  o  Does the AUR say anything about SysRPL and/or ML?


     What is the AUR?
        The AUR is just what it's name tells you it is: it's a reference
        manual for the HP48 G Series.  It has the same outside
        appearance as the  HP48 G Series User Guide (the manual you get
        with your HP48 G or HP48 GX when you buy it), except that it's
        much thicker (just under 4 cm).  The AUR contains about 650
        pages of useful information about your calculator.

     What information does the AUR contain?
        The AUR contains information about UserRPL programming, quite a
        lot of programming examples, a complete command reference for
        all the (UserRPL) commands the G Series knows and reference
        lists about all equations, error and status messages, units,
        etc...  Of course it has an extensive index at the back of the
        book.


        Chapter 1: Programming
           Contains: Understanding Programming, Entering and Executing
           Programs, Viewing and Editing Programs, Creating Programs on
           a  Computer, Using Local Variables, Using Tests and
           Conditional Structures, Using Loop Structures, Using Flags,
           Using Subroutines, Single-Stepping through a Program,
           Trapping Errors, Input, Stopping a Program for Keystroke
           Input, Output, Using Menus with Programs, Turning Off the
           HP48 from a Program.


        Chapter 2: Programming Examples
           Contains: Fibonacci Numbers, Displaying a Binary  Integer,
           Median of Statistics Data, Expanding and Collecting
           Completely, Minimum and Maximum Array Elements, Applying a
           Program to an Array, Converting Between Number Bases,
           Verifying Program Arguments, Converting Procedures from
           Algebraic to RPN, Bessel Functions, Animation of Successive
           Taylor's Polynomials, Programmatic Use of Statistics and
           Plotting, Trace Mode, Inverse-Function  Solver, Animating a
           Graphical Image.


        Chapter 3: Command Reference
           This chapter contains one entry for every command (except for
           RULES) from ABS to ZVOL and  + to  ->.  Each entry contains:

        o  A description of what the command does (with stack diagrams).

        o  Ways in which you can access it from the keyboard (with
           submenu you need, or if you can only type it in in Alpha-
           mode).

        o  Which flags the command is affected by.

        o  Remarks, and a list of related commands.

           Often a command has one or more example programs too. This
           chapter is the bulk of the whole book; it's 424 pages thick.


        Chapter 4: Equation Reference
           This chapter contains one entry for every section in the
           built in Equation Library (EQLIB).  Each entry contains: a
           table of used variables and then for every set of equations
           an entry with some more info about the equation set, the
           picture that goes with it (if any), all the equations and one
           or more sets of example numbers and solutions.  The end of
           the chapter has a list of references from which all the
           equations were taken.


        Appendix A: Error and Status Messages
           This chapter contains two tables with all possible messages.
           The first has them sorted alphabetically and shows the
           message, the meaning and the ERRN number in hex.  The second
           has them sorted on ERRN number (and thus on category) and
           only contains the number in hex and the message itself.


        Appendix B: Table of Units
           This chapter contains a table with all units the HP48 G
           Series knows.  It contains the unit (both the name you use on
           the calculator as well as the full name) and the value it
           represents in SI units.


        Appendix C: System Flags
           This chapter contains a table with all the system flags of
           the HP48 G Series.  The table contains the number followed by
           a description of it's use and the results you get when the
           flag is set or clear.


        Appendix D: Reserved Variables
           This chapter contains a table with all the reserved variables
           of the HP48 G Series (ALRMDAT, CST, "der"-names, EQ, EXPR,
           IOPAR, MHpar, Mpar, n1/n2/..., Nmines, PPAR, PRTPAR,
           s1/s2/..., VPAR, ZPAR, SigmaDAT and SigmaPAR) with complete
           information about what they are used for and about all
           possible parameters that can be put into them.


        Appendix E: New Commands
           This chapter lists all the commands that are new to the HP48
           G Series, with a brief description of what the commands do.
           A list like this can be found elsewhere in the HP48 FAQ list
           as well.

        Appendix F: Technical Reference
           Contains:  Object sizes, Mathematical simplification rules
           used by the HP48, Symbolic differentiation patterns used by
           the HP48, the EquationWriter's expansion rules, References
           used as sources for constants and equations in the HP48
           (other than those in the Equation Library).


        Appendix G: Parallel Processing with Lists
           This chapter contains info on parallel processing that makes
           UserRPL look even more like a real functional programming
           language by letting (almost) all the commands  function on
           lists of parameters as well (i.e. adding map capabilities to
           all internal commands).


     Do I need the AUR?
        Yes, you do.  In my humble opinion the AUR is just "The Manual,
        Part II" and every owner of a HP48 G or HP48 GX should have it,
        especially if you are (going to be) programming in UserRPL for
        any reason.  A lot of the frequently asked questions that pop up
        on comp.sys.hp48 are simply questions that are meant to be
        answered by the AUR.


     Why didn't HP supply the AUR with every HP48?
        Since you're reading this FAQ, you're probably gifted: you are
        not an average HP48 user.  The set of "average users" probably
        consists mostly of people that simply never program their HP48
        in any way ("Wow, can it do that too?!").  In this case, they
        will never take one look at the AUR ever again, and since this
        is quite a thick book it would be a waste of money, trees, the
        environment, transportation costs, etc... to supply the AUR in
        every box.  This is probably why HP made it an extra accessory
        for those people that "really need" it.  I think...


     Where can I get the AUR?
        You should be able to buy (or order) it from the same shop where
        you purchased your calculator.  The HP part number is
        00048-90136.  The book does not seem to have an ISBN; it's a HP
        part, not a book.


     Does the AUR contain any SYSEVALs or LIBEVALs?
        Yes, it contains exactly one.  The example for the SYSEVAL
        command tells you that #30794h SYSEVAL gives you the version of
        your HP48.  My HP48 GX rev. P gives "HPHP48-P".


     Does the AUR say anything about SysRPL or ML?
        No, it doesn't.


  8.20.  What is the syntax for INFORM, CHOOSE, and MSGBOX? (GX)

  Based on a posting on HPCVBBS by Cary McCallister.  Revised by Joe
  Horn.  Re-formatted by Andre Schoorl.


     INFORM - Create a Custom Input Form

        INPUT:

        5: "title"
        4: { fields }
        3: <format>
        2: { reset_values }
        1: { initial_values }


        OUTPUT:


             Either: 2: { new_values }
                     1: 1

             or:     1: 0


        PURPOSE:
           INFORM creates full-screen custom input forms, similar to
           those of the built-in applications.

        ARGUMENTS:

           title
              Is displayed in font 1 (small) at the top centre of the
              screen.  It may contain any number of characters,
              including 0, but, at most, 31 characters will be
              displayed. Strings longer than 31 character will be
              truncated to 30 characters and displayed with a trailing
              ellipsis.  Line feed characters are displayed as boxes.

           { fields }
              Is a list of the form { field1 field2 ... fieldn } where
              each field is any one of these forms:


                1.    "label"
                2.    { "label" "help" }
                3.    { "label" "help" type1 type2 ... typen }
                4.    { }


           The "label" is a string of arbitrary text from 0 to 26 char-
           acters long (longer strings will be truncated to 25 charac-
           ters with a trailing ellipsis).  The "help" is displayed
           immediately above the menu area as a helpful prompt for the
           user.  The object type specifications list the one or more
           object types allowed in the field, in the form the TYPE com-
           mand returns.  If unspecified, the default help text is blank
           and the field will accept all object types.  If a field spec-
           ification is an empty list, no field is produced; instead,
           the field to the immediate left (if any) is expanded to fill
           the omitted field's space.  This allows further customization
           of form layout; for example, to have two fields in one row
           and three fields in the next.

           <format>
              May be any one of the following objects:

           1.    { }
           2.    columns
           3.    { columns }
           4.    { columns widths }


           Where <columns> is the number of columns that the display
           will be divided into e.g., if <columns> is 2 and there are
           two fields, they will be displayed side by side rather than
           one above the other.  <widths> is the tab width between the
           left edge of each title and its field; this makes vertical
           alignment of fields possible.  Titles longer than one tab
           width will cause the tab to be repeated automatically.  If
           unspecified, the default column count is one and the default
           tab stop width is three.

           { reset_values }
              Is a list of values one per input field which replace the
              values of all fields when the {RESET} key is pressed and
              "Reset all" is selected.  This list must either be empty
              or have exactly one item per field corresponding to the {
              fields } list above.  If empty, then all fields are deemed
              unspecified (i.e., blank).  Each reset value must match
              the type require by the form field. Selected fields may be
              marked as unspecified by using NOVAL as the reset value.

           { initial_values }
              is a list of values one per input field which specify the
              start-up values of all fields when the INFORM command is
              invoked. This list must either be empty or have exactly
              one item per field corresponding to the { fields } list
              above.  If empty, then all fields are deemed unspecified
              (i.e., blank).  Each initial value must match the type
              require by the form field.  Selected fields may be marked
              as unspecified by using NOVAL as the initial value.

        RESULTS:
           INFORM returns the new field values { new_values } as a list
           to level 2 and the real value 1 to level 1 if the user
           completes the input form by pressing {OK} or [ENTER].  The
           list will contain one item per field.  Each item will either
           be the last input value for the corresponding field, or NOVAL
           if the field was unspecified.

           INFORM returns the real value 0 to level 1 if the user
           terminates the input form by pressing {CANCL} or [CANCEL].

        REMARKS:
           NOVAL is basically a command (an XLIB name) that does nothing
           when evaluated. It can, however, be compared via ==, SAME and
           POS.

     CHOOSE - Create a User-Defined Choose-Box

        INPUT:


             3: "title"
             2: { items }
             1: <initial_item_number>


        OUTPUT:


             Either: 2: { chosen_item }
                     1: 1

             or:     1: 0


        PURPOSE:
           CHOOSE creates a user-defined "choose-box": a displayed box
           containing items from which the user can choose one.

           CHOOSE displays a standard choose box (normal, not maximized;
           single-pick, not multi-pick) with an optional title line.

        ARGUMENTS:

           title
              If any, is displayed in font 1 (small) in the top centre
              of the box.  It may contain any number of characters,
              including 0, but, at most, 22 characters will be
              displayed. Strings longer than 22 character will be
              truncated to 21 characters and displayed with a trailing
              ellipsis.  Line feed characters are displayed as boxes.
              If there are more than four items such that the scroll
              arrows are displayed, the maximum number of title
              characters is reduced to 21.  The title text is displayed
              in the title area in character font 1 (the menu font).  If
              the title string is empty, no title area will be created
              in the choose box, and the whole box will be devoted to
              the items.

           { items }
              Is a list of arbitrary objects.  Each item occupies one
              line in the choose box and is displayed in its command
              line form.  Only the first 14 characters of the displayed
              object will be shown (13 if the scroll arrows are
              present).  If an item contains more than 14 (13)
              characters, it will be truncated to 13 (12) and the final
              character will be replaced by an ellipsis.  If every item
              is a list of exactly two objects, the first object will be
              displayed and the second returned if the item is selected.
              If the number of items exceeds 4 with a title and 5
              without, scroll arrows will be displayed, and moving the
              highlight past the top or bottom of the box will scroll
              through the undisplayed items.

           <initial_item_number>
              Specifies the initial field to be highlighted when the
              display first comes up (ordinarily 1).  A value of 0
              indicates that no field is to be highlighted and that the
              {CANCL} key is to be omitted from the menu, making the
              choose box act as an informational display without user
              selection.

        RESULTS:
           CHOOSE returns the chosen item (or the second object in a
           two-element item list) and the real number 1 if the user
           completes the choose box by pressing {OK} or [ENTER].  CHOOSE
           returns the real number 0 if the user terminates the choose
           box by pressing {CANCL} or [CANCEL].

     MSGBOX - Create a Simple Message Box

        INPUT:


             1: "Message_string"


        OUTPUT:


             None


        PURPOSE:
           MSGBOX creates a simple pop-up message box over the current
           display, with a 3D shadow to make it easy to recognize, and
           containing any arbitrary text.

        ARGUMENTS:

           Message_string
              Is any string of characters.  The text is displayed in
              font 2 (medium size), left justified, with a maximum line
              length of 15 characters.  Longer lines are broken into
              multiple lines automatically, at word breaks when
              possible, up to a maximum of 5 lines.  Line feeds may be
              included to force line breaks.  The minimum number of
              lines is 2, so single-line messages will have a blank line
              at the bottom of the box.

        RESULTS:
           None.  MSGBOX is exited when the user presses CANCEL, ENTER,
           or OK, but nothing is returned to the stack.

  For examples of INFORM, CHOOSE, and MSGBOX see Appendix B-2.


  8.21.  How do I put checkfields in my INFORM menus?

  From: Matt Willis

  You can't normally do this directly in User RPL.  You can do it in
  System RPL (see Jim Donnelly's book for details), or you can use the
  library at  <http://www.hpcalc.org/programming/misc/infm2v1.zip>

  I figured that the System RPL version of DoInputForm was unpleasant
  enough to use on a casual basis so I wrote a simple library that lets
  you use check boxes and choose lists from User RPL.

  All it does is stop execution of INFORM just before DoInputForm, then
  search the stack and change object types to check and choose objects.
  Then it restarts the INFORM command.  At the end, it tidies up
  TRUE/FALSE to 1/0 etc...

  Example syntax:


  "Test" {
  "A" "B" "C" } 1 {} { :CHECK: 1  :CHOOSE: { 1 2 3 }  NOVAL }
  IF INFORM2 THEN
     ...insert code here...
  END


  8.22.  What is the syntax for the INPUT command?

  From: John Meyers

  INPUT allows you to display a message and then edit a given string
  using the command line editor; the edited string is its result.

  Arguments:


     Level 2:

        "message"


        The message is displayed in "medium font" in the upper part of
        the "stack display area" (the stack itself is not visible during
        the INPUT command).  The message may be an empty string, or may
        contain newlines for a multiple-line message.


     Level 1:
        The most general format is a non-empty list containing up to
        three optional specifications, which may appear in any order:


        { "string" { row column } mode(s) }


        "String" is the initial text which will appear in the command
        line; it may be an empty string, or may contain newlines for a
        multiple- line text.  If you do not need to specify any other of
        the optional arguments, you may omit the list itself and supply
        only the string on level 1.  If the string is omitted from an
        argument list, the default is an empty string.


        Mode(s) are zero or more of the following special reserved
        names:


     o  Type a Greek Alpha symbol (Alpha right-shift A) to start the
        editor with Alpha keyboard mode on.


        You might select this mode if you are inviting the user to type
        general text; you would not type quotation marks around the
        entered text, because INPUT automatically returns as a string
        all the characters that are typed into the edit line.


     o  The word ALG starts the editor in Algebraic entry mode (ALG
        annunciator on); PRG mode is always on by default.

     o  The letter V will check the syntax of the entire command line
        when ENTER is finally pressed, in exactly the same way that the
        command line editor normally does, disallowing an exit if there
        is an RPL syntax error.  However, unlike ordinary editing in the
        command line, the command line text is still returned as a
        string, and is not compiled for you (you can do OBJ-> yourself
        afterwards if you want to compile the string).


        For example, if you are expecting two numeric values to be
        entered, and if you enter 123 456, INPUT returns "123 456"; if
        you then do OBJ-> on that result, you will finally get 123 and
        456 as separate values on the stack.


        Row and Column optionally specify where the cursor will
        initially appear (default is at the end of the entire string),
        and whether the cursor will start in "insert" or "replace" mode
        (default is insert).


        Row numbers start at 1 for the topmost row; column numbers start
        at 1 for the first character in a row.  Row zero means the
        bottom row; column zero means the end of a row.


        Instead of { row column } you may also simply count character
        positions within the original "string" argument, supplying just
        one number instead of a list of two numbers.


        To cause the cursor to be in "replace" mode rather than "insert"
        mode, the first number specifying cursor position should be made
        negative.


  If the user presses CANCEL during INPUT when there is some text in the
  command line, all the text will be erased without canceling INPUT; if
  CANCEL is pressed again (or with no text), then INPUT is canceled.


  Examples of use in a program:


       "Enter A, B, C" {
       ":A:
       :B:
       :C:" { 1 0 } V } INPUT


  Note: Put newlines between the three lines of the initial string.

  When executed, the screen shows:


       Enter A, B, C
       :A:(cursor appears here)
       :B:
       :C:


  If you now press 1 DownArrow 2 DownArrow 3 ENTER, the string returned
  on the stack is:


       ":A:1
       :B:2
       :C:3"


  If you then do OBJ-> on this string, you get (on separate stack
  levels):


       :A: 1
       :B: 2
       :C: 3


  The optional "tags" do not interfere with using the numeric values in
  functions, or storing them (tags are automatically removed in each
  case).


  Another example:


       "Type a new notecard" { Alpha-symbol } INPUT


  This allows the user to type any free-form text, which is returned as
  a string upon pressing ENTER.

  Simplest possible example:


       "" "" INPUT  (no message, empty initial command line)


  Potential problems with INPUT (if OBJ-> is to be used afterwards to
  get the values entered):


  o  You can't force the user to enter the exact number of values
     expected, so you may want to program defensively (check stack
     depth, etc...)

  o  Entries such as command names (e.g. CLVAR), program names, etc...
     will get executed by a subsequent OBJ->, producing undesirable
     effects (methods for dealing with this problem are available).

  For applications expecting non-text values to be entered, the HP48G/GX
  INFORM command is more immune to these problems, and affords much
  tighter control over what is entered, in addition to providing a more
  beautified display form, a separate prompt for each input field, etc.
  The syntax for INFORM is detailed elsewhere in the FAQ.



-----BEGIN PGP SIGNATURE-----
Version: PGPfreeware 5.0i for non-commercial use
Charset: noconv

iQA/AwUBOPgDMuhzXOws+qC7EQIJrACfY6zCI0h+lIAilncWchHYsfMQGPwAoMdB
r1vJvcbMYgutyGdSE5eFQCe2
=OAqz
-----END PGP SIGNATURE-----

User Contributions:

Comment about this article, ask questions, or add new information about this topic:

CAPTCHA




Part1 - Part2 - Part3 - Part4

[ Usenet FAQs | Web FAQs | Documents | RFC Index ]

Send corrections/additions to the FAQ Maintainer:
aschoorl@engr.uvic.ca





Last Update March 27 2014 @ 02:11 PM