Post Reply 
Is there a RPN operation that does nothing? (NOP)
01-08-2018, 08:44 AM (This post was last modified: 01-08-2018 09:49 AM by Dieter.)
Post: #16
RE: Is there a RPN operation that does nothing? (NOP)
(01-08-2018 07:40 AM)Werner Wrote:  One more: CLD

CLD clears the display so that a VIEW or AVIEW message disappears. That's not quite "no operation". ;-)
Even without something in the display the 41's flying goose is reset to the left.

But when do you need a NOP on the 41 or 42? This happens essentially after an DSE or ISG command where only the decrement/increment is desired but not the final range check. Here in most cases the NOP step is never executed, so that it theoretically can be any command. However, if there is a chance that that step may be executed, I think a dummy label serves well (can be the same for every NOP throughout the program). If the next step enters a numeric value I ofter use an ENTER: there is no difference between "RCL 03" and "ENTER RCL 03" or "100" and "ENTER 100".

There are a lot of other options for a virtual NOP, depending on the rest of the program. If Alpha does not have to be preserved CLA will do. STO X has been mentioned, but it takes two bytes, so you may choose a register between 00 and 14 that at the moment is not in use. If your program runs in a certain angular mode you may simply set this mode again. If you know something about your x-value at that point of the program you may use a test that will always be true, e.g. x≠0? If two bytes are OK you may test one of the systems flags that always test clear, e.g. FC? 30 or FC? 54. So if a NOP is really required (which will not happen very often) there are numerous options.

Dieter
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) - Dieter - 01-08-2018 08:44 AM



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