EXC/ x<>Rn for stack efficiency
|
06-11-2017, 10:07 PM
Post: #2
|
|||
|
|||
RE: EXC/ x<>Rn for stack efficiency
(06-11-2017 08:58 PM)Matt Agajanian Wrote: I'm trying to find the most effective way to perform a register exchange function that minimizes stack disruption. Although on the 34C and 67, and later models the I register and x<>(i) functions are available, how can x<>Rn be accomplished with the 25 or 33 without disrupting the stack drastically? The obvious solution (assuming X is exchanged with register 1) would be: Code: RCL 1 Since the current X-value and the content of R1 require two stack registers, this solution loses the T-register: Code: before after Replacing the final R↓ with CLX + duplicates the previous Z to T while it clears LastX. As far as I can see you always have to sacrifice one register. Dieter |
|||
« Next Oldest | Next Newest »
|
User(s) browsing this thread: 1 Guest(s)