Announcing the "Dare 2 Compare", new version of the Total_Rekall
|
09-06-2016, 06:46 AM
Post: #7
|
|||
|
|||
RE: Announcing the "Dare 2 Compare", new version of the Total_Rekall
(09-06-2016 05:23 AM)Ángel Martin Wrote: A quick look at the 34 QRG helped me understand your comment - so it's a general-purpose stack arrangement alteration, which corresponds to some standard functions in particular cases but goes beyond that of course. I reckon it should be relatively simple to implement this using ALPHA to hold the "master" string of the stack arrangement, such as "YYZZ"... an interesting exercise but how about practical applications for it? Yes, it's a general command to generate any possible stack arrangement, it's very useful if the implementation make it shorter and quicker than the equivalent sequence of traditional stack commands to achieve the same goal. It is useful especially in long loops where any execution time saved has a significant impact on the overall program duration. Here is an example where I've used it twice, it's a subroutine using only the stack to calculate the sum of the proper divisors of the number in X, it returns this sum in X and the initial number in Y: Code: X Y Z T If you use the Alpha register to hold the master string this will not save any time nor decrease the overall instruction count. With 4 registers to track you can code them with two bits and code the string with a byte, so my idea was, if possible, to have a new <> instruction which would accept the 4 letters X, Y, Z, T as parameters to generate the byte coding the stack final state. But this is may be pushing the envelope too far ... |
|||
« Next Oldest | Next Newest »
|
User(s) browsing this thread: 2 Guest(s)