Post Reply 
Where is NOP on the HP-67 ?
01-06-2021, 09:34 PM
Post: #1
Where is NOP on the HP-67 ?
Hi everyone!
I know it’s written and documented in tons of posts so forgive me ...
I’m trying to port a listing from an HP-65 to an HP-67
So far so good until I crossed my path with a NOP ...
Where is it on an HP-67 ?
Thanks for help everyone!
Take care !

Edoardo & Alberto
Find all posts by this user
Quote this message in a reply
01-06-2021, 09:43 PM
Post: #2
RE: Where is NOP on the HP-67 ?
Hi!

There is no official NOP on the HP-67. The unofficial one can be found here: https://www.cuveesoft.ch/rpn67/p02.html

Saluti
Max
Find all posts by this user
Quote this message in a reply
01-06-2021, 10:09 PM
Post: #3
RE: Where is NOP on the HP-67 ?
Thanks Max
I have tried but on mine HP-67 I get a 2 24 code rather than 32 24
Is that ok ?
Thanks for help !!

Edoardo & Alberto
Find all posts by this user
Quote this message in a reply
01-06-2021, 10:20 PM
Post: #4
RE: Where is NOP on the HP-67 ?
(01-06-2021 09:34 PM)albertofenini Wrote:  Hi everyone!
I know it’s written and documented in tons of posts so forgive me ...
I’m trying to port a listing from an HP-65 to an HP-67
So far so good until I crossed my path with a NOP ...
Where is it on an HP-67 ?
Thanks for help everyone!
Take care !

The 67 does not have a NOP available, but one can be generated by [h][Space] which effectively does a No OPeration on the 67. On the 97, this would print a blank line.

cheers

Tony
Find all posts by this user
Quote this message in a reply
01-06-2021, 11:02 PM
Post: #5
RE: Where is NOP on the HP-67 ?
(01-06-2021 09:34 PM)albertofenini Wrote:  So far so good until I crossed my path with a NOP ...
Where is it on an HP-67 ?
Thanks for help everyone!
Take care !


Any unused LBL instruction will do without slowing down execution or any side effects or printing anything.

V.

  
All My Articles & other Materials here:  Valentin Albillo's HP Collection
 
Visit this user's website Find all posts by this user
Quote this message in a reply
01-07-2021, 02:44 AM (This post was last modified: 01-07-2021 02:48 AM by [kby].)
Post: #6
RE: Where is NOP on the HP-67 ?
I would ask why you want a NOP? The only reason the -65 has one is because the conditionals skip 2 steps, which in turn is because GOTO in particular is unmergef and takes two steps. Since all instructions on the -67/-97 are merged there is no “official” need for a NOP. Now there could be unofficial needs, such as timing loops and such, in which case, you should use the one that does what you want in terms of timing.

If the NOP was used in conjunction of a single-step or merged step as part of a conditional on the -65, then the code needs to be re-written to do it correctly.
Find all posts by this user
Quote this message in a reply
01-07-2021, 03:08 AM
Post: #7
RE: Where is NOP on the HP-67 ?
(01-07-2021 02:44 AM)[kby] Wrote:  I would ask why you want a NOP? The only reason the -65 has one is because the conditionals skip 2 steps, which in turn is because GOTO in particular is unmergef and takes two steps. Since all instructions on the -67/-97 are merged there is no “official” need for a NOP. Now there could be unofficial needs, such as timing loops and such, in which case, you should use the one that does what you want in terms of timing.

If the NOP was used in conjunction of a single-step or merged step as part of a conditional on the -65, then the code needs to be re-written to do it correctly.

Occasionally you might want a NOP after a DSZ where you're only decrementing and not interested in the comparison with zero. That's about all I can think of, though.
Visit this user's website Find all posts by this user
Quote this message in a reply
01-07-2021, 09:05 PM (This post was last modified: 01-07-2021 09:07 PM by albertofenini.)
Post: #8
RE: Where is NOP on the HP-67 ?
Don't get me wrong, I'm not that lazy, but I want to port this code :
Code:
1    LBL         23
2    A         11
3    STO 1     33 01
4    0         00
5    g x≠y?     35 21
6    RTN     24
7    g NOP     35 01
8    RCL 2     34 02
9    RCL 2     34 02
10    RCL 3     34 03
11    x         71
12    EEX         43
13    2         02
14    ÷         81
15    -        51
16    STO 1     33 01
17    RTN     24
18    LBL         23
19    B         12
20    STO 2     33 02
21    0         00
22    g x≠y?     35 21
23    RTN     24
24    g NOP     35 01
25    RCL 1     34 01
26    1         01
27    RCL 3     34 03
28    EEX         43
29    2         02
30    ÷         81
31    -        51
32    ÷         81
33    STO 2     33 02
34    RTN     24
35    LBL         23
36    C         13
37    STO 3     33 03
38    0         00
39    g x≠y?     35 21
40    RTN     24
41    g NOP     35 01
42    1         01
43    RCL 1     34 01
44    RCL 2     34 02
45    ÷         81
46    -        51
47    EEX         43
48    2         02
49    x         71
50    STO 3     33 03
51    RTN     24
52    LBL         23
53    E         15
54    DSP     21
55    .         83
56    2         02
57    CLx         44
58    STO 1     33 01
59    STO 2     33 02
60    STO 3     33 03
61    RTN     24

Which was kindly written from several members on my request as a margin calculator for an HP-65 to an HP-67

I'll try it out and see if it works, but thanks for all the suggestions

take care !

[EDIT] also I guess LBL A can be coded just pressing A right ?

Edoardo & Alberto
Find all posts by this user
Quote this message in a reply
01-07-2021, 09:08 PM
Post: #9
RE: Where is NOP on the HP-67 ?
(01-07-2021 09:05 PM)albertofenini Wrote:  Don't get me wrong, I'm not that lazy, but I want to port this code :
Code:
1    LBL         23
2    A         11
3    STO 1     33 01
4    0         00
5    g x≠y?     35 21
6    RTN     24
7    g NOP     35 01
8    RCL 2     34 02
9    RCL 2     34 02
10    RCL 3     34 03
11    x         71
12    EEX         43
13    2         02
14    ÷         81
15    -        51
16    STO 1     33 01
17    RTN     24
18    LBL         23
19    B         12
20    STO 2     33 02
21    0         00
22    g x≠y?     35 21
23    RTN     24
24    g NOP     35 01
25    RCL 1     34 01
26    1         01
27    RCL 3     34 03
28    EEX         43
29    2         02
30    ÷         81
31    -        51
32    ÷         81
33    STO 2     33 02
34    RTN     24
35    LBL         23
36    C         13
37    STO 3     33 03
38    0         00
39    g x≠y?     35 21
40    RTN     24
41    g NOP     35 01
42    1         01
43    RCL 1     34 01
44    RCL 2     34 02
45    ÷         81
46    -        51
47    EEX         43
48    2         02
49    x         71
50    STO 3     33 03
51    RTN     24
52    LBL         23
53    E         15
54    DSP     21
55    .         83
56    2         02
57    CLx         44
58    STO 1     33 01
59    STO 2     33 02
60    STO 3     33 03
61    RTN     24

Which was kindly written from several members on my request as a margin calculator for an HP-65 to an HP-67

I'll try it out and see if it works, but thanks for all the suggestions

take care !

[EDIT] also I guess LBL A can be coded just pressing A right ?

This one looks easy, any time a 65 program has a test function followed by one instruction and one NOP, you can just ignore the NOP when converting to a different model.
Visit this user's website Find all posts by this user
Quote this message in a reply
01-07-2021, 09:13 PM
Post: #10
RE: Where is NOP on the HP-67 ?
.
Looking at your code, in all three cases where the NOP appears it does it after a test which executes a RTN if true, so the NOP is never executed and you can safely replace it with another RTN, like this:

g X#Y?
RTN
RTN

V.

  
All My Articles & other Materials here:  Valentin Albillo's HP Collection
 
Visit this user's website Find all posts by this user
Quote this message in a reply
01-07-2021, 09:17 PM
Post: #11
RE: Where is NOP on the HP-67 ?
(01-07-2021 09:13 PM)Valentin Albillo Wrote:  .
Looking at your code, in all three cases where the NOP appears it does it after a test which executes a RTN if true, so the NOP is never executed and you can safely replace it with another RTN, like this:

g X#Y?
RTN
RTN

V.

Thanks, I'm trying but it doesn't run, it shows error at any label key pressed
How do you code LBL A in an HP 67 ? f LBL A ? or just pressing A ?

Edoardo & Alberto
Find all posts by this user
Quote this message in a reply
01-07-2021, 09:24 PM
Post: #12
RE: Where is NOP on the HP-67 ?
Couple of things happening here :
first ... I have just discovered that the yellow functions, like LBL, are below the keys and not in the upper line ..... sorry for that
second ... I'm using the unit we are trying to restore described in a different post, and I have just discovered that the 10th digit of the mantissa doesn't turn on at all ...
What could it be ?
Thanks for help Smile

Edoardo & Alberto
Find all posts by this user
Quote this message in a reply
01-07-2021, 09:30 PM
Post: #13
RE: Where is NOP on the HP-67 ?
(01-07-2021 09:17 PM)albertofenini Wrote:  
(01-07-2021 09:13 PM)Valentin Albillo Wrote:  .
Looking at your code, in all three cases where the NOP appears it does it after a test which executes a RTN if true, so the NOP is never executed and you can safely replace it with another RTN, like this:

g X#Y?
RTN
RTN

V.

Thanks, I'm trying but it doesn't run, it shows error at any label key pressed
How do you code LBL A in an HP 67 ? f LBL A ? or just pressing A ?


In an HP-67 it's indeed f LBL A, but I think that just A in the HP-65 might mean the equivalent of the HP-67's instruction GSB A, not LBL A.

I don't own an HP-65 but I understood that a test would either execute or skip two steps so the above sequence would mean that either both RTN are skipped or the first one is executed, so the second one never is.

As you get an error, I'll step aside and let HP-65 owners take over.

Regards.
V.

  
All My Articles & other Materials here:  Valentin Albillo's HP Collection
 
Visit this user's website Find all posts by this user
Quote this message in a reply
01-07-2021, 09:31 PM
Post: #14
RE: Where is NOP on the HP-67 ?
(01-07-2021 09:13 PM)Valentin Albillo Wrote:  .
Looking at your code, in all three cases where the NOP appears it does it after a test which executes a RTN if true, so the NOP is never executed and you can safely replace it with another RTN, like this:

g X#Y?
RTN
RTN

V.

Not if you're converting 65 code to 67. The 65 will skip two instructions if the test is false. So the NOP is never executed, either because the test was true and RTN was executed, or because the test was false, and the NOP was skipped (along with the RTN). So just leave out the NOP.
Visit this user's website Find all posts by this user
Quote this message in a reply
01-07-2021, 09:49 PM
Post: #15
RE: Where is NOP on the HP-67 ?
Thank you guys !!! It works !!!
Thanks everyone!!!

Still I have to figure out why the 10th digit is off ...

Edoardo & Alberto
Find all posts by this user
Quote this message in a reply
01-07-2021, 10:36 PM
Post: #16
RE: Where is NOP on the HP-67 ?
(01-07-2021 09:30 PM)Valentin Albillo Wrote:  In an HP-67 it's indeed f LBL A, but I think that just A in the HP-65 might mean the equivalent of the HP-67's instruction GSB A, not LBL A.

As you get an error, I'll step aside and let HP-65 owners take over.

Regards.
V.

Gene: You are quite right, Valentin! An "A" in an HP-65 program is equivalent to GSB A or XEQ A.

Wanted to state this for the record even though the program now works.
Find all posts by this user
Quote this message in a reply
01-07-2021, 11:20 PM
Post: #17
RE: Where is NOP on the HP-67 ?
(01-07-2021 10:36 PM)Gene Wrote:  Gene: You are quite right, Valentin! An "A" in an HP-65 program is equivalent to GSB A or XEQ A.

Wanted to state this for the record even though the program now works.

And sometimes it's equivalent to GTO A, if the lone A is encountered while already inside a 2nd-level subroutine. And if LBL A doesn't exist anywhere in the program, it has some other rather unique - and useful - behavior that surprisingly isn't a label-not-found error. Wink

The 65 is a rather odd beast in quite a few ways. For additional fun, take a look at the HP 65 hyperbolic functions program in 65 Notes/PPC Journal (don't have the issue number in front of me - I'll dig it up if nobody else finds it). See if you can figure out how the calls to LBL C work, and why the program contains these three steps which DON'T result in an infinite loop/stack overflow:

LBL
C
C

It's sometimes rather tricky to convert 65 programs to newer machines because of all these really interesting quirks that were exploited to their fullest.

Another interesting trick:

g
DSZ
NOP
GTO
A
Visit this user's website Find all posts by this user
Quote this message in a reply
01-07-2021, 11:23 PM
Post: #18
RE: Where is NOP on the HP-67 ?
(01-07-2021 10:36 PM)Gene Wrote:  Gene: You are quite right, Valentin! An "A" in an HP-65 program is equivalent to GSB A or XEQ A.

Wanted to state this for the record even though the program now works.


Thanks, Gene, you're alway so kind to me. BTW, I just posted my solutions to my recent SRC #008, to which you contributed with several posts so perhaps you'll like to have a look at the "official" solutions and comments. Smile

Best regards.
V.

  
All My Articles & other Materials here:  Valentin Albillo's HP Collection
 
Visit this user's website Find all posts by this user
Quote this message in a reply
01-07-2021, 11:36 PM
Post: #19
RE: Where is NOP on the HP-67 ?
(01-07-2021 09:49 PM)albertofenini Wrote:  Thank you guys !!! It works !!!
Thanks everyone!!!

Still I have to figure out why the 10th digit is off ...

I assume 10th mantissa digit...

Failed connection inside LED package #3
Open circuit pin 1 of LED package #3
Open circuit pin 3 of cathode driver
Open circuit on PCB track between pin 1 and pin 3 mentioned above
Failed cathode driver

Knowing me, probably none of the above ;-)

cheers

Tony
Find all posts by this user
Quote this message in a reply
01-09-2021, 06:40 AM (This post was last modified: 01-09-2021 09:16 PM by [kby].)
Post: #20
RE: Where is NOP on the HP-67 ?
(01-07-2021 11:20 PM)Dave Britten Wrote:  The 65 is a rather odd beast in quite a few ways. For additional fun, take a look at the HP 65 hyperbolic functions program in 65 Notes/PPC Journal (don't have the issue number in front of me - I'll dig it up if nobody else finds it). See if you can figure out how the calls to LBL C work, and why the program contains these three steps which DON'T result in an infinite loop/stack overflow:

This is what makes us -65 aficionados not as interested in then-67/97. The -65 is so interesting. Now add that second top-of-memory marker to your program…and the pseudo-merge capabilities…and…-kby
Find all posts by this user
Quote this message in a reply
Post Reply 




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