Newsgroups: comp.sys.hp48

[ It's time to post this again.  ]

              HP 48SX Questions, Answers, & Useful Tidbits


     This list contains information which has not necessarily been
verified, and is not guaranteed to be correct, or even reflecting
reality.  It was compiled from various postings in comp.sys.handhelds,
as well as other sources.  In particular, some parts were taken from
the HP 48SX FAQ list.

     Also note that, while the maintainer is an employee of Hewlett-
Packard, this list is not officially sanctioned by Hewlett-Packard (the
maintainer is doing this on his own time, and has absolutely no
connection with the HP division that makes calculators).

Please send any comments or suggestions to:

        Darryl Okahata
        Internet: darrylo@sr.hp.com             (official Internet address)
                  darrylo%hpnmd@relay.hp.com    (fall-back address)
        CompuServe: 75206,3074

Summary of questions:

   1. I'm a novice, and I have some questions.  Where should I start?
   2. How can I tell what ROM revision I have?
   3. What bugs exist in the various versions of the HP 48SX?
   4. What is \->ASC or ASC\->?
   5. How can I get \->ASC and \->ASC?
   6. Why does my HP 48SX occasionally "freeze" for a moment?
   7. Why does (1/3)*3 equal 0.999999999999?
   8. I want `pi' to be a numeric value, not a symbol.  What's happening?
   9. If I add two temperatures like 34 deg.F and 11 deg.F, I get 504.67
      deg.F.  Why don't I get 45 deg.F?
  10. Why do I get corrupted binary files with kermit?
  11. My RAM card was plugged into the calculator when I changed the RAM
      card battery, yet I lost all the information on the card.  What
      happened?
  12. Why do I get an "Invalid card data" error when I merge a RAM card?
  13. My HP 48SX seems to take longer to turn on and off.  What's going on?
  14. I can't account for some of the RAM in the HP 48SX (I can't tell where
      it's being used).  What's going on?
  15. How do I get rid of the HYDE library?
  16. How can I transfer programs/data from my HP-28S to my HP 48SX?
  17. I could speed up my HP-28S.  How can I speed up my HP 48SX?
  18. Why does the HP 48SX display flicker slightly?
  19. I've heard that other manufacturer's RAM cards will work with the
      HP 48SX.  Is this true?  Will it work?
  20. What library ID numbers have already been used?
  21. What are the differences between the HP 48S and HP 48SX?
  22. If I press ON-SPC, the HP 48SX display blanks.  What going on?
  23. What do the funny symbols \->, \GS+, etc., mean?
  24. What tricks are there for manipulating matrices?
  25. How do I store fields of variable length string data in a compact,
      rapidly accessible manner that does not require the overhead of
      storing strings in lists?
  26. What is "Vectored Enter", and how do I use it?
  27. How can I tell, from within a program, if the battery is low?
  28. I've heard the names "RPL", "Saturn", "STAR", "Voyager", etc..  What
      do they mean?
  29. What information is there on the internals of the HP 48SX?
  30. What are the pinouts for the HP 48SX serial connector?
  31. Is there any information on interfacing to the HP 48SX?
  32. Where can I get programs and information for the HP 48SX?
  33. How do I get access to the HP Calculator BBS?
  34. What Usenet Newsgroups are there for the HP 48SX?

  * Appendix A: ASC\-> and \->ASC functions:
  * Appendix B: Using non-HP RAM cards in your HP 48SX:
  * Appendix C: Compact Data Storage:
  * Appendix D: Various useful functions


===============================================================================

1. I'm a novice, and I have some questions.  Where should I start?

   Start by perusing the HP 48SX manuals.  You'd be amazed how many
   questions can be answered if you read the manuals.

   Also, look over the section "Answers to Common Questions", in Appendix
   A (Volume II) of the manual.


2. How can I tell what ROM revision I have?

   Do the following:

   1. Turn the calculator on (press ON and then release).

   2. Press ON again, and hold it down.

   3. While holding down the ON key, press and hold down the "D" key (the
      fourth white key in the top row).

   4. While holding down the "D" key, release the ON key.

   5. Release the "D" key.  The display should be blank, with the
      exception of three vertical lines (one down the center, and one
      down each of the right and left sides).

   6. Press the backspace key (it says DROP and CLR over it).  A
      meaningless string of digits should appear in the top line of the
      display (mine says "705D9:1B8DA178E5A111B6" -- yours may be
      different).

   7. Press and hold down the EVAL key. It should say:

        Version HP48-*
        Copyright HP 1989

      where the * is an uppercase letter (A, B, etc.) indicating
      the ROM version.

   8. Release the EVAL key.  Hold down ON and hit "C" (the third
      white key in the top row.  This is a general reset
      operation that returns the calculator to normal from the
      diagnostic stuff (which is where ON-D puts you).

   (The above was mangled from a posting by Mark Adler --
   madler@tybalt.caltech.edu)


3. What bugs exist in the various versions of the HP 48SX?

    Version(s)  Bug
   ----------------------------------------------------------------------
      A         DEFINE rounds numbers in user-defined functions if STD
                is not the current display mode.

      A         KGET on a zero length file from another machine will
                cause the calculator memory to be cleared.

      A         NXEQ from the Graphics Environment with flag -3 set (SYM
                off in Modes) can overwrite the current equation with a
                number.

      A         Displaying the clock in 24-hour format causes the
                one-digits for minutes to be incorrect in the alarm
                catalog.

    A,B,C       INV returns an incorrect result if used on an 8x8 or
                larger matrix.  To get around this problem, divide the
                identity matrix with the matrix to invert.

   A,B,C,D      Entering a symbolic complex number in polar form like
                '(A,<B)' (where < is really the funny little angle
                symbol), gives an expression in A and B that is wrong
                (the A and B are interchanged so A is the angle and B is
                the magnitude).

   A,B,C,D      If the clock is displayed during an ARCHIVE via RS-232,
                there is a chance (not 100%) that calculator memory will
                be cleared, after the transfer.  The workaround is to
                turn the clock display off before doing the transfer.
                Should memory be cleared, you will have to restore the
                contents of memory from the archive.

   A,B,C,D      TRNC and RND allow for an array in level 2 and a
                symbolic in level 1 of the stack. This allows you to put
                an array in a symbolic.  Example:

                                [ 2 3 ]
                                '7/8'
                                RND

                returns 'RND(UNKNOWN,7/8)'

   (The above was mostly copied from postings by Mark Adler
   (madler@tybalt.caltech.edu) or Jurjen NE Bos (jurjen@cwi.nl).)


4. What is \->ASC or ASC\->?

   These functions were written by William Wickes to facilitate
   transferring HP 48SX binary objects in an ASCII format (useful when
   transferring objects via electronic mail or bulletin boards).  Some
   HP 48SX 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 insure that the decoding is correct.


5. How can I get \->ASC and \->ASC?

   A copy of these programs are given in Appendix A, near the end of this
   file.


6. Why does my HP 48SX occasionally "freeze" for a moment?

   The HP 48SX must occasionally do "garbage collection" to free up
   unused memory, and it is this garbage collection that is causing the
   momentary "freeze".  "Garbage collection" is where the HP 48SX scans
   through memory, looking for objects that are no longer used.

   Using less stack supposedly makes garbage collection go faster.


7. Why does (1/3)*3 equal 0.999999999999?

   This is due to the way numbers are typically represented by computers
   and calculators.  There are infinitely many numbers, like `1/3' and
   `pi', that cannot be exactly represented internally (their decimal
   representations go on forever, and oftentimes cannot even be
   represented as a fraction, as in the example of `pi').  As a result,
   any calculations that use these numbers are bound to be off.


8. I want `pi' to be a numeric value, not a symbol.  What's happening?

   You are using "Symbolic Results Mode".  To turn this mode on or off,
   go to the MODES menu (press orange/left-shift MODES), and press the
   "SYM" softkey.


9. If I add two temperatures like 34 deg.F and 11 deg.F, I get 504.67
   deg.F.  Why don't I get 45 deg.F?

   If the units attached to the number consists only of a temperature and
   nothing else, operations are done using an absolute temperature scale
   (relative to absolute zero).  If the units consists of a temperature
   and something else, such as degrees/minute, the operation will not be
   done using an absolute temperature scale.

   It also does not make any physical sense to add two temperatures.  You
   can't add a cup of water at 20 degrees C to a cup of water at 30
   degrees C and end up with two cups of water at 50 degrees C.


10. Why do I get corrupted binary files with kermit?

    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 HP 48SX end and the computer end).  For example,
    when receiving ASCII files, Unix kermit must translate CR/LF pairs
    into LF.  If the HP 48SX 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.

    Kermit running on IBM PC clones do not have to translate any incoming
    CR/LF pairs, which is why you do not see this problem there.


11. My RAM card was plugged into the calculator when I changed the RAM
    card battery, yet I lost all the information on the card.  What
    happened?

    You forgot to turn ON the calculator before changing the battery.  The
    HP 48SX only supplies power to the RAM card while the HP 48SX 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.


12. 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 HP 48SX.  In this case, this message is normal and is harmless.  It
    just means that there was no (valid) data 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.

     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*.

     3. The RAM card battery is dead.

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


13. My HP 48SX seems to take longer to turn on and off.  What's going on?

    The usual causes for this are RAM/ROM cards and libraries.  When you
    turn the calculator on, it checks RAM (the more you have, the longer
    it takes), and checks to see if any libraries need initializing.

    Also, having a lot of alarms can supposedly also cause this.


14. I can't account for some of the RAM in the HP 48SX (I can't tell where
    it's being used).  What's going on?

    It can be any one of a number of things:

    ---------------------------------------------------------------------------
    Enabling the use of LAST STACK, LAST ARG, LAST CMD, etc., uses up
    extra RAM, as the calculator has to keep track of the last stack,
    arguments, command, etc..  This is particularly important with LAST
    STACK if you have a large/complex stack, as the HP 48SX has to keep
    enough information around to recreate the stack after each
    operation.  You can clear out these variables by pressing ON-C (but
    also note that this will clear out the stack, the graphics PICT, etc.).
    ---------------------------------------------------------------------------
    From billw@hpcvra.CV.HP.COM Fri Mar  1 17:00:00 1991
    From: billw@hpcvra.CV.HP.COM (William C Wickes)
    Date: Wed, 1 Aug 1990 19:51:37 GMT
    Subject: DOERR: An HP48SX memory eater
    Organization: Hewlett-Packard Co., Corvallis, OR, USA
    Newsgroups: comp.sys.handhelds

    Here's a candidate for "most obscure way to use up memory on the HP 48SX."
    When a program executes DOERR with a string argument, the string and hence
    the program too if the string is embedded in the program are referenced
    for the sake of the ERRM command.  Thus if you purge the program, the
    memory used by the program is not reclaimed until the ERRM reference is
    updated to a new string.  If the string is in a port, you will get
    the Object In Use error if you try to purge the library or backup object
    containing the string.

    A system halt prior to a PURGE will not help unless the object is in
    port 1 or port 2 (it will reclaim memory held by a successfully purged
    but still referenced object).  For port 0 objects, the only way to
    break the reference is to execute DOERR again with a new string.
    ---------------------------------------------------------------------------


15. How do I get rid of the HYDE library?

    Getting rid of the HYDE library can be fun.  Here's how to do it:

     1. Go the HOME directory.

     2. Press left-shift (orange) LIBRARY.  The calculator is now
        displaying a menu of libraries attached to the HOME directory.

     3. Press the menu key that says "STRA".  You are now accessing the
        HYDE library.

     4. Press the menu key that says "JEKY".  You have now disabled the
        HYDE library and restored the old (standard) set of messages.

     5. Make sure that a pointer to the library is not on the stack.  The
        easiest way to do this is to clear the stack using CLR.

     6. Detach the library using:

          :0:998 DETACH

     7. Purge the library using:

          :0:998 PURGE

        When you execute the PURGE, the screen will "jump" or "be messed
        up" for a brief moment.  Don't worry about it -- it doesn't
        hurt.


16. How can I transfer programs/data from my HP-28S to my HP 48SX?

    You use a program called "INPRT", which is available from various
    archives, and is also included in the IBM-version of the HP 48SX
    serial cable kit and in the Program Development Library.

    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 HP 48SX, reads the
    I/R output of the HP 28S and converts it into a program.


17. I could speed up my HP-28S.  How can I speed up my HP 48SX?

    You can't, really.  Unlike the HP-28S, the clock speed in the HP
    48SX is hardwired to 2 MHz.

    However, in some cases, you can speed up the HP 48SX by turning off
    the display refresh, which supposedly takes up about 11% of the CPU
    time.  Detlef Mueller <detlef@mwhh.hanse.de> submitted a program to
    comp.sources.hp48 that turns off the display refresh.  Look in the
    various HP 48SX archives for a copy.


18. Why does the HP 48SX display flicker slightly?

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

    Outside the U.S., power is supplied at a 50Hz rate, not 60Hz.  This
    means that the display would "flicker" at a 14Hz rate, which may or
    may not be noticeable (I'm in the U.S. and cannot verify this -- if
    anyone living in an area with 50Hz power, I'd appreciate it if you
    could prove or disprove this).


19. I've heard that other manufacturer's RAM cards will work with the
    HP 48SX.  Is this true?  Will it work?

    While some cards may work, there is a chance that you may severely
    damage your HP 48SX.  You should only use cards specifically
    designed for the HP 48SX.

    For more information, see Appendix B, "Using non-HP RAM cards in your
    HP 48SX", near the end of this file.


20. What library ID numbers have already been used?


    The following was taken (without permission) from a comp.sys.handhelds
    posting by Joseph K. Horn (akcs.joehorn@hpcvbbs.UUCP), June 2, 1992.

    ===========================================================================
     From akcs.joehorn@hpcvbbs.cv.hp.com Mon Jun  1 23:40:04 1992
     From: akcs.joehorn@hpcvbbs.cv.hp.com (Joseph K. Horn)
     Date: Tue, 2 Jun 1992 06:40:04 GMT
     Subject: Library ID's Currently In Use
     Newsgroups: comp.sys.hp48

     HP 48 LIBRARY ID'S CURRENTLY IN USE     1 JUNE 1992

     Unofficial List   --   Corresponds to Reality
     Compiled by Joseph K. Horn

      ID    BYTES   #CRC REVIEW Name (comment)         Where Available
     ---- --------- ---- ----------------------------- -------------------
     0014     135.0 5329 X.PUB :Configs Aborter        HORN7:FRANCE
     0262 105,307.5 4B6E DEMO  :Demo Start  0.0        EduCALC #80024
     0262     125.5 6AD9 (powerup -> warmstart)        HORN7:UTILS
     0266   4,209.0 0414 (Catalog Utility)             \
     0267  70,074.5 40CC (Equation Reference)           \
     0268   6,926.5 F89F UTILS :Utilities                \
     0269   6,131.5 1BD9 MES   :Mult Eqn Solver           \  EduCALC
     0270   3,184.0 7022 FIN   :Finance                   /  #82211A
     0271   3,751.5 E1F1 COLIB :Constants Libr           /
     0272  27,391.5 7922 PRTBL :Periodic Table          /
     0273   7,168.0 0580 EQLIB :Equation Libr          /
     0501   4,393.5 83C9 CLK                           HORN3
     0752   2,203.5 7A6A PDLXFER  PDL Xfer Util        EduCALC #82208B
     0765   5,145.5 EB7F CATLIB:Catalog Library        HPCVBBS
     0766   1,221.0 7C4D EPPRT :Graphic->Epson A       EduCALC #82208 &9
     0767   1,127.5 FEE2 HPPRT :Graphic->PCL  A        EduCALC #82208 &9
     0768   2,822.5 706C SW-A (stopwatch)              EduCALC #82208 &9
     0769  32,761.5 9703 CAS48: Casino 48S 1.02        EduCALC #2259
     0769   2,862.0 49FA TETRIS:1.3,(c)DM'91           HORN6:GAMES
     0769   8,277.0 3FF2 DB48 (Data Base v2.11)        HORN5:WORK
     0769   8,984.5 E2CB DB48 (Data Base v2.30)        HORN7:WORK
     0770   9,597.5 3DF0 (PIM Utils & Data Browser)    EduCALC #2323
     0771 111,436.5 9589 EEREF :EE Reference           EduCALC #2293
     0772 117,511.5 8CE8 EEAPP :EE Application         EduCALC #2292
     0773  23,124.0 01CF PIM   :Pers Info Mgr          EduCALC #2323
     0774 113,708.0 FF57 MEREF :ME Reference           EduCALC #2291
     0775   6,007.0 3BEE FCLIB :Flag Catalog           EduCALC #2283, 2284
     0775   6,409.5 2665 ECHR (Character catalog)      HORN7:PROGRAMR
     0776   9,407.5 AEFF TLLIB :Tool Library (ver B)   EduCALC #2283, 2284
     0776   8,424.5 4B46 (Short Tool Library)          (commercial cards)
     0777   3,746.5 8512 TBLIB :Title Browser          EduCALC #2283, 2284
     0777   3,704.0 ???? (Short Title Browser)         (commercial cards)
     0777  10,406.0 ???? (TenK Game)                   HPCVBBS
     0778   4,787.0 1D26 DBLIB :Data Browser           EduCALC #2283, 2284
     0782 116,317.5 5EF0 MEAPP :ME Application         EduCALC #2290
     0783 117,627.0 425D GCAPP :GC Application         EduCALC #2294
     0784 126,049.0 463C GCREF: GC Reference           EduCALC #2295
     0785 117,053.0 0488 MATH  :Mathematics            EduCALC #2324
     0786   4,745.5 6BED (Short Data Browser)          (commercial cards)
     0799   4,277.0 3B00 TIMER.APPLICATIONS            HORN6:WORK
     0800  39,509.5 58EB util (used by STRUCT)         \ EduCALC
     0801  90,479.5 6B47 STRUCT (TDS card)             / #2487
     0803   2,073.5 B8AB SWITCH (bank switcher)        EduCALC #2365 etc.
     0804  10,730.5 AE71 finutil (used by TDSFIN)      \  EduCALC #2365,
     0805  14,300.5 99EC TDSFIN (financial tools)      /  2475, 2476, 2482
     0807   3,700.5 8F69 ROLDX :Rolodex ver 1.0        HORN1, HORN2
     0809     269.5 6D06 MSGTST: v0.0,DM'91            HORN6:HACKER
     0810  91,634.0 49E1 EZ (E.Z. Math Card)           EduCALC #2443
     0817  65,248.0 7185 SPC48 (State Plane Coord)     SMI
     0820  10,238.0 4390 VADERS (Space Invaders game)  HORN7:GAMES
     0821  25,305.0 ???? SmartROM 1991 Flavio Casetta  \ EduCALC
     0822   4,706.0 ???? Matrix Writer Plus            / #2574
     0825   4,708.0 00E5 FILER : Memory Filer          Brian Maguire
     0826   4,170.5 13E4 ARYTL: Array Tools            Brian Maguire
     0826   2,588.5 4653 CTBL : Character Table        Brian Maguire
     0827   7,292.0 BFE8 UITOOLS:User Infc. Tools      Brian Maguire
     0828   9,122.5 251D OBJTL: Object Tools           Brian Maguire
     0829   2,576.5 4720 META : Meta-Objects           Brian Maguire
     0830  56,350.0 E47A SRPL :System RPL Tools        Brian Maguire
     0830   5,002.5 E33A PAINT : Graphic Appl.         Brian Maguire
     0832   8,502.5 520C FMGR  :File Manager           EduCALC #2474
     0834   8,427.0 1E67 (browser utilities?)          (commercial cards)
     0839  95,837.5 ???? SPICE48: Ckt. Simulator       EduCALC #2589
     0841   5,027.0 A1A9 DL+   CH.D 91                 HORN7:FRANCE
     0845 116,240.0 ???? SSELE :Solid State            EduCALC #2590
     0850  33,805.5 FF5B CONST1                        Mike Seidl (SMI)
     0858  28,673.5 FC38 Zephyr Games Pak I            SMI
     0873   1,768.5 1D9D GATEWAY-48                    HORN3
     0873   2,192.0 20F3 GATEWAY-48                    HORN7:UTILS
     0873   1,932.0 18C4 Code-Lock                     HORN7:UTILS
     0874   8,327.5 E262 FMLIB :File Manager           EduCALC #2474
     0874   3,782.0 36B5 REVERSI                       HORN7:GAMES
     0876       ?   ???? DB48LB:Database               James Donnelly
     0880   4,117.5 DFD1 ASM  Library 0.0 E            HORN7:FRANCE
     0880   4,231.0 AD9C TLBOX :ToolBox 1.0A           HORN7:FRANCE
     0888   9,401.5 13C0 PTE Periodic Table v1         HORN6:WORK
     0898  19,617.5 4609 DASM_V1.0                     HORN3
     0900     701.5 37C6 HSTACK: Hyper Stack V1.1      HORN7:UTILS
     0910  75,441.0 ???? Sun Finder                    Scott Ferry
     0911       ?   ???? (under development)           Scott Ferry
     0912   8,688.0 B8E3 TRON (Paris, 1991)            HORN7:FRANCE
     0960   2,185.5 9C15 MIND (4 columns, 6 colors)    HORN7:GAMES
     0960   2,109.5 AD53 MIND (5 columns, 8 colors)    HORN7:GAMES
     0960   4,405.5 1AB1 MIND (both of the above)      HORN7:GAMES
     0961       ?   ???? ALGB (math & matrix routines) ?
     0968  11,139.5 CFB9 ANT (game w/ SCHIP)           HORN5:GAMES
     0998   3,679.5 5FAE Strange Case 998 (JEKYL/HYDE) HORN2:DNICKEL
     1000  10,166.0 72D3 POKR :HP-48 POKER 1.0         HORN7:GAMES
     1001  42,559.0 ???? DANCER (animated striptease)  ?
     1011   2,191.0 F931 Fraction                      HORN7:MATH
     1012   3,752.5 F6E7 (CRASH library, unnamed)      HORN5:HACKER
     1013   1,811.5 5CC7 Matrix                        HORN7:MATH
     1030  32,759.5 1AF6 48BC (SMI)                    EduCALC #2296
     1030  66,741.0 491E 48SC (SMI)                    EduCALC #2298
     1030  98,285.0 1A8E 48AC (SMI)                    EduCALC #2299
     1031   2,933.5 0CD6 iNB   :0.02j 910718           HORN7:WORK
     1031   5,828.5 4229 DITCH (SMI)                   \
     1032   7,629.0 4378 HYDRA (SMI)                    \
     1033   1,662.5 EF50 EARTH (SMI)                     > EduCALC #2297
     1034   2,729.0 0E59 HORC (SMI)                     /
     1035   3,271.0 F029 VERT (SMI)                    /
     1092   6,930.0 6411 Saturn MLDL a1.01             HORN3
     1092  10,734.0 BB75 MLDL 1.04B                    EduCALC #2359
     1092  10,745.0 2491 MLDL 1.05B                    EduCALC #2359
     1093       ?   ???? Poker 1.01 (game)             ?
     1101   1,011.5 FC15 TLORG: TLLIB organizer        HORN5:PROGRAMR
     1111   7,602.0 F5FB Garbage (Sokoban; Box Jockey) HORN6:GAMES
     1200   5,958.0 53A2 LIBMKR:Library Maker +        HORN7:FRANCE
     1201   6,213.5 3FC4 PACMAN:BOUHP Version          HORN7:FRANCE
     1210  10,541.0 50BF DBUG  :HP UnAssembler         HORN7:FRANCE
     1214   2,712.0 F675 HACKIT (v 1.04)               HORN3
     1214   3,021.0 9F5B HACKIT (v 2.04)               HORN5:HACKER
     1214   3,168.0 B8DF HACKIT (v 2.05)               HORN7:HACKER
     1220   2,373.0 793A HP<->HP FAST LINK             HORN7:FRANCE
     1221   5,033.5 14C2 <-LIB-> :1.3,(c)DM&RH'92      HORN7:HACKER
     1314   4,313.5 2120 BMXL  Binary Matrix Algebra   HORN6:MATH
     1402     n/a    n/a HP-41C Emulator card          EduCALC #82210A
     1402   3,026.5 82E3 Bode                          HORN7:WORK
     1403     n/a    n/a HP-41C Emulator card          EduCALC #82210A
     1403   4,906.5 C25F Biport                        HORN7:WORK
     1404     n/a    n/a HP-41C Emulator card          EduCALC #82210A
     1424   4,152.5 405C COPY-ROM                      HORN5:UTILS
     1433   5,664.5 09B0 Chip 48 (collection)          HORN3
     1433   2,648.0 AE3A Rat  Rational Number Package  HORN3
     1531      91.0 D371 (bare-bones :&:AUTOEXEC)      HORN7:UTILS
     1537       ?   ???? FRACT :Fraction Units         Joseph K. Horn
     1616   2,999.0 8D01 SMTK: SmartKeys by RAP        HORN7:UTILS
     1617     495.5 421F Complex FACT                  HORN3
     1644       ?   ???? (SWING directory browser)     HPCVBBS
     1671   3,278.5 9AA8 FCTR 1.2 Factoring            HORN7:MATH
     1672  12,161.5 F3F4 NTL2 2.8 Number Theory        HORN7:MATH
     1696   2,448.0 8191 UTIL:C  Brian Walsh           HORN2
     1697   1,566.5 DC1E List:B  Brian Walsh           ?
     1700   2,703.5 EFC3 TETRIS (ML version)           HORN3
     1785   4,665.0 4275 TIMER LIB                     HORN6:WORK
     1786  29,070.5 2622 FLIGHT LIB                    HORN6:WORK
     1791   8,436.0 93CD TOOLS System Utilities        HORN2
     1791  13,519.0 0141 CSINO PLUS (Demo)             HORN7:GAMES
     1793     275.0 331C IF ERROR (ver. A)             HORN2
     1793     434.0 9CA1 IF ERROR  ver. B              HORN3
     1795   1,017.0 B2AB (LIB1795, Programmer's tools) HORN7:FRANCE
     2000     124.5 97F9 (Runs AUTOEXEC at warmstart)  HORN7:UTILS
     2046     n/a    n/a HP-41C Emulator card          EduCALC #82210A
     ---- --------- ---------------------------------- -------------------

     BYTES and CRC are calculated by the HP 48 BYTES command
     on the library object itself, not its name.

     The 41 Emulator Card's libraries are not proper RPL objects.
     Their size and CRC cannot be computed by the BYTES command.

     +---------------------------------------------------+
     | HP 48 Resource Allocation Guideline: Library ID's |
     +---------------------------------------------------+
     | 0000 - 0256  Take-over libraries; do not use!     |
     | 0257 - 0512  HP ROM-based libraries; do not use!  |
     | 0513 - 0768  HP RAM-based libraries; do not use!  |
     | 0769 - 1536  3rd Party (assigned by HP)           |
     | 1537 - 1792  3rd Party (assigned by HP)           |
     | 1793 - 2047  Command-line; do not use!            |
     +---------------------------------------------------+

     Note: EduCALC #'s are Stock Numbers; for further info call EduCALC at
     (800) 677-7001 or (714) 582-2637, Mon-Fri 8am-5pm California Time.

     Info about all other libraries is available on HP's free BBS:
     (503) 750-4448, 24 hr, 300/1200/2400 baud, full duplex, no parity,
     8 bits, 1 stop bit.  Follow displayed instructions carefully.

     Anonymous ftp users will also find almost everything ever written
     at seq.uncwil.edu, 128.109.221.20.

     -Joseph K. Horn-   -Peripheral Vision, Ltd.-
    ===========================================================================

21. What are the differences between the HP 48S and HP 48SX?

    The HP 48S is the same as the HP 48SX except that the HP 48S does
    not have the two expansion slots of the HP 48SX.  This means that
    the HP 48S cannot be expanded and can only access 32K of memory,
    versus 288K for the HP 48SX (two 128K RAM cards).  (Actually, there
    are now third-party RAM cards that contain 256K or 512K on a single
    card -- this memory is accessed via a bank-switching mechanism.)

    If you plan on heavily using your calculator, you will probably find
    that 32K is not enough memory.


22. If I press ON-SPC, the HP 48SX display blanks.  What going on?

    Pressing ON-SPC places the HP 48SX into "coma mode", where the
    internal clock, alarms, etc. are turned off.  Normally, when you
    simply turn off the HP 48SX, the internal clock continues to run,
    and any alarms will go off at their specified time.  This draws a
    very tiny amount of current from the batteries (just like a digital
    watch).  This amount is much, much smaller than the amount drawn
    when the calculator is turned on, where the CPU, display, etc. must
    be powered.

    Pressing ON-SPC not only turns the calculator off, but it also turns
    off the internal clock, alarms, etc., which stops the calculator
    from drawing the very small amount of current it normally draws when
    turned off.  This mode, which is known as "coma mode", was designed
    to increase the life of the batteries in an unpurchased calculator
    (placing the calculator in coma mode prevents it from drawing any
    current to power for the clock, etc., which increases the life of
    the batteries).


23. What do the funny symbols \->, \GS+, etc., mean?

    These are the ASCII representation of the special HP 48SX graphical
    characters.  See the section "Character Translations" in Chapter 33
    (Volume II) of the manual for a table of symbols <--> ASCII
    representations.


24. What tricks are there for manipulating matrices?

    You can build up a matrix by rows using \GS+

    You can take a matrix apart by rows using \GS-


25. How do I store fields of variable length string data in a compact,
    rapidly accessible manner that does not require the overhead of
    storing strings in lists?

    See Appendix C, "Compact Data Storage", near the end of this file.


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

    From billw@hpcvra.CV.HP.COM Fri Mar  1 17:00:00 1991
    From: billw@hpcvra.CV.HP.COM (William C Wickes)
    Date: Mon, 12 Mar 1990 21:21:55 GMT
    Subject: HP 48SX Vectored Enter
    Organization: Hewlett-Packard Co., Corvallis, OR, USA
    Newsgroups: comp.sys.handhelds

    The HP 48SX 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
    (here "*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.


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

    Preston Brown (prestonb@hpcvra.CV.HP.COM) posted the following:

    The following 48SX 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
\>>


28. I've heard the names "RPL", "Saturn", "STAR", "Voyager", etc..  What
    do they mean?

    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 HP 48SX.  Among the games
        written are "clones" of breakout, pacman, and pong, to name a
        few (about half?).

        Chip48, Schip and Schip8 are two different names for an enhanced
        version of chip8 specifically designed for the HP 48SX.  People
        have written programs to assemble Schip assembly language into a
        form directly usable by Schip on an HP 48SX.

    HYDE
        This is the "HYDE" library, whose only purpose is to change the
        error messages in the HP 48SX to make it "user unfriendly".

    ML
        Machine Language.  This is usually used in reference to HP 48SX
        assembly language programming.

    MLDL
        Machine Language Development Library.  This is a library, which
        is still under development, that allows you to debug machine
        language programs with only an HP 48SX.

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

    RPL
        RPL is the name of the language used to program the HP 48SX 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".

    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
        HP 48SX, HP-28 series, and the HP-75/71B calculators.

    STAR
        This is the "Saturn Macro Assembler" (how "STAR" comes from
        this, I don't know), an assembler that mostly uses Alonzo
        Gariepy's mnemonics.  It's written in C and runs on many
        different machines (PCs, Amigas, Unices, etc.).  STAR is
        available via anonymous ftp from ftp.ai.mit.edu in
        "/pub/star-1.04.4.tar.Z".  It's also available from various
        bulletin boards (the HP handhelds forum on CompuServe also has a
        copy).  The latest version is "1.04.4".

    SWING
        SWING is a library program that displays a graphical tree
        structure of the directory hierarchy in your HP 48SX, and allows
        you to move from directory to directory using the arrow keys (it
        is supposedly based upon an old PD VMS utility).

    System RPL
        This is the name for the custom "operating system/language" used
        to program the CPU used in the HP 48SX 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 HP 48SX
        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 HP 48SX RPL and machine code.  You download a copy
        of the RAM *and* ROM in your HP 48SX 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 (I think), via anonymous ftp from
        the HP BBS (hpcvbbs.cv.hp.com [15.255.72.16]), and from various
        bulletin boards (the HP handhelds forum in CompuServe also has a
        copy).  The latest version is "1.07".


29. What information is there on the internals of the HP 48SX?

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

        * System RPL (which includes information on HP 48SX display
          graphics, keyboard control, etc.).
        * Saturn assembly language ("Saturn" is the name of the CPU in
          the HP 48SX), including infomation on a Saturn assembler.
        * A system RPL compiler.
        * A Saturn object file linker.

    The completely unsupported system RPL development tools and
    documentation are available to customers free of charge to help them
    in HP 48SX 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:

        * Anonymous ftp to hpcvbbs.cv.hp.com [15.255.72.16].
        * Various archive sites around the Internet (sorry, but I don't
          know where they are).
        * The HP handhelds forum on CompuServe has a copy in the HP 48SX
          download library (DL4).  I think that it's called "48rpl.exe"
          instead of "tools.exe" (this is what HP Corvallis calls it).


30. What are the pinouts for the HP 48SX serial connector?

    Looking at the pins of the HP 48SX (the following diagram is showing
    the pins on the HP 48SX, as you look *AT* the calculator):
                   _________
                  | o o o o |
                   \_______/
                    ^ ^ ^ ^
                    | | | \------ 4 Signal GND
                    | | \-------- 3 RX (input to the HP 48SX)
                    | \---------- 2 TX (output from the HP 48SX)
                    \------------ 1 SHIELD

    Stated another way:

        HP48SX                  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


31. Is there any information on interfacing to the HP 48SX?

    HP has made available an UNSUPPORTED document called the "HP 48 I/O
    Technical Interfacing Guide", which contains information on the
    wired and serial I/O hardware.

    Look in the various HP 48SX archives for a copy.


32. Where can I get programs and information for the HP 48SX?

    One location is the HP Calculator BBS.

    CompuServe has a modest HP 48SX archive in the HP handhelds forum.
    Type "go HPSYSTEMS" to access the forum.  HP 48SX-specific files can
    be found in DL 4.

    For those people who have access to the Internet, the following
    sites have HP 28 and HP 48SX information and software:

    Site Name           IP address      directory (& other files)
    -----------------   ------------    ---------------------------------------
    hpcvbbs.cv.hp.com   15.255.72.16    /pub
    seq.uncwil.edu      128.109.221.20  (most complete HP 48 archives)
    wuarchive.wustl.edu 128.252.135.4   /systems/hp48sx
    funic.funet.fi      128.214.6.100   /pub/misc/hp48sx pub/misc/hp28s
    faui43.informatik.uni-erlangen.de   /portal/hp48
                        131.188.34.43   (games gnu hp28 irc iso lisp)
                        131.188.31.3    (There seems to have been no
                        131.188.44.43   maintenance since February 1991.)
                        131.188.1.43
    gmuvax2.gmu.edu     129.174.1.8     /new/hp48sx
                                        (gmuvax2 has very few files for
                                        the HP 48SX.)


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

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

        (503)-750-4448          2400 baud, 8N1
        (503)-750-3277          9600 baud, 8N1

    For those people who have access to the Internet, you can also
    access the BBS via telnet to hpcvbbs.cv.hp.com [15.255.72.16].


34. What Usenet Newsgroups are there for the HP 48SX?

        comp.sys.hp48           -- Primary newsgroup
        comp.sources.hp48       -- For HP 48SX programs. (This newsgroup
                                   is moderated by Chris Spell -- send
                                   submissions to hp48@seq.uncwil.edu.)
        comp.sys.handhelds      -- Occasionally, HP 48SX information is
                                   posted to this newsgroup.


* Appendix A: ASC\-> and \->ASC functions:

From billw@hpcvra.CV.HP.COM Fri Mar  1 17:00:00 1991
From: billw@hpcvra.CV.HP.COM (William C Wickes)
Date: Fri, 17 Aug 1990 22:27:42 GMT
Subject: HP 48 Object Encoding
Organization: Hewlett-Packard Co., Corvallis, OR, USA


                      ASCII Encoding HP 48SX Objects

Sending an HP 48SX object via electronic mail can be difficult if the
object does not have an ASCII form, such as is the case for library
objects.  There are various encoding schemes available on different
computer systems, but these require that the sender and receiver have
similar computers, or at least compatible encode/decode schemes.  The
programs listed below perform the encoding and decoding on the HP 48SX itself,
which has the advantage of being completely independent of any computer.

The programs are nominally called \->ASC and ASC\->.  The former takes an
object from the stack and converts it to a string, in which each nibble of the
object and its checksum is converted to a character 0-9 or A-F.  (The object
must be in RAM, otherwise a "ROM Object" error is returned.)  For sake of easy
inclusion in email letters, the string is broken up by linefeed characters
after every 64 characters.

ASC\-> is the inverse of \->ASC: it takes a string created by \->ASC and
converts it back into an object.  When you transmit the encoded strings,
be sure not to change the string; ASC\-> uses the checksum encoded in the
string to verify that the decoding is correct.  An "Invalid String" error
is returned if the result object does not match the original object
encoded by \->ASC.  When you upload a string to your computer, use HP 48
translate mode 3 so that the HP 48 will convert any CR/LF's back to LF's
when the string is later downloaded.

Two versions of ASC\-> are included here.  The first (P1) is in HP 48 user
language, using SYSEVALs to execute system objects.  P2 is a
string that the setup program uses P1 to decode into an executable
ASC\->--then P1 is discarded.  The second version is more
compact than the first, and also uneditable and therefore safer (but it can't
be transmitted in ASCII form, which helps to make the point of this exercise).

Here are the programs, contained in a directory:

(start)
%%HP: T(3)A(D)F(.);
DIR
P1              @ ASC\-> Version 1.
\<<
  IF DUP TYPE 2 \=/
  THEN "Not A String" DOERR
  END RCWS \-> ws
  \<< 16 STWS
    #0 NEWOB SWAP DUP SIZE
    IF DUP 4 <
    THEN DROP SWAP DROP "Invalid String" DOERR
    END
    DUP 65 / IP - 4 - # 18CEAh SYSEVAL
    "" OVER # 61C1Ch SYSEVAL
    SWAP # 6641F8000AF02DCCh
    # 130480679BF8CC0h # 518Ah SYSEVAL
    # 19610313418D7EA4h # 518Ah SYSEVAL
    # 7134147114103123h # 518Ah SYSEVAL
    # 5F6A971131607414h # 518Ah SYSEVAL
    # 12EA1717EA3F130Ch # 518Ah SYSEVAL
    # 280826B3012808F4h # 518Ah SYSEVAL
    # 6B7028080BEE9091h # 518Ah SYSEVAL
    # BE5DC1710610C512h # 518Ah SYSEVAL
    # 705D00003431A078h # 518Ah SYSEVAL
    # 3D8FA26058961431h # 518Ah SYSEVAL
    # 312B0514h # 518Ah SYSEVAL
    # 18F23h SYSEVAL
    DUP BYTES DROP 4 ROLL
    IF ==
    THEN SWAP DROP
    ELSE DROP "Invalid String" DOERR
    END ws STWS
  \>>
\>>

P2      @ ASC\->  Version 2.  To be converted by ASC\-> version 1.

"D9D20D29512BF81D0040D9D20E4A209000000007566074726636508813011920
140007FE30B9F060ED3071040CA1304EC3039916D9D2085230B9F06C2A201200
094E66716C696460235472796E676933A1B21300ED30FD5502C230C1C1632230
CCD20FA0008F14660CC8FB97608403104AE7D814313016913213014117414317
414706131179A6F5C031F3AE7171AE214F8082103B6280821909EEB0808207B6
215C0160171CD5EB870A13430000D50713416985062AF8D341508813044950B9
F06BBF06EFC36B9F0644230C2A201200094E66716C696460235472796E676933
A1B2130B21300373"


P3      @\->ASC.     To be converted by ASC\->.
"D9D20D2951881304495032230FD5502C230A752688130ADB467FE30322306AC3
0CB916E0E30CBD30F6E30C1C1632230CCD20DC0008F14660CC8FB97608403104
AE7D8143130169174147061741431311534AC6B4415141534946908D9B026155
4A6F53131F3AE731A014C161AE215F08082103A6280821939EEC08082170A621
4C161170CD56B870A18503430000D5071351796A9F8D2D02639916D9D2085230
C2A209100025F4D402F426A6563647933A1B2130A2116B213033C0"

SETUP   @Automatic setup program
\<< P2 P1 'ASC\->' STO
    P3 ASC\-> '\->ASC' STO
    { P1 P2 P3 SETUP } PURGE
\>>

END
(end)


Installation instructions:

    1.  Edit the above text between (start) and (end) into a text file
        named CONV (for example).  Be sure that you leave the strings
        exactly as entered above, with no extra spaces or other
        invisible characters at the beginnings or ends of the lines.
    2.  Set the HP 48SX into ASCII transfer mode.
    3.  Using Kermit, download CONV text file to the 48, verify its
        checksum (6C8Ah).
    4.  Execute CONV to make it the current directory.
    5.  Execute SETUP.
    6.  The directory CONV now contains ASC\-> and \->ASC, ready to
        use.

To archive the decoded versions of ASC\-> and \->ASC back on your computer,
be sure to set the HP 48SX in binary transfer mode before uploading.

Disclaimers:

+ Use the programs at your own risk.  Any time you delve into the SYSEVAL
world, there are increased dangers.  Archive your 48 memory before
experimenting with these programs!  Also, verify the checksums of objects
defined above to make sure they have been downloaded correctly, before
executing ASC\->.

+ I will not answer questions about how the programs work.  This is not
because of any great secrecy, but rather because it's hard to give
any answer that doesn't lead to more questions, and more, and more...

+ 48 hackers are welcome to mine any nuggets they can from the programs,
and from the fact that \->ASC is a convenient way to decompile an object.


* Appendix B: Using non-HP RAM cards in your HP 48SX:

  If you use RAM cards that are NOT designed for the HP 48SX, it is
  possible to severely damage your HP 48SX.  If you want to be safe, you
  should only use RAM cards designed for the HP 48SX.

  Here is an edited discussion from comp.sys.handhelds.

  From steveh@hpcvra.CV.HP.COM Fri Mar  1 17:00:00 1991
  From: steveh@hpcvra.CV.HP.COM (Steve Harper)
  Date: Thu, 10 May 1990 22:46:09 GMT
  Subject: RE: HP48SX Memory Card Pricing
  Organization: Hewlett-Packard Co., Corvallis, OR, USA

  There has been a substantial  amount  of  comment  regarding  the
  memory cards for the HP48SX and their prices.  My purpose in this
  response is not to attempt to justify any particular  price,  but
  rather   to   present  the  technical  reasons  why  there  is  a
  substantial price difference between the memory cards  and  other
  types of expansion memory for PC's, for example, with which users
  are probably more familiar.

  Some users have correctly pointed out  that  the  memory  in  the
  cards  is  static  RAM  rather  than dynamic RAM commonly used in
  PC's.  Dynamic RAM uses one transistor and a capacitor  for  each
  bit of memory whereas static RAM requires either four transistors
  and two resistors, or six transistors.  The net result is that an
  equivalent amount of static RAM is much larger and therefore much
  more expensive than dynamic RAM.  The advantage  is  that  static
  RAM  doesn't  need  to continually be running and drawing current
  (refresh cycles) to retain the contents of memory.

  In addition, the static memory used in the cards is not just  any
  static  memory,  but  is  specially processed and/or selected for
  very low standby current.  This allows the backup battery in  the
  card  to  keep  memory  alive  for  a very long time, rather than
  requiring the user to replace it every few months.   The  special
  processing  and/or  special  testing  to select low current parts
  adds to the already higher cost of the static RAM chips.

  The standard molded plastic DIP package used for most  integrated
  circuits,  including  memory  chips,  is  relatively  inexpensive
  because of its simplicity and the huge  volumes.   Unfortunately,
  these  packages  are  too  large  to  put  into  a  memory  card.
  Therefore, the card manufacturer mounts  the  individual  silicon
  memory  chips  directly  on a special thin PC board together with
  the memory support  chips.   Because  multiple  chips  are  being
  placed  in a single hybrid package in a special process which has
  lower volume, yields are lower and this again causes the cost  to
  be  higher.  Indeed, the yield becomes exponentially worse as the
  number  of  chips  and  interconnections  increases  in  such   a
  packaging process.

  In addition to the memory chips themselves, two  more  integrated
  circuits  and  several discrete components are required for power
  and logic control.  A bipolar technology chip senses the external
  voltage  and  switches  the  power to the chips from the internal
  keep-alive battery as needed.  A CMOS gate  array  chip  protects
  the memory address and data lines from glitches/ESD when the card
  is not plugged in.  This chip also generates the proper  enabling
  signals  when  there are multiple memory chips in the card, as is
  presently the case with the 128 Kbyte RAM card.  These chips must
  be  designed  for extremely low current, just as the memory chips
  are.

  In addition to the battery and  the  battery  holder,  the  other
  mechanical  parts  are  important, too.  The molded plastic frame
  holds the PC board and provides  the  foundation  for  the  metal
  overlays  and the shutter-and-springs assembly which protects the
  contacts from  ESD  and  from  contaminants.   The  write-protect
  switch  is  also an important feature.  It is quite expensive for
  the manufacturer to make the tools necessary to fabricate each of
  these  parts  as  well  as  the  tools  to  assemble and test the
  complete card.  While the volume of memory  cards  is  relatively
  low  this  tooling cost represents a significant part of the cost
  of each card.

  Admittedly, there are other alternatives, such as those presently
  used  in  PC's,  to  provide  a  memory expansion capability.  To
  provide that kind of expansion would require the calculator to be
  much  larger  than  it  is  and possibly more expensive.  This is
  clearly very undesirable.

  Other features that were felt to be essential were the ability to
  distribute  software applications and to share and archive/backup
  user-created programs and data.  Other expansion alternatives  do
  not provide these important benefits.  The IO capabilities of the
  calculator provide these features only to a limited degree.

  One other item bears repeating here: Memory cards for use in  the
  calculator  will  clearly indicate that they are for use with the
  HP48SX.   Other  memory  cards  exist  which   are   mechanically
  compatible  with the HP48S, but these cards cannot be relied upon
  to work electrically in the calculator.   The  HP48SX  cards  are
  designed  for  a  lower  supply  voltage range.  Use of the other
  cards may cause memory loss, and under certain circumstances  may
  even damage your calculator electrically.

  From steveh@hpcvra.CV.HP.COM Fri Mar  1 17:00:00 1991
  From: steveh@hpcvra.CV.HP.COM (Steve Harper)
  Date: Fri, 11 May 1990 16:52:07 GMT
  Subject: Re: Memory Card: Give Us *True* Facts!
  Organization: Hewlett-Packard Co., Corvallis, OR, USA

  My previous statement that under certain circumstances the
  calculator may even be damaged electrically is not a ploy.
  If the calculator's internal power supply voltage happens to
  be near the low end of the range, say 4.1 V, and the voltage
  at which the card's voltage control chip shuts it down
  happens to be near the high end of its range, say 4.2 V (this
  can and does occasionally occur for the non-HP48SX cards),
  then the calculator will start to drive the memory address
  lines and the card will still have these clamped to ground
  (that's what it does to protect itself when there is not
  sufficient system voltage to run).  This unfortunate situation
  may simply trash your memory, or if the calculator tries
  to drive enough of the lines high at the same time, several
  hundred milliamps may flow...for awhile that is, until something
  gives up...  On the other hand, your calculator and a particular
  non-HP48SX card may work just fine if those voltages happen
  to be at the other end of their ranges.  These voltages are
  also slightly temperature sensitive.  It may work in the
  classroom or office and not at the beach, or vice versa.
  The voltage trip point of the HP48SX cards has been set
  lower (a different voltage control chip) so that this cannot
  occur, regardless of part and temperature variations.

  One other item was brought to my attention yesterday by
  Preston Brown that I should have included in my original
  posting here.  While most of us recognize that comparing
  ram cards to a handful of dynamic ram chips to plug into
  your PC is apples and oranges, it may be more interesting
  to compare the HP48SX cards with cards for other products,
  like the Atari Portfolio, the Poquet, the NEC Ultralite,
  etc.  I believe you will find that the prices on the
  HP48SX cards are not at all out of line.

  Steve
  "I claim all disclaimers..."

  the non-HP48SX cards

  From prestonb@hpcvra.CV.HP.COM Fri Mar  1 17:00:00 1991
  From: prestonb@hpcvra.CV.HP.COM (Preston Brown)
  Date: Thu, 17 May 1990 17:26:53 GMT
  Subject: Re: Memory Card: Give Us *True* Facts!
  Organization: Hewlett-Packard Co., Corvallis, OR, USA

  When the RAM cards detect that voltage is to low to operate they
  clamp the address lines to ground.  This clamping is done by turning
  on the output drivers of a custom chip included on the card.  The
  clamping current is speced at 2mA min at the Vol output level.  Since
  the 48 can be trying to drive the line all the way high even more
  current is typical.  10mA per fight is not uncommon with totals of
  several hundred mAs.

  The VDD power supply is regulated at 4.1 - 4.9 with typical
  parts at the low end (4.3).  The power to the cards is switched
  thru a transistor, creating up to a 0.1V drop.  Standard Epson
  cards have a significant chance of seeing this voltage as
  to low and shutting down.  We have seen cards do this in the lab.
  When it occurs the calculator locks up with VDD pulled down
  to about 2.5V and 250mA being drawn from the batteries.  This
  current drain greatly exceeds the ratings for the power supply
  and can damage your calc.  The least that will happen is a loss
  of memory.

  Now, why didn't we regulate VDD higher?
  The 48 has two power supplies VDD at 4.3 and VH at 8.5.  VH
  cannot be regulated higher without exceeding the spec for
  our CMOS IC process.  VH is used as the + voltage for the I/O.
  In order to meet a +3V output level VH must be more then 3.6V
  above VDD.  (VDD is used as I/O ground). Our power supply
  system increase the battery life and reduces the cost greatly
  for the wired I/O.

  Preston


* Appendix C: Compact Data Storage:

  From Jim Donnelly (jimd@cv.hp.com):

        A simple length-encoding technique can be put to use for a
        free-format, very compact multi-field data storage system.
        Two tiny programs, SUBNUM and STRCON are here to help the
        process, and are listed near the end of this note.  At the
        end of the note is a directory that may be downloaded into
        the HP 48 that contains the examples.

        The principle is to store starting indices in the beginning
        of a string that point to fields stored subsequently in the
        string.  The indices are stored in field order, with an
        additional index at the end to accommodate the last field.
        There are several small points worth mentioning:

        1) Fields may be 0-length using this technique.
        2) The execution time is uniform across all fields.
        3) This technique saves about 4 bytes per field after
           the first field, because the string prolog and length
           are omitted for fields 2 -> n.


        EXAMPLE:
        --------

                         Indices  |          Fields
          Character               |     1 11111111 12222222222
          Position :   1  2  3  4 |567890 12345678 90123456789
                      +--+--+--+--+------+--------+-----------+
          String :    | 5|11|19|30|Field1| Field2 |  Field 3  |
                      +--+--+--+--+------+--------+-----------+

        This is a string that contains 3 fields, and therefore 4
        index entries.  The first field begins at character 5, the
        second field begins at character 11, and the third field
        begins at character 19. To keep the pattern consistent,
        notice that the index for field 4 is 30, which is one more
        than the length of the 29 character data string.

        To extract the second field, place the string on the stack,
        use SUBNUM on character 2 to extract the starting position,
        use SUBNUM on character 3 to extract the (ending position +1),
        subtract 1 from the (ending position+1), then do a SUB to
        get the field data.  NOTE: The index for field 1 is stored
        as character code 5, NOT "5"!  To place the field index for
        field 1 in the string, you would execute "data" 1 5 CHR REPL.


        PROGRAM:
        --------

        The following program accepts an encoded data string in
        level 2 and a field number in level 1:

        DECODE   "data"  field#  -->  "field"

        <<  --> f
          <<
            DUP f SUBNUM                ; "data" start -->
            OVER f 1 + SUBNUM           ; "data" start end+1 -->
            1 -                         ; "data" start end -->
            SUB                         ; "field" -->
          >>
        >>


        DATA ENCODING
        -------------

        The following program expects a series of 'n' strings on
        the stack and encodes them into a data string suitable
        for reading by the first example above.

        The programs SUBNUM and STRCON are used to assemble the
        indices.

        ENCODE      field n  ...  field 1   n   -->  "data"

        << DUP 2 + DUP 1 - STRCON --> n  data
          <<
            1 n
            FOR i
              data i SUBNUM OVER SIZE   ; ... field index fieldsize
              + data SWAP               ; ... field "data" index'
              i 1 + i + SWAP CHR REPL   ; ... field "data"'
              SWAP + 'data' STO         ; ...
            NEXT
            data                        ; "data"
          >>
        >>

        In this example, four strings are encoded:

        Input:  5: "String"
                4: "Str"
                3: "STR"
                2: "STRING"
                1:         4

        Output: "xxxxxSTRINGSTRStrString"      (23 character string)
        (The first five characters have codes 6, 12, 15, 18, and 24)



        VARIATION:
        ----------

        The technique above has a practical limit of storing
        up to 254 characters of data in a string.  To overcome
        this, just allocate two bytes for each field position.
        The code to extract the starting index for becomes a
        little more busy.  In this case, the index is stored as
        two characters in hex.

                      Indices  |          Fields
       Character               | 11111 11111222 22222223333
       Position :   12 34 56 78|901234 56789012 34567890123
                   +--+--+--+--+------+--------+-----------+
       String :    |09|0F|17|21|Field1| Field2 |  Field 3  |
                   +--+--+--+--+------+--------+-----------+

           <<  --> f
             <<
                DUP f 2 * 1 -           ; "data" "data" indx1 -->
                SUBNUM 16 *             ; "data" 16*start_left_byte  -->
                OVER f 2 * SUBNUM +     ; "data" start
                OVER f 2 * 1 + SUBNUM   ; "data" start end_left_byte -->
                16 * 3PICK f 1 + 2 *
                SUBNUM + 1 -            ; "data" start end -->
                SUB                     ; "field"  -->
             >>
           >>



        TWO VERY TINY HELPFUL PROGRAMS
        ------------------------------

        SUBNUM          "string"  position  -->  code

        << DUP SUB NUM >>



        STRCON          code  count  -->  "repeated string"

        << -->  code count
          << "" code CHR 'code' STO
             1 count START code + NEXT
          >>
        >>


        A DIRECTORY YOU CAN DOWNLOAD
        ----------------------------

        This is a directory object.  Cut after the === to the end of
        the file and download to your HP 48 using the ASCII transfer.

========================================================================
%%HP: T(3)A(D)F(.);
DIR
  DECODE
    \<< \-> f
      \<< DUP f
SUBNUM OVER f 1 +
SUBNUM 1 - SUB
      \>>
    \>>
  ENCODE
    \<< DUP 2 + DUP 1
- STRCON \-> n data
      \<< 1 n
        FOR i data
i SUBNUM OVER SIZE
+ data SWAP i 1 +
SWAP CHR REPL SWAP
+ 'data' STO
        NEXT data
      \>>
    \>>
  STRCON
    \<< \-> code count
      \<< "" code CHR
'code' STO 1 count
        START code
+
        NEXT
      \>>
    \>>
  SUBNUM
    \<< DUP SUB NUM
    \>>
END


* Appendix D: Various useful functions

     (Shamelessly lifted from the HP-41C manual:)

     The LASTX function is useful in calculations where a number occurs
     more than once.  By recovering a number using LASTX, you do not
     have to key that number into the calculator again.

     For example, calculate:

                96.704 + 52.394706
               --------------------
                     52.394706

        Keystrokes:                     Stack:
       ------------------              --------------------
        96.704 ENTER                    96.704

        52.304706 +                     149.098706

        LASTX                           149.098706
                                        52.304706

        /                               2.84568265351

@
@ This is a version of LASTX for the HP 48SX
@
%%HP: T(3)A(D)F(.);
\<< DEPTH \-> n
  \<< LASTARG DEPTH n
- DUP \-> s
    \<< ROLLD s 1 -
DROPN
    \>>
  \>>
\>>
Newsgroups: comp.sys.hp48