Archive-name: hp48-faq/part3
Last-modified: 07/05/1994
Version: 2.00
Posting-Freqency: every 14 days or so

        *********************************************************
             HP 48 S/SX/G/GX  Frequently Asked Questions List
        *********************************************************
                      PART 3 of 4: Appendices A - G

                  Currently Maintained by: Keith Maddock
                  Originally Compiled by: Darryl Okahata

Key: ! =new Q/A  + =revised answer 

PART 3:    
    * Appendix A: ASC\-> and \->ASC functions:
    * Appendix B: Using non-HP RAM cards in your HP 48SX:
    * Appendix C: What's new in the HP 48G/GX
    * Appendix D: The EquationWriter Bug & Rev J Bugfix
    * Appendix E: Compact Data Storage:
    * Appendix F: Various useful functions
    * Appendix G: Rotation rate to angular frequency conversion bug


******************************************************************

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

Note: Since this appendix was written by Bill, I dare not modify it.  
However, I wish to note that ASC\-> and \-ASC do work on both the SX and 
GX versions.

From: billw@hpcvra.CV.HP.COM (William C Wickes)

                      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: What's new in the HP 48G/GX?

  [ The following was taken from a posting by Joe Horn.  ]

                           +--------------------+
                           |     WHAT'S NEW     |
                           |  IN THE HP48 G/GX  |
                           +--------------------+
   
                           collected & annotated
                             by Joseph K. Horn
   
   (1) AUTOMATIC LIST PROCESSING.
   
       Almost all commands that did not accept a list as one of their
       arguments can do so now.  Here are just a few examples:
   
             { 1 2 3 } SF sets flags 1, 2, and 3
             { 1 2 3 } SQ returns { 1 4 9 }
             { 1 2 3 } { 4 5 6 } * returns { 4 10 18 }
             { freq dur freq dur ... } BEEP can play a song with no
               audible hiccup between tones.
   
       Since + has always been used to concatenate lists, a new ADD
       function exists to add the elements of two lists, like this:
   
             { 1 2 3 } { 4 5 6 } ADD returns { 5 7 9 }, whereas
             { 1 2 3 } { 4 5 6 } + returns { 1 2 3 4 5 6 } as it did
               before.
   
   (2) PORTS.
   
       Only port 1 can be merged in the GX.  Card slot 2, which is
       intended for large-capacity RAM cards, is permanently "free", and
       is automatically divided up into 128K "ports", each of which
       becomes Port 2, Port 3, Port 4, etc.  Up to 4 Megabytes can be
       plugged into slot 2, which would then become Port 2 through Port
       33. (Although the FREE and MERGE commands were kept for HP 48SX
       compatibility, GX users will prefer the new FREE1 and MERGE1
       commands).  Therefore the maximum amount of merged main memory is
       256K (unlike the SX which allowed up to 288K) after MERGE1; the
       maximum amount of fully online free independent memory is 4224K
       after FREE1.
   
   (3) LOCAL VARIABLES.
   
       Variable names prefixed with a <- (backarrow character) are
       compiled as local (temporary) variable name objects even if
       they're not explicitly after FOR or ->.  This allows programs to
       share values through local variables, which is much faster than
       sharing values through global variables, and they get purged
       automatically.
   
   (4) SPEED.
   
       CPU clock speed is double the S/SX's, but throughput is estimated
       to be only 40% faster, primarily due to the fact that *all* RAM &
       ROM is now bankswitched (on the S/SX only a 32K portion of the ROM
       required bank switching), and it still has the same 4-bit bus
       bottleneck.
   
   (5) IMPROVED COMMANDS:
   
       AXES can now also specify the spacing of the tick marks.
       DEPND can now also specify the initial values and tolerance
             for the new DIFFEQ plot type.
   
   (6) HP SOLVE EQUATION LIBRARY CARD COMMANDS:
   
       AMORT, amortization calculations
       CONLIB, starts Constants Library catalog
       CONST, returns value of a named CONLIB constant
       DARCY, calculates Darcy friction factor
       EQNLIB, starts Equation Library catalog
       F0lambda, calculates black-body power fraction
       FANNING, calculates Fanning friction factor
       MCALC, marks an MSOLVR variable as "not user-defined"
       MINEHUNT, starts the "Minehunt" video game
       MINIT, initializes Mpar from 'EQ' for MSOLVR
       MITM, customizes title & menu of MSOLVR's screen
       MROOT, solve for variable(s) in MSOLVR
       MSOLVR, shows Multiple Equation Solver menu
       MUSER, marks an MSOLVR variable as "user-defined"
       SIDENS, density of silicon as function of temperature
       SOLVEQN, starts solver for specified EqLib equation(s)
       TDELTA, subtracts temperatures like "-" ought to but doesn't
       TINC, adds temperatures like "+" ought to but doesn't
       TVM, shows the financial calculator (Time Value of Money) menu
       TVMBEG, sets payments-at-beginning-of-periods mode
       TVMEND, sets payments-at-end-of-periods mode
       TVMROOT, solves for a TVM variable
       ZFACTOR, calculates gas compressibility factor Z
   
       Note: The EQ Card's Periodic Table and Tetris game are *not* in
             the HP 48G/GX.

   (7) NEW ARRAY COMMANDS:
   
       COL+, inserts a column vector into a matrix or a number into a
             vector (like INSCOL/PUTCOL in Donnelly's Tool Library)
       COL-, deletes a column from a matrix or number from a vector
             (identical to DELCOL in Donnelly's Tool Library)
       COL->, combines multiple column vectors into a matrix
       ->COL, breaks a matrix into multiple column vectors
              (like repeated GETCOL in Donnelly's Tool Library)
       COND, column norm condition number of a square matrix
       CSWP, swaps two columns in a matrix
             (like EXCOL in Donnelly's Tool Library)
       ->DIAG, returns vector of major diagonal elements of a matrix
       DIAG->, creates matrix with specified diagonal elements
       EGV, eigenvalues and right eigenvectors of a square matrix
       EGVL, eigenvalues of a square matrix
       FFT, discrete Fourier transform
       IFFT, inverse discrete Fourier transform
       LQ, returns the LQ factorization of a matrix
       LSQ, minimum norm least-squares solution to an ill-determined
            system of linear equations
       LU, returns the Crout LU decomposition of a square matrix
       PCOEF, returns polynomial with given roots (inverse of PROOT)
       PEVAL, evaluates polynomial at x
       PROOT, finds all roots of polynomial (inverse of PCOEF)
       QR, returns QR factorization of a matrix
       RANK, rank of a rectangular matrix (uses flag -54)
       RANM, creates matrix with random elements
       RCI, multiplies elements in one row of a matrix by a scalar
       RCIJ, does RCI then adds the result to a row
       ROW+, inserts a row vector into a matrix or a number into a vector
             (like INSROW/PUTROW in Donnelly's Tool Library)
       ROW-, deletes a row from a matrix or number from a vector
             (identical to DELROW in Donnelly's Tool Library)
       ROW->, combines multiple row vectors into a matrix
       ->ROW, breaks a matrix into multiple row vectors
              (like repeated GETROW in Donnelly's Tool Library)
       RSWP, swaps two rows in a matrix
             (identical to EXROW in Donnelly's Tool Library)
       SCHUR, computes the Schur decomposition of a square matrix
       SNRM, spectral norm of an array
       SRAD, spectral radius of a square matrix
       SVD, singular value decomposition of a matrix
       SVL, computes the singular values of a matrix
       TRACE, sum of diagonal elements of a square matrix
   
   (8) GRAPHICS & PLOTTING COMMANDS:
   
       ANIMATE, displays grobs on the stack sequentially.  You can use
                the defaults, or specify your own delay between frames
                (can be *very* fast), the number of times to repeat the
                sequence, and even the pixel coordinates.  It's just like
                a ROLL REPL loop... except very fast.
          Note: Charlie Patton converted 17 seconds of the Apollo
                moon-walk video into HP48 GROBs and ran them with
                ANIMATE, and it looked very good!
       ATICK, specifies tick spacing on plot axes
       EYEPT, specifies the eye-point coordinates in a perspective plot
       GRIDMAP, selects the new "gridmap" plot type
       PARSURFACE, selects the new "parametric surface" plot type
       PCONTOUR, selects the new "pcontour" plot type
       PICTURE, same as GRAPH command
       SLOPEFIELD, selects the new "slopefield" plot type
       WIREFRAME, selects the new "wireframe" plot type
       XVOL, sets the width of the 3D plotting volume
       XXRNG, sets the width of the 3D target mapping range for gridmap
              and parametric surface plots
       YSLICE, selects the new "yslice" plot type
       YVOL, sets the depth of the 3D plotting volume
       YYRNG, sets the depth of the 3D target mapping range for gridmap
              and parametric surface plots
       ZVOL, sets the height of the 3D plotting volume
   
   (9) USER-INTERFACE COMMANDS:
   
       CHOOSE, displays a point-and-click menu "dialog box"
       INFORM, formatted multi-line input with named fields (nice!!)
       MSGBOX, displays text in a centered box with shadow, then WAITs
       NOVAL, placeholder for unspecified values in INFORM argument list
   
   (10) LIST PROCESSING COMMANDS:
   
        ADD, adds lists element-wise (see section #1 above)
        DOLIST, evals an object on multiple lists
        DOSUBS, evals a program or command taking arguments from a list
        ENDSUBS, returns the number of loops the current DOSUBS will do
        HEAD, first element in a list or first char in a string
              (identical to CAR in Donnelly's Tool Library)
        DeltaLIST, list of first finite differences of list objects
        SigmaLIST, sum of the elements in a list
        PiLIST, product of the elements in a list
        NSUB, returns the current list pointer value during a DOSUBS
        REVLIST, reverses the order of the objects in a list
                 (like REVERSE in Donnelly's Tool Library)
        SEQ, list of results from repeated execution of an object
             (like a FOR/STEP loop but the results go into a list)
        SORT, sorts elements in a list into ascending order, or sorts a
              list of lists using each list's first element as the key
              (can be done with LSORT/QSORT in Donnelly's Tool Library)
        STREAM, executes an object on first two elements of a list, then
                again on the result and the 3rd element, etc.  Allows
                easy creation of things similar to SigmaLIST and PiList.
        TAIL, returns a decapitated list or string (see HEAD above)
              (identical to CDR in Donnelly's Tool Library)
       
   (11) SYSTEM COMMANDS:
   
        CYLIN, sets polar/cylindrical coordinate mode
        FREE1, like 1 FREE (see section #2 above)
        MERGE1, like 1 MERGE (see section #2 above)
        PINIT, port initialize, esp. important for 4-Meg RAM card users
        RECT, sets rectangular coordinate mode
        SPHERE, sets polar/spherical coordinate mode
        TEACH, loads the Owner's Manual examples into a dir in HOME
        VERSION, returns the operating system ROM version string
              Note: first 48G's  will be version "K"; first 48GX's will
                 be version "L" due to the removal of a port management
                 bug in version "K" which does not affect the 48G.
        XRECV, Xmodem protocol receive (binary mode only)
        XSEND, Xmodem protocol send (binary mode only)
   
   (11) MATH COMMANDS:
   
        LININ, tests whether an equation is linear in a given variable
        NDIST, normal probability density
        PCOV, population covariance of SigmaDAT
        PSDEV, population standard deviation of SigmaDAT
        PVAR, population variance of SigmaDAT
        RKF, solves initial value problem using Runge-Kutta-Fehlberg
        RKFERR, change in solution and absolute error using RKF
        RKFSTEP, next solution step with given error tolerance using RKF
        RRK, solves initial value problem using Rosenbrock & RKF
        RRKSTEP, next solution step with given error tolerance using RRK
        RSBERR, change in solution and absolute error using Rosenbrock
   
   (12) MENU NUMBERS & KEY CODES.
   
        Many menu numbers have changed, so software that uses # MENU or #
        TMENU may not work the same as in the HP 48S/SX. (Specifically,
        only menu numbers 0-3, 28, 30, and 42-59 are the same). Likewise,
        almost all of the shifted keycodes correspond to new commands and
        menus, which programmers must take into account; for example, the
        "RAD" key on the S/SX had the keycode 82.2, but it's 21.2 on the
        G/GX.  The left-shift key, which was orange on the S/SX, is now
        purple [officially "lavender"], and the right-shift key which was
        blue on the S/SX is now green [officially "teal"] on the G/GX.
        Also, the digit-key menus can be activated by both shift keys;
        left-shift gives the softkey menus like in the S/SX, but the
        right-shift gives the new user-friendly full-screen menus.
        The unshifted keys remain identical to the S/SX, except for a
        cosmetic color change to match the very dark green of the
        calculator case.
   
   (14) MANUALS.
   
        The G/GX comes with two manuals, a "Getting Started" manual for
        newbies, and a cost-cutting, slimmer owner's manual called the
        "User's Guide" which will *not* cover programming in depth, since
        HP figures that the huge majority of all 48 owners never program
        it anyway.  The few power users (namely, us!) can buy the
        optional "Advanced Users Guide" (similar to the S/SX's
        "Programmer's Reference Manual") which covers programming and
        other topics.
   
    Note: The accuracy and completeness of this list is in no way
    guaranteed, but I included everything I could find and tried to make
    it all clear.  Please post addenda & corrigenda as you discover them
    so that we S/SX owners can all make a fast transition to the G/GX.

*******************************************************************

* Appendix D: The EquationWriter Bug & Rev J Bugfix

  [ The following was taken from a posting by Joe Horn.  ]

    Rev A-E EquationWriter Bug & Rev J Bugfix
                -----------------------------------------
                           observed by Joe Horn

                           +------------------+
                           |  Rev E behavior  |
                           +------------------+

  Clear flag -53 first (the Precedence Flag).

  On a Rev E, put '((1+2)/(3+4))^5' on the stack and press down-arrow.
  You'll see:
                             5
                      / 1+2 \
                      | --- |                         (A)
                      \ 3+4 /

  which is as it should be.  But now press [orange-shift] [+]; see the
  message "Implicit () off" momentarily; press [left-arrow] (not
  backspace), then press the [EXIT] softkey.  The expression gets
  mangled into this:

                        1+2
                    -----------                       (B)
                          (5)
                     (3+4)

  which is not equal to expression (A) above!  Bug, yes?  Press [ON] to
  abort the process.

  Now set flag -53, then repeat the above procedure.  First you see:

                             5
                      / 1+2 \
                      | --- |                         (C)
                      \ 3+4 /

  which is the same as (A) above; but continuing as before, you see:

                               (5)
                      /  1+2  \
                      | ----- |                       (D)
                      \ (3+4) /

  which *is* equal to the original.  Thus the bug can be worked around
  by keeping flag -53 set (not a pleasant solution).

                           +------------------+
                           |  Rev J behavior  |
                           +------------------+

  Major difference: after pressing down-arrow, Rev J goes directly into
  graphic mode, so you have to press ON and then EXIT to get into the
  equation editor (which Rev E goes directly into).  But that's petty
  cash compared to the following big change.

  The same sequence of operations, first with flag -53 clear, then set,
  exactly as detailed above, yields these four displays in a Rev J:

                               5
                      / (1+2) \
                      | ----- |                       (A')
                      \  3+4  /

  (notice the extra parentheses?) and then:

                               5
                      / (1+2) \
                      | ----- |                       (B')
                      \ (3+4) /

  which *is* equal to (A'); nothing at all like expression (B) above!
  and then:

                               5
                      / (1+2) \
                      | ----- |                       (C')
                      \  3+4  /

  which is the same as (A') above; and then:

                               5
                      / (1+2) \
                      | ----- |                       (D')
                      \ (3+4) /

  which is also equal to (A').  No bug in Rev J.

  SUMMARY: Rev A-E have a bug in the EquationWriter that can mangle
  expressions if flag -53 is clear (the default) and if "Explicit
  Parentheses" mode is toggled.  This bug has been fixed in Rev J.

  Unfortunately (as you can see above) Rev E *always* puts parentheses
  around polynomial numerators.  It is therefore impossible to use the
  ->GROB command on a Rev J to create a GROB that looks like expression
  (A) above; the simplest that can be had is expression (A').

  Another minor change, while I'm at it: Rev A-E don't change the menu
  when you press REPL; Rev J automatically flips to the appropriate
  RULES menu.

  None of these changes are documented anyplace that I'm aware of.

  Please post any corrections & additions you find.  Thanx.

  -Joseph K. Horn-   -Peripheral Vision, Ltd.-
  akcs.joehorn@hpcvbbs.cv.hp.com
  Disclaimer: I don't work for HP, EduCALC, or anybody else.

******************************************************************

* Appendix E: 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 F: Various useful functions



Begin OBJFIX.DOC
-----------------------------------------------------------------------
OBJFIX by HP for SX and GX

When a binary object received by Kermit on the HP-48 is
left as a string beginning with HPHP48, OBJFIX will
extract the HP-48 object if the only problem is that
extra bytes got appended to the end.

OBJFIX takes a variable name in stack level 1 and
modifies the contents of the variable if no other
problems are detected.

[Note: This is like FIXIT by Horn & Heiskanen on Goodies
 Disk #8, but this one is by HP and so I suppose it's
 more reliable. Although it fails the test cases
 included with FIXIT, that may be because they were
 artifically contrived cases. Try both on real-world
 downloads that need fixing. Which do you like better?
 -jkh-]

-----------------------------------------------------------------------
End OBJFIX.DOC

--------Cut-Between-the-Lines:-Begin-OBJFIX.ASC-----------------------
%%HP: T(3)A(D)F(.);
"D9D202BA81D9F81B2040D9D20F2A26DA91629C8145126489162C23072C80CCD2
0BD0008FB9760147108134164142C2818F24D534501008B2F41643150D73B840
58405438314A161966D2BF6BF6A6F5BE16314213114334CF8208A6F58F235A04
55136D7D4EA494D231A1CA101110131CA130DBE284F8FC0760D41198F29960D4
130142119EA1408F5E0108D341503223072D70B2130B21301460"
--------Cut-Between-the-Lines:-End-OBJFIX.ASC-------------------------
         
Begin FIXIT.DOC
-----------------------------------------------------------------------
(Comp.sources.hp48)
Item: 139 by akcs.joehorn@hpcvbbs.cv.hp.com [Joseph K. Horn]
                        and mheiskan@hut.fi [Mika Heiskanen]
Subj: Fixit v3.2, repairs bad downloads
Date: 14 Jul 1992

PURPOSE:
-------
Converts a badly uploaded string into the original object.

THEORY:
------
A lot of folks upload HP 48 objects poorly, such that when you
download them, you just get strings full of garbage that look
something like this:

    "HPHP48-E#c&r$a%p@!*!..."     [looks familiar, eh?]

That's because they uploaded it using XMODEM, or managed to screw it
up some other way.  The following FIXIT program takes such a string
and extracts the actual HP 48 object that they originally intended to
upload (if at all possible).

Such object extraction can be done by hand, but it's too dangerous.
FIXIT minimizes the danger of Memory Clear.  It checks whether the
extracted object is a valid one, and if not, drops it from the stack
before the HP 48 attempts to display it.  All of the many bad
downloads I've archived over the years are fixed by FIXIT, whereas
about half of them cause a Memory Clear when extracted manually. No
guarantees, however.  Use at your own risk.

The actual extraction is done by a "Code object" written by Mika
Heiskanen.  The User RPL "shell" around this code object is what
minimizes the danger of Memory Clear; it was written by Joe Horn.

INSTRUCTIONS:
------------
BACKUP YOUR MEMORY, just in case the string contains a logic bomb.

Place the bad download on the stack (see "HPHP48-...") and run FIXIT.

Possible results:

(1) No error: the object was extracted successfully and is on level 1.

(2) "Bad Argument Type" error: you didn't have a string on level 1.

(3) "Bad Argument Value" error: the string wasn't of the proper form;
    it must be an "HPHP48-..." downloaded string.

(4) "Invalid Definition" error: the object was mangled in transmission
    so badly that its end was lost; the object cannot be extracted.

(5) "Undefined Result" error: there is no HP 48 object in the string.

(6) "Recover Memory? YES/NO": the string contained a bomb, and FIXIT
    detonated it.  Press YES to sift through the shrapnel and rubble
    in a feeble attempt to resurrect the dead.  Press NO to bury them.

EXAMPLES:
--------
To do the following examples, download the FIXIT directory to your HP 48
and get into it.

(1) Press HI.  See "HPHP48-E%$@#%@...", a badly uploaded download.
    Before pressing FIXIT to fix it, try doing what we all used to do:
    press EDIT to see if we can recognize anything (usually a futile
    attempt).  We see:

    "HPHP48-E%@$#%$@...
    << Melancholy Baby >>"

    But looks can be deceiving; press ON to exit the editor, and then
    press FIXIT to extract the intended upload:

    << Happy Camper >>

(2) Press WTAV; see another garbage download.  But EDIT refuses; the
    string contains nulls.  Press FIXIT; see successfully extracted
    directory.

(3) Press BAD1.  Notice that it looks exactly like WTAV.  (Press WTAV,
    compare, then DROP).  But its ending is all messed up; manually
    extracting WTAV from BAD1 can cause Memory Clear.  Press FIXIT and
    see "Error: Invalid Definition" indicating that the object inside
    BAD1 is so mangled that its end cannot be located.

(4) Press BAD2.  Looks like WTAV again.  But its body is messed up;
    manually extracting it would create an External object that could
    cause Memory Clear if evaluated.  Press FIXIT and see "Error:
    Undefined Result" indicating that there is nothing recognizable
    inside BAD2.


-----------------------------------------------------------------------
End FIXIT.DOC

--------Cut-Between-the-Lines:-Begin-FIXIT.ASC------------------------
%%HP: T(3)A(D)F(.);
"69A20FF7CE20000000402414442340C2A203B000840584054383D25403A20FF7
2500000000403535947440D9D20E16329C2A2DBBF13013216DF1406A1C42328D
BF193632B213034000407545146540D9D20E163292CF1EFFB1DBBF1EBFB150FA
193632B2130003030303034C000402414441340C2A203B000840584054383D25
469A20FF72500000000403535947440D9D20E16329C2A2DBBF13013216DF1406
A1C42328DBF193632B213034000407545146540D9D20E163292CF1EFFB1DBBF1
EBFB150FA193632B2131313131313134C000407545146540C2A203B000840584
054383D25469A20FF72500000000403535947440D9D20E16329C2A2DBBF13013
216DF1406A1C42328DBF193632B213034000407545146540D9D20E163292CF1E
FFB1DBBF1EBFB150FA193632B2130003030303034C00020849420C2A20570008
40584054383D254D9D20E163284E2050841607079784E20603416D6075627936
32B2130A0BA02D456C616E63686F6C697022416269702BB28000506494859445
50D9D20E16323CE2278BF168BC1ED2A2167E1AFE22D9D203CE2278BF19C2A274
3A2C58C1C2A2031000840584054383D2167E1AFE22D9D2078BF18B9C1DBBF1AA
F028DBF1CCD201200014713717917F137145142164808C5BF22D9D2033920200
0000000005150933A1B21305DF22B21305BF22D9D20339202000000000004150
933A1B21305DF223CE2278BF168BC1D8DC1167E1AFE22D9D203FBF1339202000
000000002770933A1B21305DF223CE2278BF19D1A1DBBF18DBF1E0CF1D5CE1AF
E22D9D208DBF1339202000000000000030933A1B21305DF22CB2A193632B2130
B21303D4F"
--------Cut-Between-the-Lines:-End-FIXIT.ASC--------------------------

*******************************************************************

     (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 48
@
%%HP: T(3)A(D)F(.);
\<< DEPTH \-> n
  \<< LASTARG DEPTH n
- DUP \-> s
    \<< ROLLD s 1 -
DROPN
    \>>
  \>>
\>>
******************************************************************

* Appendix G:   Rotation rate to angular frequency conversion bug

By: Wlodek Mier-Jedrzejowicz
    wlodek@ic.ac.uk (or if that fails, try wacm@doc.ic.ac.uk)
    Posted to comp.sys.hp48 on April 29, 1994

      ROTATION RATE TO ANGULAR FREQUENCY CONVERSION BUG
    
There is a rotation rate conversion bug in the HP48G/GX which I have 
not seen reported here before, so after discussion with the folks at 
Corvallis I am posting this description. Warning: it is 159 lines long!

First - an example. Put the unit object 60_rpm in level 2 and the unit 
object 1_r/s in level 1, then execute the command CONVERT. You are 
asking the HP48 to convert a rotation rate of 60 revolutions per minute 
into an angular frequency in radians per second. 60 rpm is 1 revolution 
per second, or 2pi radians per second. No HP48G/GX will give this answer! 
Not everyone uses rpm or is even aware of the existence of this unit - 
it is one of the extra units in the UTILS menu of the Equation Library - 
so here is a second example - add 2pi radians per second to one Hertz. 
Put 6.2832_r/s in level 1, 1_Hz in level 1, and add. You are adding an 
angular frequency of two pi (one cycle) per second to a rotation rate 
of one per second, so the result should be a frequency of two Hertz. On 
an HP48S/SX that is the answer. On an HP48G/GX it is not.

When units are converted, by CONVERT, or during arithmetic on unit 
objects, the level 2 object is first turned into "base units", and then 
the result is converted into the units of the level 1 object. On the 
HP48S/SX, the "base unit" of angles is one rotation (or a "unit circle" 
or a revolution or a cycle). So, the angle unit of rpm (a revolution) 
or of Hz (a cycle if Hz is treated as a rotation rate) is already in 
base units - conversions to angles involving rpm and Hz automatically 
work correctly. On the HP48G/GX, the "base unit" of angles is the 
current angle mode (DEG, RAD or GRAD) - so any conversion from rpm or 
Hz (or any formula which works in cycles, rotations, revolutions, unit 
circles) to angles should be preceded by a conversion from the unit 
circle to the current angle. Apparently no-one noticed this would be 
necessary, because it all worked automatically on the HP48S/SX.

So, when you convert 60_rpm to units of _r/s, an HP48G/GX converts not 
60 rotations but 60 "base angle units" per minute to radians/second. In 
RAD mode, you get 1 radian per second. In DEG mode you get 1 degree per 
second, and in GRAD mode you get 1 grad per second (in each case 
expressed in radians). That's three different answers, none of which is 
correct! Exactly the same happens if you convert 1_Hz to angles per 
second, and the inverse mistake is made if you convert angles per time 
to cycles or rotations divided by time.

I first learned of this bug from a member of HPCC (the British club for 
users of HP handhelds), Peter Embrey. He describes his troubles in 
articles in the first two 1994 issues of our club journal, DATAFILE (in 
Volume 13 number 1 pages 12 to 14 and V13n2p6). He was calculating the 
energy stored by a flywheel - given by the formula (1/2)*I*omega^2 and 
after a time he decided the answers had to be much too big when he 
CONVERTed from kg*m^2*(r/s)^2 to W*h on an HP48GX. It turns out that 
(r/s) are the correct units to get the right answer, but the GX was 
converting to degrees per second as it was in DEG mode, so his answer 
was too large by a factor of (360/2pi)^2 - a factor of about 3,300. In 
this case, his HP48SX was not much better, since it converted from 
radians to unit circles. The way to get the correct answer is to use an 
HP48G or GX in RAD mode - or to divide out the radians from the formula 
before using CONVERT. This is not yet a bug, but needs as much care as 
does use of temperature units on the HP48. But when Peter tried to deal 
with the problem by working in rpm, he came upon the bug described 
above. My thanks to Peter for putting me on the trail!

Apparently this bug not been reported before - at least my friends in 
HP tell me that it was not on their list of known problems until I told 
them of it. (This means it is not fixed in the new revision R.) Why not 
- does everyone know about it and work around it without thinking to 
tell anyone else? Or does no-one use their HP48 to do calculations on 
rotating bodies - or do most people do calculations with rotating 
bodies in such a way that they do not encounter this problem? Could 
there be hundreds of students and engineers out there calculating and 
designing things on their HP48G/GX and getting wildly inaccurate 
results? Has anyone built a disk drive or a jet engine which rotates 
far too fast and will disintegrate because of this? No, of course not, 
all engineers know that any design calculation absolutely must be 
repeated on two entirely separate calculators or computer programs! :-| 
Maybe some students have lost marks in exams because of this though - 
but please, this is not intended to restart the discussion as to 
whether calculators should be allowed in exams! 

I want to underline again that apparently no-one has reported this 
before - which must mean that few people have been affected by it. It 
is therefore not a good reason to throw away your HP48G/GX or get on a 
high horse and demand that HP replace your HP48G/GX - but I think it is 
important that people be warned so they can take appropriate avoiding 
action. The rest of this message goes into more detail - if you never 
worry about rotation calculations then you can safely ignore the rest - 
though you might find it interesting, so don't stop yet :-)

One way to avoid this would be to add a new unit to the HP48 - call it 
what you like - the "cycle" or "rotation" or "revolution" or "unit 
circle". As I wrote above, this is already implied in the HP48S/SX; to 
see this on an HP48S/SX, put 360 degrees in level 1 and execute UBASE - 
the result is 1, meaning that 360 degrees are equivalent to one base 
unit of angle measurement, but that there is no named HP48 unit 
corresponding to this. In contrast, UBASE on an HP48G/GX considers the 
base unit of angle measurement to be the radian, even though CONVERT 
behaves as though the base unit is the current angle mode. There appear 
to be two different norms for base angle units on the HP48G/GX!

The whole subject gets very little mention in HP's manuals. In the 
original HP48SX manual (two volumes, spiral bound), the section on 
"Dimensionless Units of Angle" in chapter 13, on page 198, warns the 
reader about the danger of using dimensionless units and states how 
angle units and scalars are treated. In the later HP48S and HP48SX 
manual (one volume), the same warning is given in "Converting 
Dimensionless Units of Angle", on page 13-12. The HP48G Series User's 
Manual, in "Converting Angular Units" on page 10-7, says that 
conversion will interpret a scalar according to the current angle 
mode setting. (A scalar is a pure number with no units.)

For a detailed description, look in the HP48S/SX edition of "HP48 
Insights Vol II", section 21.4.3. This book is written by Dr Bill 
Wickes, who was the design team leader of the HP48SX, and who wrote 
the "Insights" books largely to provide the sort of explanations and 
details that get left out of manuals. A good explanation of angle units 
is exactly the sort of thing one can find there! He explains the 
pitfalls and unavoidable contradictions of working with angles in the 
HP48 units system and points out that the HP48S/SX make the somewhat 
arbitrary choice of using 2pi as the base unit of angles, thereby 
making conversions between angles per time and Hertz work correctly.

Maybe no-one on the HP48G/GX team read this while they were making 
changes from the HP48S/SX! Why did they change the base unit at all? 
Most likely they were trying to deal with another contradiction: the 
units system lets you add pure numbers to angles, since both are 
dimensionless. If you add the number 1 in level 2 to the unit object 
0_r in level 1 on an HP48S/SX, the number 1 is treated as 1 base unit, 
or 2pi radians, and the result is 6.2832_r - but if you take the SIN of 
the number 1 instead, it is not treated as 2pi, but as 1 unit of the 
current angle mode. The change made on the HP48G/GX does resolve this 
contradiction, but at the cost of introducing the bug described above.

As mentioned, a way to resolve the problems involved would be to add 
the angle unit "cycle" explicitly to the HP48 units system. Hz would 
then be treated as cycles per second when used in calculations 
involving rotations - rpm would be treated as cycles per minute, and 
conversions would go from cycles to the appropriate angle units. This 
suggestion was made by Peter Embrey in his articles, and the folks at 
HP accept that this is a good solution - but they have not implemented 
it yet. In the meantime, be very, very careful when converting between 
units of rotation rate and units of angular frequency. I would urge 
everyone who does not yet have a copy of Insights II to buy one and 
read the relevant section - maybe that will even entice Bill Wickes 
into publishing his long-awaited HP48G/GX version of the book!

I have not yet mentioned solid angles. In principle there should be no 
problem - on both the HP48S/SX and the HP48G/GX the base unit of solid 
angle is a "unit sphere", or 4pi steradians. On the HP48S/SX you can 
add the pure number 1 to 0_sr and get 12.5664_sr (4pi steradians). The 
HP48G/GX manuals imply that exactly the same should happen, but on my 
(version L) HP48GX this gives the error message "Inconsistent Units". 
This is yet another undocumented difference between the Series S and 
Series G but at least it is no bug!

Apologies for making this description so long, I hope most people will 
agree that a subject like this deserves a careful description! For my 
next trick - some details on the HP48 Random Number Generator.

******************************************************************


END PART 3 OF 4  


---------------------------------------------------------------------------
keithm@pchaos.dev.com                :-O                   Keith D. Maddock
From Raleigh Hills ( between Beaverton & Portland ), Oregon, USA    R.A.W.:
"Of course I'm crazy, but that doesn't mean I'm wrong. I'm mad but not ill"
KeyWords: Freightliner/GMI-EMI, HP48 FAQ Maintainer(GX-P), Eagle Scout, :-)

