Minor updates to TRI1 v4.1d consist of:

o An option to just return the "other" SSA solution,
  without even remembering which way the SSA
  flag had been set in the first place,
  so the first four menu option keys now all do
  the same thing, after possibly first doing something
  to user flag 6 (set it, clear it, flip it, or leave it alone).

Below is the source; hacked self-extracting binary is in TRI1;
I hope I won't have any more updates from now on :)

-----------------------------------------------------------
With best wishes from:   John H Meyers   <jhmeyers@mum.edu>
-----------------------------------------------------------

%%HP: T(3); @ TRI1 Triangle Solver, v4.1d, as of 1998/06/22

@ This solver supplies its own menu for manual use, but
@ can also be called as a subroutine from other programs,
@ or split (for library) into: Menu, Calc, Display

@ A, B, C represent the angles opposite sides a, b, c.
@ Data-entry menu shows sides and angles with suitable symbols,
@ so you can easily distinguish which keys are for which variables.

@ Entering a zero value sets the given object to "undefined" state;
@ negative input values are treated the same as zero.

@ For consistency with other built-in HP48 solvers,
@ unshifted menu keys store values, right-shifted keys recall values;
@ since calculation is automatic, left-shifted keys are used to
@ toggle "user-defined" vs. "calculated" status ( +value vs. -value ).
@ Press NXT for additional functions (SSA option, re-calc, purge).

@ All current values are automatically re-displayed each time.
@ User-supplied values are displayed with positive sign;
@ calculated values are displayed with negative sign.

@ No computation is performed if you have either too few or
@ too many current user-specified variables; store new values
@ and/or delete (purge or store zero into) old values until exactly
@ three positive values (other than three angles) are specified,
@ at which time a solution is then automatically computed,
@ displayed, and returned to the stack as a list of six values.

@ The ambiguous SSA case solves for either the smaller or larger
@ possible third side value, depending on user-selected menu option;
@ selecting the other option automatically recalculates other solution.

@ If you want to always return both SSA solutions at once, store this
@ program file as 'TRI2' and the following short program as 'TRI1':
@ \<< 7 CF 6 CF TRI2 7 FS? { 6 SF TRI2 } IFT \>>
@ Exchange 6 CF and 6 SF to reverse the default ordering of solutions.

@ Units:
@ All variables may have any allowable units; SAS solves for third side
@ as \v/(S*S), which may for S/SX be converted to base units instead;
@ any answer may also be CONVERTed to unit of any other side (by you :)
@ User-specified angles may have any angle units attached; any
@ angles without units are in current angle mode (DEG, RAD, GRAD).

@ Input values:
@ Does not check or handle angles > 180 degrees,
@ nor "degenerate" triangles (any side or angle = 0).

@ For S/SX you must obtain an additional program to simulate DOLIST,
@ e.g. <http://www.dejanews.com/getdoc.xp?AN=318142735>

@ Use BZM to make a much smaller self-extracting executable.

\<< @ Main program
    @ MUST be stored under SAME NAME as appears in this MENU:

{ @ MENU for entering, recalling, flipping  --sides-- & <angles>
  @ Note that main program name is repeated 25 times in menu!
  @ Symbol  NS:Store       LS:Flip sign       RS:Recall
  { "-a-"
    { \<< 'a' TRI1 \>> \<< { } 'a' TRI1 \>> \<< 'a' DUP TRI1 \>> } }
  { "-b-"
    { \<< 'b' TRI1 \>> \<< { } 'b' TRI1 \>> \<< 'b' DUP TRI1 \>> } }
  { "-c-"
    { \<< 'c' TRI1 \>> \<< { } 'c' TRI1 \>> \<< 'c' DUP TRI1 \>> } }
  { "\<)A"
    { \<< 'A' TRI1 \>> \<< { } 'A' TRI1 \>> \<< 'A' DUP TRI1 \>> } }
  { "\<)B"
    { \<< 'B' TRI1 \>> \<< { } 'B' TRI1 \>> \<< 'B' DUP TRI1 \>> } }
  { "\<)C"
    { \<< 'C' TRI1 \>> \<< { } 'C' TRI1 \>> \<< 'C' DUP TRI1 \>> } }
  @ Press NXT for more options and functions:
  { "<" \<< 6 SF TRI1 \>> } @ Solve SSA for smaller third side value
  { ">" \<< 6 CF TRI1 \>> } @ Solve SSA for larger  third side value
  { "< >" \<< IF 6 DUP FS? THEN CF ELSE SF END TRI1 \>> } @ Flip SSA
  { CALC  \<< TRI1 \>> } @ Re-calculate from existing variables
  { ZERO  \<< { PURGE } TRI1 TRI1 \>> } @ Zero all variables
  { PURGE \<< { PURGE } TRI1 \>> } @ Purge all variables
} TMENU

\<< @ Sub-program

{ a b c A B C } @ Sides, angles

@ Optional stack arguments (provided by menu, or by calling program):
@
@ { PURGE }       Purge all variables (no calculation/display)
@ 'a' 'a'         Recall variable     (no calculation/display)
@ { } 'a'         Flip variable sign,  then calculate/display
@ number 'a'      Store into variable, then calculate/display
@ anything else   Calculate and/or display all variables

DEPTH 1 > @ Any argument(s) on stack?
{ OVER { PURGE } SAME
  { SWAP EVAL 0 } @ Purge
  { DUP2 SWAP POS @ Is argument a triangle variable?
    { DEPTH 3 < { DROP2 STO } IFT @ STO Error: Too Few Arguments
      ROT ROT DUP2 SAME @ Variable name twice?
      { ROT DROP2 RCL ABS 0 } @ Recall positive value
      { OVER { } SAME @ Is "value" arg an empty list?
        { SNEG DROP 1 } @ Flip sign, then re-calc, or SNEG DROP2 0
        { OVER TYPE { 0 13 } SWAP POS @ Real or unit?
          { STO 1 } @ Store
          { DROP SWAP 1 } IFTE @ Leave on stack, or ROT DROP2 0
        } IFTE
      } IFTE
    } 1 IFTE
  } IFTE
} 1 IFTE

@ Stack now contains:
@ { a b c A B C } 1    Execute calculation/display
@                 0    Do not execute remainder of program

\<< @ Calculate and display:

@ 64 possible combinations for currently defined variables:
@ (adjusted to create new variables in { a b c A B C } VAR menu order)
0 0 5 FOR i OVER 6 i - GET
DUP #185C7h SYSEVAL VTYPE 0 < { 0 OVER STO } IFT @ In current directory?
RCL UVAL 0 > { 2 i ^ + } IFT NEXT @ Handle user-specified input only

{ @ Calculation table [64 entries]
  @ 0/1 is under- or over-determined set of values.
  @ { Equation# Variable ... } indicates how to solve.
  0 0 0 0 0 0 0 1
  0 0 0 { 1 A 6 b 7 a } 0 { 1 B 7 a 6 b } { 1 C 6 b 7 a } 1
  0 0 0 { 1 A 6 c 5 a } 0 { 1 B 5 a 6 c } { 1 C 5 a 6 c } 1
  0 { 6 B 1 A 7 a } { 6 C 1 A 5 a } 1 { 2 a 3 B 4 C } 1 1 1
  0 0 0 { 1 A 5 b 7 c } 0 { 1 B 7 c 5 b } { 1 C 5 b 7 c } 1
  0 { 7 A 1 B 6 b } { 3 b 2 A 4 C } 1 { 7 C 1 B 5 b } 1 1 1
  0 { 4 c 2 A 3 B } { 5 A 1 C 6 c } 1 { 5 B 1 C 7 c } 1 1 1
  { 2 A 3 B 4 C } 1 1 1 1 1 1 1
}

@ Solve for missing variables, if calculation table indicates:
SWAP 1 + GET DUP TYPE @ One element from calculation table

\<< DUP @ For negating solved variables after solving is completed
  1 \<< DUP TYPE @ Beginning of a DOLIST program object

{ @ Direct Solver: Equation number, name of variable to isolate

  @ SSA:  Using sine formula?  [and]  Solving for angle?
  DUP2 { 5 6 7 } ROT POS { A B C } ROT POS AND ROT ROT @ Used later...

  { @@@  Equation list [left-hand column is comments only]:
    @1@ 'A+B+C=ACOS(-1)'
    @2@ 'SQ(a)=SQ(b)+SQ(c)-b*c*COS(A)*2'
    @3@ 'SQ(b)=SQ(c)+SQ(a)-c*a*COS(B)*2'
    @4@ 'SQ(c)=SQ(a)+SQ(b)-a*b*COS(C)*2'
    @5@ 'a/b=SIN(A)/SIN(B)'
    @6@ 'b/c=SIN(B)/SIN(C)'
    @7@ 'c/a=SIN(C)/SIN(A)'
  } ROT GET SWAP ISOL EQ\-> @ 'var' 'expression'

    @ Handle mixed units among sides (note SAS requires '\v/(S*S)'):
    #54AFh SYSEVAL #18DBFh SYSEVAL @ 'Expression' -> Meta
    OVER { ASIN ACOS } SWAP POS @ These can't handle 50_cm/m etc.
    @ Include \v/ [SquareRoot] for S/SX, optionally for G/GX (SAS case)
    { { UBASE } OBJ\-> SWAP 4 ROLLD + } IFT @ Insert UBASE before fcn
    \->LIST @ End of mixed-units remover (for ASIN, ACOS, maybe \v/)

    EVAL @ numeric value of 'expression'
    IFERR 0 MAX THEN 6 DROPN "No solution" DOERR END @ Complex answer

    @ SSA ambiguous case if:
    @ Sine law (eq 5,6,7) solves for angle > user-supplied angle
    ROT { DUP A 0 MAX B 0 MAX C 0 MAX + + > OVER SIN 1 < AND @ SSA2?
      { 7 SF 6 FS? @ Set SSA2 indicator; solve for smaller third side?
      { -1 ACOS SWAP - } IFT } IFT } IFT @ 90 < angle < 180 degrees

    SWAP STO @ Store value of solved variable

} IFT \>> @ End of DOLIST program object
  -55 CF @ Ensure "Last Arguments" returned on IFERR
   -1 SF @ Solutions need "principal value" (of ASIN, ACOS)
    7 CF DOLIST @ Clear "ambiguous" flag before calculations start

  @ Negate variables just solved for (after solving all of them):
  1 \<< IF DUP TYPE THEN SNEG ELSE DROP END \>> DOLIST 1 \>>

{ DROP 0 } IFTE @ No calculation if under- or over-determined

@ { a b c A B C } 0/1 remains on stack

@ Display all current values (blank if undefined/zero):
DUP 7 FS? "Ambiguous" "Unique" IFTE " solution" +
"Enter 3 positive items" IFTE 1 DISP
1 6 FOR i OVER i GET DUP " " +
DUP NUM 9 SQ < { "\<)" SWAP + } IFT SWAP RCL @ Angle symbols
IF DUP ABS UVAL THEN + ELSE DROP END @ Handle complex & unit values
i 1 + DISP NEXT 3 FREEZE

\<< 1 \<< RCL ABS \>> DOLIST \>> @ All inputs and results
{ DROP } IFTE @ No calculation was performed

\>> IFT @ Calculate and display

\>> @ Sub-program ends.

@ The next command uses the hidden directory to store all variables
@ (omit this line to store variables in current directory instead).
@ Note that the hidden directory is accessed faster than any other
@ directory, but it can keep only one set of variables at a time.
#64037h SYSEVAL @ Execute next command in hidden directory

EVAL @ Execute sub-program

\>> @ Main program ends.

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

