|Re: WP34S functions missing in action? (LJ, RJ, RL, RLC, RR, RRC, etc.)|
Message #11 Posted by Paul Dale on 5 June 2011, 5:29 p.m.,
in response to message #7 by Walter B
As Walter mentioned we discussed this long and hard. We started off having the bit commands operating as the 16c (BS, BC, ...). For a while these got extended like the flag commands were but that got lost later for reasons I don't remember. Then we added the current versions which are actually more flexible and more compact versions with arguments (BS#, BC#, ...). I've a suspicion that there was a third complete suite as well but I'm probably misremembering. Anyway, the result was a big mess of bit operations mostly alike.
After much back and forth, the decision was finally made to lose direct 16c compatibility here (helped along by the almost complete lack of published 16c programs) and stick with the single set that provided the more complete & useful range of functionality. I.e. the BS#, BC#, ... new commands.
The bottom line is that the current bit commands are considerably more flexible than the 16c's. The 16c's bit operations are available by swapping x and y before the operation and going indirect on y for the bit number. So were very nearly compatible and more flexible.
For similar reasons the shifts and rotates got count arguments. In this case we definitely had three flavours: SR, SRn, SRB. The first two being the 16c commands and the last being a byte shift as per the RPL machines. Giving the command an argument completely replaced all three (times five for the five shifts and rotates) with a single more powerful command with the proviso that direct 16c compatibility was lost for the SRn command. I think this loss of direct compatibility is worth the gain in usefulness.
If you really want the direct 16c commands, define them using alpha labels and XEQ them from a flash program region. We've got enough capability to exactly emulate the 16c here. From memory this is the kind of framework you'll require:
Have fun with the indirection. Almost every command that takes an argument can take an indirect argument as well. Also, remember that all registers including the stack can be used for the indirect register.
Edited: 5 June 2011, 5:44 p.m.