Wednesday, October 3, 2007

Addition to the HP-35s stack save/restore program - II

Extenstion to the U program for the case when a result has been produced and should be pushed on the stack:
[X, Y, Z, T | L]->Program invoking U001 first and U070 last ->[X', X, Y, Z | L]
Where X' is new content of X stack register present in the X stack register before U070 is executed.

Of interest for programs that do not take stack register input but produces a result in the X stack register.

U070 4
U071 STO I
U072 RDN
U073 RCL(I)
U074 ABS
U075 RDN
U076 XEQ U037
U077 R^
U078 RTN

Terms of use.

So now we have the subroutines:
  1. XEQ U001 to save the stack and LASTX.
  2. XEQ U029 to restore the stack and LASTX given U001 has been used to save.
  3. XEQ U050 to implement operation native unary operation stack and LASTX behaviour given U001 has been used to save.
  4. XEQ U070 to push single value on stack and preserve LASTX given U001 has been used to save.

No comments: