REM Statements on the 33S & 35S

Hello all.

It's a very nice HP-41 carryover that you can use Flag 10 and EQN to prompt for input on the 32S-II, 33S and 35S. And, I remember seeing something in the 35S Bug List posted here that using EQN as prompts must be followed with some other commands/functions to avoid an error. If I wanted to notate my programs similar to REM statements in BASIC, what coding structure should I follow for the 32SII, 33S and 35S?


Edited: 18 Apr 2012, 1:11 a.m.


On the 35S, you could do something like this:

A027 GTO A029
A029 ...

Thanks. Although, I seem to remember that in the HP-35s Bug List that talks about using EQN statements outside of creating mathematical expressions cause the 35S to freeze or crash because EQN will register straight text as a syntax problem. Also, I'm not certain but the bug list also talks about EQN as a prompt without a Pause or R/S will cause the 35S to lock up as well. So, is there some step I need to precede this EQN statement with so that what's in the EQN statement isn't treated as a mathematical equation/expression?

Edited: 18 Apr 2012, 12:52 p.m.



This thread discusses the problem with using equations as messages or prompts with the 35s.


Hi Jeff and the rest of the group. Please forgive my asking. Although yes, that post you referred to does explain the issue very well. Because there is so much being said there, I am very overwhelmed at the back and forth information. And, I am very confused as to what to do with flag 10 and when it should be set/cleared. I am also overwhelmed about what to do with the Pause and R/S instructions and where the EQN statement is supposed to occur. All I want to do us use EQN as a REM statement in BASIC. Yes, I understood the discussion but I am very overwhelmed so please, just, in one simple example, how can I use EQN and the CF 10/SF 10 commands, not as a prompt but as a REM statement similar to how REM is used in BASIC?

Edited: 18 Apr 2012, 10:58 p.m.



The combination of Flag 10 and EQN is for diplaying messages to the user during execution. REM statements are not usually displayed during execution (just reminders for the coders when looking at code).

If you wish to enter a text in a program and display it on the screen when the program runs.

To display "MESSAGE", enter the following program:

M001 LBL M
M002 SF 10
M004 PSE
M005 CF 10
M006 RTN

the following keystrokes: (RS = Right Shift (blue), LS = Left Shift (orange))
RS PRGM enter program mode
RS LBL M label program M
LS FLAGS 1 .0 set flag 10
EQN RCL M puts letter M
RCL E puts letter E
RCL S puts letter S
RCL S puts letter S
RCL A puts letter A
RCL G puts letter G
RCL E puts letter E
ENTER finishes line M003
RS PSE pause while calculator displays message
LS FLAGS 2 .0 clears flag 10
LS RTN Returns to start
RS PRGM exits program mode
XEQ M ENTER displays "MESSAGE" for 2-3 seconds

Actually it is an equation that is being entered. The calculator knows to display it instead of evaluating it by setting flag 10, i.e setting Flag 10 tells the calculator that you wish to display text and not evaluate an equation.

To insert text as a traditional REMinder only, do the same as above but do not set Flag 10 (i.e. do not enter lines M002, M004 & M005) and skip over the line as Dave Britten suggested.

Hope this helps,

Edited: 19 Apr 2012, 4:52 a.m.


AH! I see! Thanks for the clarification. Thanks also for the heads up on Dave's comment.

Edited: 19 Apr 2012, 11:29 a.m.


I'll be honest with you. With all the focus on how the EQN function has irregular behaviour, I was severely under the impression that Flag 10 and EQN were joined at the hip. Plus, to structure straight text in an EQN statement and Flag 10's ability to control how the EQN statement operates, I felt as if EQN had to be executed. I also felt that EQN with text in, of and by itself was enough to cause program crashes. It never ocured to me to branch around the EQN step to avoid the !Main! point of EQN actually executing which causes the whole program hanging anomaly.

Edited: 19 Apr 2012, 8:55 p.m.


Just to recap from the thread referenced by Jeff.

  • Displaying a message can cause the program to become un-interruptible, this does not mean it will always hang - it means:
    • if the program terminates normally, it will do so and all will be well - you just can't stop it until it does
    • if you get it into an infinite loop (as most examples in the referenced thread) then it will become infinitely un-interruptible, i.e. hang
  • there is one known way to prevent this and that is to add a PSE after the equation and before the CF 10 (line M004 in my example below)
    • This does mean the message is displayed briefly and not until the user decides to continue by pressing R/S
  • however, I always add this as I may make a mistake and cause an infinite loop and the consequence of an infinitely un-interruptible state will cause MEMORY CLEAR

Hope this clarifies it a bit,

Hi Bart,

Thanks for the clarification. If I recall correctly, if you want the program to actually stop for input, the safe way is to add a STOP after the equation, right? Then you must press R/S stop twice to get going again.



Hi Jeff,

Yes, you are right. That effectively terminates the execution of the program (the second R/S starting again at the next line). STOP can be added either after the equation or after the CF 10.

Possibly Related Threads…
Thread Author Replies Views Last Post
  33s, 35s & 42s--The Timex(R) Factor Matt Agajanian 7 1,963 09-13-2013, 12:28 AM
Last Post: Matt Agajanian
  Maximum number of program steps in HP-42S, 33S, and 35S? Walter B 3 1,456 12-18-2012, 03:44 PM
Last Post: Eric Smith
  Running 33S and 35S emulators in Win 8 Ed Look 12 3,099 12-07-2012, 03:24 PM
Last Post: Ed Look
  HP-32S/33S/35S emulator with Stack Overflow sensing/Stack display x34 3 1,412 10-26-2012, 04:56 PM
Last Post: x34
  Romberg Integration for 33s, 35s Matt Agajanian 9 2,296 03-26-2012, 10:00 AM
Last Post: Nick_S
  Bad News for 33S: a bug shared with 35s bill platt 20 4,906 03-25-2012, 03:57 AM
Last Post: Paul Dale
  Complex results acceptance 32sII/33s/35s Matt Agajanian 9 2,304 03-24-2012, 09:30 AM
Last Post: Dieter
  33s/35s Checksums paradigm Matt Agajanian 25 5,686 03-03-2012, 08:55 PM
Last Post: Matt Agajanian
  Program Coding Sheets for 33s/35s Matt Agajanian 6 1,960 03-03-2012, 04:03 PM
Last Post: David Hayden
  33s, 35s Clear All--How safe is it? Matt Agajanian 2 1,158 03-02-2012, 11:52 PM
Last Post: Matt Agajanian

Forum Jump: