Article 5058 of comp.sys.handhelds: Path: en.ecn.purdue.edu!noose.ecn.purdue.edu!samsung!zaphod.mps.ohio-state.edu!usc!apple!portal!cup.portal.com!sjthomas From: sjthomas@cup.portal.com (Stephen J Thomas) Newsgroups: comp.sys.handhelds Subject: Re: HP-28 to HP-48 changes Message-ID: <40123@cup.portal.com> Date: 14 Mar 91 04:15:03 GMT References: <20898@shlump.nac.dec.com> <25590122@hpcvra.cv.hp.com.> <1991Mar13.140731.11318@schaefer.math.wisc.edu> <39091@netnews.upenn.edu> Organization: The Portal System (TM) Lines: 361 Following is a reference article I wrote a couple of months ago. It was distributed at the Jan 1991 User's Meeting in Las Vegas which corresponded with the WCES. On seeing the recent 28 -> 48 postings, I realized I never posted it. It's about 6 type-written pages....under 16K. - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - HP-28S TO HP 48SX TRANSITIONS by Stephen J. Thomas This article is a summary of functional differences of HP-28S operations as implemented on the HP 48SX. It is not intended to present all of the many improvements and new commands in the 48, but is primarily an aid for 28 users who wish to use their previously- developed programs on the 48. The comments on any given topic are not exhaustive, but are quick summaries of operational differences. Further reference should be made to the appropriate manual(s). In addition, a number of non-programmable differences are included, as well as a table showing differences in system flags. I would appreciate receiving any corrections or additions from the readers. My mail and email addresses are listed at the end of this article. [l-shft] and [r-shft] refer to the HP 48 orange left-shift and blue right-shift keys, respectively. "sigma" represents the Greek upper-case letter sigma. GENERAL COMMENTS: When a special display (message, plot, etc.) is created on the HP-28S, it usually persists after program completion until a key is pressed. Alternatively, the command CLMF may be included in the program to resume the normal stack display when the program is completed. On the HP 48SX, special displays are normally cleared and the stack (or graphics environment) display is resumed when a program is completed -- unless the FREEZE command is included in the program. The 48 does not contain the 28's R->P and P->R commands. Instead, the calculator is set to one of rectangular, polar/cylindrical or polar/spherical modes. This mode affects the interpretation of complex numbers. Conversion is done by changing the mode. The rectangular form is always stored internally; only the DISPLAY of these values are converted when in a polar mode. The 28 commands ARRY->, C->R, LIST-> and STR-> may be replaced by the more general 48 command OBJ->, although the 48 does recognize the 28 forms. The 28's ALGEBRA FORM environment has been changed and is now incorporated in the EquationWriter Application. It is often possible to recover from accidentally PURGEing or STOring into a global variable on the 48 via the LASTARG command. The HP 48 menus are completely reorganized and renumbered. The current custom menu list (or the name of a global variable containing it) is stored in the variable 'CST', a distinct one of which may exist in each subdirectory. Custom input menus (created with STO as the first list element on the 28) are not supported on the 48. The [l-shft] key can be used to store directly into global variables displayed in the menu line. The MENU command will accept any object as its argument and store it in 'CST'. However, an error is generated if 'CST' does not contain a list (or the name of a global variable containing a list) when the custom menu is invoked. Specific pages within a menu can be specified by the fractional portion of the argument -- for example, 12.02 refers to page 2 of menu #12. In a custom menu, labels other than the key actions can be specified -- with either a string or 21x8 graphics object. [l-shft] and [r-shft] actions can also be specified. The sixty-four user flags are represented by positive flag numbers. The sixty-four system flags are represented by negative flag numbers. The PLOT system has been substantially enhanced, with multiple plot types, increased functional abilities in the interactive Graphics Environment, equation catalog, etc. Points are digitized by pressing ENTER in the Graphics Environment. See the manual. SPECIFIC OPERATIONAL DIFFERENCES: ABORT -- Is not recognized by the 48. Use 0 DOERR. AXES -- Can also be used to specify axis labels. CENTR -- Also accepts a real number x corresponding to the point (x,0) as the plot center. CHR -- Some characters and character codes have been changed. CLLCD -- Does not clear the menu line. In a program, must be followed by 7 FREEZE for the blank display to persist. CLMF -- Is not supported by the 48. See "General Comments" above. CLUSR -- Is recognized with this spelling, but has been renamed CLVAR, which can be placed in the command line with [r-shft] DEL. CLUSR is "translated" to CLVAR in programs and lists. COLsigma -- Is supported by the 48, but not listed in a menu. It is replaced by the separate commands XCOL and YCOL in the STAT menu. COMMAND -- (keyboard only) Renamed LAST CMD. CONVERT -- Has been redefined to function in the new Units Management System: 2: x_sourceunit CONVERT 1: z_targetunit 1: y_targetunit -------> (y is ignored) C->R -- Is provided on the 48, operating similarly to R->C (and [l-shft] 2D and V-> ). See R->C below. DGTIZ -- Is not supported on the 48. Instead, the interactive Graphics Environment is entered with the GRAPH command. DISP -- Now accepts arguments 1 - 7. Must be followed by FREEZE for the display to persist after program execution ends. DRAW -- Does not erase previous graphics display before plotting. DRWsigma -- Is not supported by the 48. It is replaced by SCATRPLOT or SCATTER DRAW. EVAL -- EVALuating a list on the 28 returns it unchanged. On the 48, each element of the list is EVALuated in turn. EXGET -- Not present in the 48. It is replaced by the SUB command in the interactive EquationWriter Application. EXSUB -- Not present in the 48. It is replaced by the REPL command in the interactive EquationWriter Application. FACT -- Is recognized with this spelling, but has been renamed !. Only the ! form is in a menu. ! requires postfix notation. FIX -- In FIX display mode, real numbers are displayed with digit separators, such as: 1,234,567.89 or 1.234.567,89 (depending on the state of flag -51). GETI -- Wrap-around indicated by flag -64 rather than 46. IM -- Performs conversion to rectangular value if in a polar mode. INDEP -- Can also be used to specify the plotting range of the independent variable. Integration -- Completely redesigned. Output uses the | (Where) function. Stack usage is different: 4: Lower limit 1: Expression representing 3: Upper limit ===> integral (can be EVAL'd) 2: Integrand 1: Variable of integ Error stored in variable IERR Algebraic syntax: $(lower limit, upper limit, integrand, name) where $ represents the integral character. KEY -- On the 48, returns a 2-digit rc (row-column) keycode to level 2, rather than a string representing the pressed key. LAST -- Is recognized with this spelling, but has been renamed LASTARG. It is displayed as ARG in the MODES menu to enable/disable. LAST is translated to LASTARGS in programs and lists. LCD-> -- Returns a graphics object (GROB), not a string. ->LCD -- Argument is a graphics object (GROB), not a string. MENU -- See "General Comments" above. NEG -- Does not appear in a menu. Use the +/- key. NUM -- Some characters and character codes have been changed. OBGET -- Not present in the 48. It is replaced by the SUB command in the interactive EquationWriter Application. OBSUB -- Not present in the 48. It is replaced by the REPL command in the interactive EquationWriter Application. PIXEL -- Is not recognized by the 48. It is replaced by PIXON, which accepts a complex number as a "user" unit coordinate, or a list of two binary integers as a pixel coordinate. PMAX -- Is supported by the 48, but is not in a menu. PMIN -- Is supported by the 48, but is not in a menu. PPAR -- Contains two additional elements: plot type & dependent variable. PREDV -- Is recognized by the 48, but has been renamed PREDY. PRMD -- Not present in the 48. PRUSR -- Is not supported by the 48. Use VARS PR1. PURGE -- The contents of the PURGEd variable can be retrieved by the LASTARG command when PURGE is executed from the keyboard. Recovery is not possible when PURGE is executed from a program, the command line, or when the argument is a list. Use PGDIR to purge a non-empty subdirectory. PUTI -- Wrap-around indicated by flag -64 rather than 46. P->R -- Not provided. See "General Comments" above. RCLF -- Returns a list containing two binary integers -- the first representing the states of the system flags (-1 thru -64) and the second representing the user flags (1 thru 64). RCLsigma -- Is supported on the 48. Press [r-shft] STOsigma to execute RCLsigma or place it in the command line. RDX, -- Is renamed FM, (Fraction Mark) in the MODES menu. RE -- Performs conversion to rectangular value if in a polar mode. RES -- Accepts a binary value to specify pixel resolution (as a real value does on the 28) or a real value to specify resolution in "user" units. RND -- On the 48, the value in level 2 is rounded as specified by the level 1 value: 0 <= n <= 11 ---> level 2 value rounded to n decimal places -11 <= n <= -1 ---> level 2 value rounded to n significant digits 12 ---> level 2 value rounded according to current display format (as the level 1 value is rounded on the 28). Also see TRNC (Truncate) in the 48 manual. R->C -- Is provided on the 48. If a polar mode is set, the values are converted to polar form for display. Also, if flag -19 is set, [l-shft] 2D from the keyboard and the command ->V2 create a complex number. In this case, however, if a polar mode is set, the real values are interpreted as already being polar and are not converted for display. R->P -- Not provided. See "General Comments," above. SCLsigma -- Is supported by the 48, but not listed in a menu. SIZE -- Arguments which cause a "Bad Argument Type" error on the 28S return the real value 1 to level 1 on the 48. STO -- The previous contents of the global variable can be retrieved by the LASTARG command to recover from accidental over- writing performed from the keyboard. Recovery is not possible when STO is executed from a program or the command line. STOF -- If the argument is a single binary integer, it is interpreted as the set of system flags and the user flags are left unchanged. If the argument is a list containing two binary integers, the first corresponds to the system flags and the second to the user flags. See RCLF and "General Comments" above. SYSEVAL -- To get the ROM version on the 48, do #30794h SYSEVAL. TRAC -- Printer Trace mode is not directly provided by the 48, but may be implemented using Vectored ENTER. TYPE -- Returns values from 0 thru 31. On the 48, built-in functions and commands return 18 and 19, respectively, compared to 8 on the 28. UNDO -- (keyboard only) Renamed LAST STK and displayed as STK in the MODES menu to enable/disable. VAR -- Is supported on the 48, but not listed in a menu. WAIT -- On the 48, arguments 0 and -1 interrupt program execution until a key is pressed -- and then return its 3-digit rc.p (row-column.plane) keycode. + -- If either level 1 xor level 2 contains a string, the other object is converted to a string and they are concatenated. Stephen J. Thomas P.O. Box 371861 El Paso TX 79937-1861 sjthomas@cup.portal.com FLAG TABLE If there are no notations, the set and clear states function similarly on the HP 48 as on the HP-28. S = set C = clear Description HP-28S HP 48SX --------------------------------------------------------------------- Last Arguments 31 -55 S = arguments saved S = arguments not saved C = arguments not saved C = arguments saved Trace Mode 32 Not supported Auto CR Mode 33 -38 Solution Mode 34 -1 Constants Mode 35 -2 S = remain symbolic S = eval to number C = eval to number C = remain symbolic Results Mode 36 -3 S = symbolic S = numeric C = numeric C = symbolic Binary Wordsize 37 - 42 -5 - -10 Binary Base 43 - 44 -11 - -12 Multiline Display 45 -52 S = ML on S = ML off C = ML off C = ML on Index Wraparound 46 -64 Double Space Print 47 -37 Radix/Fraction Mark 48 -51 Display Format 49 - 50 -49 - -50 Beeper 51 -56 Error/BEEP Command -57 Alarm Beep Print Speed 52 Controlled by DELAY Number of Decimal Digits 53 - 56 -45 - -48 Underflow Action 57 -20 Overflow Action 58 -21 Infinite Result Action 59 -22 S = error S = return +/- MAXR C = return +/- MAXR C = error Angle Mode 60 -17 & -18 S = radians C & C = degrees C = degrees S & C = radians C & S = grads Negative Underflow 61 -23 Positive Underflow 62 -24 Overflow 63 -25 Infinite Result 64 -26 Stephen J. Thomas P.O. Box 371861 El Paso TX 79937-1861 sjthomas@cup.portal.com