▼
Posts: 875
Threads: 37
Joined: Jul 2005
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.)
▼
Posts: 553
Threads: 57
Joined: Sep 2006
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
▼
Posts: 875
Threads: 37
Joined: Jul 2005
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.
▼
Posts: 1,153
Threads: 94
Joined: Mar 2006
Not I.
It's a fine choice, though. For my use, it's the instruction least likely to alter the state of the machine.
▼
Posts: 1,477
Threads: 71
Joined: Jan 2005
I previously suggested "RADIX." or "RADIX," as the perfect NOP. This should work well for all but the most internationally traveled among us :)
▼
Posts: 875
Threads: 37
Joined: Jul 2005
"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.
Posts: 223
Threads: 19
Joined: Jun 2005
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
▼
Posts: 887
Threads: 9
Joined: Jul 2007
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.
▼
Posts: 406
Threads: 47
Joined: Jul 2005
Everone should remember: the HP-25 has such a key.
tm
▼
Posts: 553
Threads: 57
Joined: Sep 2006
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
▼
Posts: 406
Threads: 47
Joined: Jul 2005
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
Posts: 1,153
Threads: 94
Joined: Mar 2006
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!)
▼
Posts: 406
Threads: 47
Joined: Jul 2005
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
▼
Posts: 223
Threads: 19
Joined: Jun 2005
Now I see what it was all about!
Thank you Trent for your spark of light :-)
Best regards.
Giancarlo
Posts: 1,392
Threads: 142
Joined: Jun 2007
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.
▼
Posts: 875
Threads: 37
Joined: Jul 2005
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.
▼
Posts: 1,193
Threads: 43
Joined: Jul 2005
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.
▼
Posts: 1,392
Threads: 142
Joined: Jun 2007
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.
▼
Posts: 3,229
Threads: 42
Joined: Jul 2006
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
▼
Posts: 1,392
Threads: 142
Joined: Jun 2007
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.
|