need help with FCAT program for HP 42S
|
05-21-2024, 06:11 AM
Post: #1
|
|||
|
|||
need help with FCAT program for HP 42S
In the HP-42S RPN Scientific Programming Examples and Techniques manual, Edition 1 July 1988, page 54, program FCAT line :
50 LBL 14 what is the purpose of this line? I spent 4 hours keying in this program - GTO A is hardly intuitive. My first and previous calculator was the 32S and the 42S (actually Free42) is several levels more complex. So I am relearning with a view to writing a superior circle-triangle-circle program with all the bells and whistles. FCAT seemed a good program to learn from but this step has me stumped. Was there an erratum about this? Thanks. |
|||
05-21-2024, 04:21 PM
Post: #2
|
|||
|
|||
RE: need help with FCAT program for HP 42S
After a cursory glance at page 54 of ‘Programming Examples and Techniques’, it can be assumed that in the case of this programme (and only for this programme) it will be a kind of placeholder for ‘Do nothing’.
|
|||
05-21-2024, 05:56 PM
Post: #3
|
|||
|
|||
RE: need help with FCAT program for HP 42S
For those who want to try the program:
Code: 00 { 234-Byte Prgm } |
|||
05-22-2024, 01:26 AM
Post: #4
|
|||
|
|||
RE: need help with FCAT program for HP 42S
Appears to be a NO-OP.
Curiously, there is also a >LBL 14 at line 53 of FL (see p. 168) of the PPC ROM manual. 17bii | 32s | 32sii | 41c | 41cv | 41cx | 42s | 48g | 48g+ | 48gx | 50g | 30b |
|||
05-22-2024, 07:17 AM
(This post was last modified: 05-23-2024 12:55 AM by Thomas Klemm.)
Post: #5
|
|||
|
|||
RE: need help with FCAT program for HP 42S
If you wonder why LBL 14 is used and not LBL 99 to indicate a NO-OP: it is the highest one-byte label.
From LBL 15 on they consume two bytes. And then they give the precious byte away with a useless use of a RTN statement: Code: 89 RTN |
|||
05-23-2024, 12:17 AM
Post: #6
|
|||
|
|||
RE: need help with FCAT program for HP 42S
(05-22-2024 07:17 AM)Thomas Klemm Wrote: If you wonder why LBL 14 is used and not LBL 99 to indicate a NO-OP: it is highest one-byte label. Although END returns from a subroutine the same way as RTN, RTN is a tad faster, which is especially noticeable when the subroutine is called many times in a loop. So RTN END is not a useless waste of one byte, but rather slightly improves execution time. <0|ɸ|0> -Joe- |
|||
05-23-2024, 12:51 AM
Post: #7
|
|||
|
|||
RE: need help with FCAT program for HP 42S | |||
05-23-2024, 02:55 AM
Post: #8
|
|||
|
|||
RE: need help with FCAT program for HP 42S
(05-23-2024 12:51 AM)Thomas Klemm Wrote:(05-23-2024 12:17 AM)Joe Horn Wrote: So RTN END is not a useless waste of one byte, but rather slightly improves execution time. This made me laugh out loud. ![]() I'm only glad my wife didn't hear, can you imagine trying to explain why this is funny to a non-calculator nerd... --Bob Prosperi |
|||
05-23-2024, 04:35 AM
Post: #9
|
|||
|
|||
RE: need help with FCAT program for HP 42S
Thanks for the answers.
Pg 131 of the owner's manual states: "Without the PSE instructions (lines 03 and 06) the program would run too fast to see the first two messages. A PSE is not needed after the last AVIEW because the viewed information remains in the display after the program stops. " So in the case of FCAT, the PSE is unnecessary. According to my deconstruction of FCAT, LBL 12 is a subroutine so it may be entered elsewhere thus RTN is required there. Regardless, I have enough OCD to require that. Wow, we now have a working FCAT that is 231 bytes in size. I wonder how the exalted HP engineers/editor missed these? Or is this a test ? Should I expect an invite into a secret society? |
|||
05-23-2024, 06:56 AM
Post: #10
|
|||
|
|||
RE: need help with FCAT program for HP 42S
Erratum:
88 PSE turns out to be necessary. If you attempted to set/clear a system flag, the 87 AVIEW would be rapidly replaced by 20 "FLAG CATALOG" I saved one byte. I don't think there is anything else to add to this thread. PS I worked for IBM, 30 years. |
|||
05-28-2024, 06:04 AM
(This post was last modified: 05-28-2024 06:06 AM by ELye.)
Post: #11
|
|||
|
|||
RE: need help with FCAT program for HP 42S
(05-22-2024 01:26 AM)Allen Wrote: Appears to be a NO-OP. You are absolutely right. See attached jpg. |
|||
« Next Oldest | Next Newest »
|
User(s) browsing this thread: 1 Guest(s)