NOP Revisited


Has anyone suggested using RPN as a NOP instruction? Seems like that ought to be pretty benign, among this crowd at least. (My apologies if someone has already suggested this. I did search for all of the NOP discussions and did not find it, but I certainly could have missed it.)


I thought of that too, but I can't take credit for thinking of it first. Someone else in a discussion a couple weeks back came up with it before me. It's a bit of an issue for AOS types, but *I* personally think it's great. ;-)



Someone else in a discussion a couple weeks back came up with it before me.

Yes, I also thought I'd seen it before, but like I said, my search did not reveal it. Actually, it seems like I dimly recall it being mentioned some years back (maybe by Paul Brogger?) in reference to the 33s.


Not I.

It's a fine choice, though. For my use, it's the instruction least likely to alter the state of the machine.


I previously suggested "RADIX." or "RADIX," as the perfect NOP. This should work well for all but the most internationally traveled among us :)


"RADIX." is fine choice, except for the somewhat schizophrenic display of the programmed instruction. Of course, if the user is in a position to use RADIX as a NOP, then this should not matter.


Hi Jeff.

May you please explain a little bit to a non-english native (i.e. myself ;-) what "NOP" stands for?

I also read it in some past threads, and could not get to understand what it referred to....
Thanks in advance.

Best regards.



May you please explain a little bit to a non-english native (i.e. myself ;-) what "NOP" stands for?

"No operation," a do-nothing instruction that holds a place in program memory and takes a minimal amount of execution time.


Everone should remember: the HP-25 has such a key.



It did, and I love it for that. ;-)

Does anyone remember the old Burroughs mainframe computers? You had to execute the HALT assembly instruction three times in a row to actually stop the processor. HALT HALT HALT. I'm pretty sure it was the Burroughs, but now I'm starting to get fuzzy on the ancient details. Well, anyhow, we always used to joke that you had to do three NOP instructions in a row to do nothing. ;-)




I must digress here regarding the NOP key. My first HP calc was the HP-25C which I purchased through a mail-order house's magazine ad in the "Scientific American" in 1978. I waited in anticipation as I poured over the picture in the ad of the calc for all the various functions. I had a fairly good idea about all of them but what the heck was NOP!



Well, yes, I know: No OPeration.

But why was it deemed necessary to have a NOP on the HP-25? Did it serve as a placeholder for GTO destinations? (Was the program editor primitive enough that the NOP was especially useful?)

I don't remember a NOP on my HP-29C. (My 2nd H-P and overall favorite -- Geez I had fun with that thing!)


The NOP has to do with changing a line in a program without retyping the subsequent instructions. You can't insert a line in a HP-25 program, you can only write over.



Now I see what it was all about!

Thank you Trent for your spark of light :-)

Best regards.



Why is a NOP needed on the 35S? On the HP65 (any maybe 28, I don't know), after a conditional test it skipped 2 lines (because a GOTO required 2 lines), so I can see the need there. Why on the 35S (except for holding your place if you delete/insert lines that are the objects of GOTO's.


Why on the 35S (except for holding your place if you delete/insert lines that are the objects of GOTO's

That is the context in which the need for a NOP was brought up recently, and I was just proposing a non-destructive or passive option that I had not seen suggested. There may be other reasons of which I am unaware.


One use of NOP is as a placeholder for a "to be entered" routine, because the HP25 had absolute addressing (GTO stepnumber), no labels, and no automatic renumbering of steps via insertion/deletion. For instance, in the Newton´s Method program to solve for f(x)=0 (a very primitive solver program), there were some steps where f(x) was to be coded, the remaining steps (if any) were filled with NOPs. Also NOP may be a replacement for a debugging-time PAUSE: after testing your program, you replace the PAUSE with NOP to obtain faster execution, albeit without the intermediate results display. And NOP also may be used to "fine tune" the execution speed of a program. For instance, the program

01 NOP
02 NOP
03 NOP
04 NOP
05 NOP
06 +
07 GTO 01

ran after filling the stack with "1"s, worked as a timer on my HP25. Certainly not quartz-based, but the display showed the elapsed time (in seconds) between two R/S presses.

In more modern machines NOP was not needed, but sometimes you may want to use a ISG or DSE function to increment a register without testing and branching upon the result. Since NOP was no longer an option X<> ST X was a good substitute, as close to neutral as possible.

Edited: 28 Aug 2007, 10:15 p.m.


Now I recall, another poster used it for that purpose on the 35S (ISG 4, NOP) to increment a register. Of course, 1 STO+4 uses the same amount of storage, but does alter the stack.


On the 35s the '1 STO+' equence uses quite a bit more memory than 'ISG NOP'. Same number of steps though. Check the free memory from the MEM menu. Don't trust the LN= values for programs, they are bogus.

- Pauli


Thanks, Pauli. So, one program step uses a different number of bytes than another? I guess I'm used to the Voyagers where each step used the same number of bytes, AFAI remember.

Possibly Related Threads...
Thread Author Replies Views Last Post
  17BII & 17BII+ Discounted Payback Period Revisited Tom Neudorfl 8 1,841 11-25-2013, 10:28 AM
Last Post: Don Shepherd
  Touch periodic table on HP Prime - revisited Terje Vallestad 2 915 11-23-2013, 11:47 AM
Last Post: Mic
  A slide rule to conquer the moon revisited Palmer O. Hanson, Jr. 12 2,612 06-19-2013, 03:05 PM
Last Post: Ken Shaw
  HEPAX Revisited: Revision 1E available Ángel Martin 4 1,089 05-03-2013, 01:57 PM
Last Post: Diego Diaz
  Calculators on youtube revisited:OT again, but is this a TI-92 Les Koller 2 915 07-26-2012, 05:45 AM
Last Post: Les Koller
  Classic (HP-67) charger issues revisited Matt Agajanian 6 1,535 05-20-2012, 10:50 PM
Last Post: Matt Agajanian
  Woodstock/Spice Keyboard Cleaning Revisited Matt Agajanian 0 653 05-12-2012, 03:43 PM
Last Post: Matt Agajanian
  HP & TI in the 70's revisited Palmer O. Hanson, Jr. 1 814 05-12-2012, 02:17 PM
Last Post: John W Kercheval
  WP 34S: Power saving revisited Marcus von Cube, Germany 7 1,358 10-24-2011, 03:09 AM
Last Post: Marcus von Cube, Germany
  The solution to the quartic equation on the HP50g, revisited Crawl 0 507 10-12-2011, 07:33 PM
Last Post: Crawl

Forum Jump: