The Museum of HP Calculators

HP Forum Archive 17

[ Return to Index | Top of Index ]

NOP Revisited
Message #1 Posted by Jeff O. on 27 Aug 2007, 1:09 p.m.

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.)

      
Re: NOP Revisited
Message #2 Posted by Bruce Bergman on 27 Aug 2007, 1:15 p.m.,
in response to message #1 by Jeff O.

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. ;-)

thanks, bruce

            
Re: NOP Revisited
Message #3 Posted by Jeff O. on 27 Aug 2007, 10:10 p.m.,
in response to message #2 by Bruce Bergman

Quote:
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.
                  
Re: NOP Revisited
Message #4 Posted by Paul Brogger on 28 Aug 2007, 11:04 a.m.,
in response to message #3 by Jeff O.

Not I.

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

                        
Re: NOP Revisited
Message #5 Posted by Katie Wasserman on 28 Aug 2007, 7:48 p.m.,
in response to message #4 by Paul Brogger

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

                              
Re: NOP Revisited
Message #6 Posted by Jeff O. on 29 Aug 2007, 8:57 a.m.,
in response to message #5 by Katie Wasserman

"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.

      
Re: NOP Revisited
Message #7 Posted by Giancarlo (Italy) on 28 Aug 2007, 2:23 a.m.,
in response to message #1 by Jeff O.

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.
Giancarlo

            
Re: NOP Revisited
Message #8 Posted by Garth Wilson on 28 Aug 2007, 2:34 a.m.,
in response to message #7 by Giancarlo (Italy)

Quote:
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.
                  
Re: NOP Revisited
Message #9 Posted by Trent Moseley on 28 Aug 2007, 2:54 p.m.,
in response to message #8 by Garth Wilson

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

tm

                        
Re: NOP Revisited
Message #10 Posted by Bruce Bergman on 28 Aug 2007, 4:03 p.m.,
in response to message #9 by Trent Moseley

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. ;-)

thanks, bruce

                              
Re: NOP Revisited
Message #11 Posted by Trent Moseley on 28 Aug 2007, 10:52 p.m.,
in response to message #10 by Bruce Bergman

Bruce-

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!

tm

                        
Re: HP-25 NOP -- What purpose?
Message #12 Posted by Paul Brogger on 29 Aug 2007, 12:18 p.m.,
in response to message #9 by Trent Moseley

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!)

                              
Re: HP-25 NOP -- What purpose?
Message #13 Posted by Trent Moseley on 29 Aug 2007, 2:34 p.m.,
in response to message #12 by Paul Brogger

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.

tm

                                    
Re: HP-25 NOP -- What purpose?
Message #14 Posted by Giancarlo (Italy) on 30 Aug 2007, 2:36 a.m.,
in response to message #13 by Trent Moseley

Now I see what it was all about!
Thank you Trent for your spark of light :-)
Best regards.
Giancarlo

      
Re: NOP Revisited
Message #15 Posted by Don Shepherd on 28 Aug 2007, 4:31 p.m.,
in response to message #1 by Jeff O.

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.

            
Re: NOP Revisited
Message #16 Posted by Jeff O. on 28 Aug 2007, 6:34 p.m.,
in response to message #15 by Don Shepherd

Quote:
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.
                  
Re: NOP Revisited
Message #17 Posted by Andrés C. Rodríguez (Argentina) on 28 Aug 2007, 10:14 p.m.,
in response to message #16 by Jeff O.

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

00 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.

                        
Re: NOP Revisited
Message #18 Posted by Don Shepherd on 29 Aug 2007, 12:10 a.m.,
in response to message #17 by Andrés C. Rodríguez (Argentina)

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.

                              
Re: NOP Revisited
Message #19 Posted by Paul Dale on 29 Aug 2007, 4:27 p.m.,
in response to message #18 by Don Shepherd

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

                                    
Re: NOP Revisited
Message #20 Posted by Don Shepherd on 29 Aug 2007, 5:31 p.m.,
in response to message #19 by Paul Dale

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.


[ Return to Index | Top of Index ]

Go back to the main exhibit hall