Post Reply 
Is there a RPN operation that does nothing? (NOP)
01-05-2018, 12:43 AM (This post was last modified: 01-05-2018 12:47 AM by Bill Duncan.)
Post: #7
RE: Is there a RPN operation that does nothing? (NOP)
(01-05-2018 12:35 AM)PeterP Wrote:  
(01-04-2018 06:19 AM)hth Wrote:  The Text-0 instruction in the HP-41 pops in my mind as something that was suggested in the PPC days. It has to be created by synthetic means.

HÃ¥kan

IIRC, for the HP41 this Text-0 is the fastest, shortest 'NOP', followed by the Lbl0-Lbl14, which is also one byte but slightly more wasteful as long programs often need more than 15 Lbl, meaning if one is used for a NOP, one needs to revert to 2-byte LBLs.
Non-Synthetic and not Lbl-wasteful is Sto St X (or X<> ST X).
Our kind host Dave has put up a fantastic "Synthetic 101" here which shows how to get a byte grabber all the way to 'LB'.

Remember that labels search forward on the 41. I often reuse the short one byte labels for short jumps forward (so they compile). Can't do it with loops of course, but short jumps over code are ripe for short label reuse.. I forget whether they enable stack lift or not..

My recent addition to the 41 library, Alarm (relative) manager reuses LBL 00 quite a bit for short jumps forward.
Find all posts by this user
Quote this message in a reply
Post Reply 


Messages In This Thread
RE: Is there a RPN operation that does nothing? (NOP) - Bill Duncan - 01-05-2018 12:43 AM



User(s) browsing this thread: 1 Guest(s)