EXC/ x<>Rn for stack efficiency
|
06-12-2017, 12:08 PM
(This post was last modified: 06-12-2017 12:17 PM by Dieter.)
Post: #7
|
|||
|
|||
RE: EXC/ x<>Rn for stack efficiency
(06-11-2017 11:57 PM)Matt Agajanian Wrote: save program steps or clutter up my program with save/restore stack code. When translating a program from one calculator to another it's usually not a good idea to mirror the original code 1:1 on the other device. IMHO the best approach is trying to understand how the original code works and translate this idea (!!, not the code) into code for the other machine. So if you have, say, TI-programs with Exc-commands you should not try to simulate this Exc-instruction in your HP code. Instead see how the program works and do it in RPN with the special features of the target calculator – which may be even shorter and more effective. Often in RPN things can be done quite relaxed. Here is an example: Code: TI-58/59 HP-25/33 No need to worry about stack registers or how to emulate that Exc-instruction. Another example – swap the contents of R1 and R2: Code: TI-58/59 HP-25/33 Again, there's no need to save the stack or emulate the Exc-instruction. Dieter |
|||
« Next Oldest | Next Newest »
|
User(s) browsing this thread: 1 Guest(s)