Comparing X with Indirect Y

In the HP-41CX Manual, Volume II, Page 305, under the topic "Comparisons," is given a list of six functions (X < NN?, X<=NN?, X=NN?, [X not= NN?], X>=NN?, X>NN?) which are said to compare the contents of the X register with the contents of the register whose name is contained in the Y register (Y Indirect).

The part I don't understand is this statement of HP's: Place the address from 00 through 319 OR THE SINGLE LETTER X, Y, Z, T, OR L in the Y register.

How do you put either an X, Y, Z, T or L into the Y register?

Jim Chumbley



You just put the letter in "alpha" register and execute an "ASTO Y".

e.g. using Z into Y using decimal point as a stack operator signifier:

[ALPHA]Z [ASTO][.]Y {command executes} [ALPHA] {leave ALPHA mode}



Thanks, Don,
I appreciate the explanation.


Interestingly pointless to put "X" or "Y" in the Y-register...


Hi Jim,

No worries. Anytime.



Hi Geir,

How are you doin'?

x<>x is one way to get a time burning "no-op". ;-)

(used in the "old days" to check machine speed or burn up some time in a loop which didn't mess with data...)


Jim --

Your question revealed to me an error in the 41CX Vol. II manual, as well as several insights about the functionality:


  • All HP-41 models lack the X>=0? and X>=Y? comparisons, for some strange reason. This deficiency was rectified in the HP-42S. (Even the HP-15C offered X>=Y? as TEST 9.)

  • The indirect comparisons you mention on p. 305 are specific to the HP-41CX, listed in the "-CX EXT FCN" catalog. They were not offered in the HP-41C or HP-41CV, and were not carried over to the HP-42S.


  • The five color-coded function names under "Comparing X with Y" on p. 304 of the Vol. II HP-41CX manual (Aug 1983 version) lists the nonexistent X>=Y? in place of the actually-present X/=Y?

-- KS


Those missing relational functions can be had by use of another byte in program:

for X>=0? one can use


and for X>=Y?



Edited: 28 Oct 2005, 3:36 a.m.


Doug --

for X>=0? one can use

X<=0? X=0? doiftrueline

and for X>=Y?

X<=Y? X=Y? doiftrueline

Yes -- this is an elegant solution. Maybe the designers of the HP-41 knew about it, and figured that it wasn't a big problem for users to program one additional instruction in order to effect a certain conditional test. However, I'm still a bit surprised that X>=0? and X>=Y? were omitted in the first place, even if lack of ROM space was an issue.

During the same era, the HP-10C and HP-12C had only two of the twelve possible conditional tests; the HP-34C, HP-11C, and HP-16C had eight; only the HP-15C had all twelve. With GOTO-dependent logic, it's a hassle to synthesize conditonal tests in this manner.

-- KS


Hi Karl,

I'm agreeing except i believe the problem was that the byte table was full!

There are five lines for single byte functions, 80 of them, and no extras. Probably this is because the 41 has an Alpha register and needs a few slots to support it (CLA,PROMPT,AVIEW,AON,AOFF,ASHF).

A couple of functions would have had to be left out, SDEV and MEAN possibly? I never use these yet the financial types around here would want E^X-1 and LN1+X left out i suppose.

There are a couple of spares (AF&B0) yet they are in the two byte area of the byte table (would make the mainframe flowchart look all weird).


Possibly Related Threads...
Thread Author Replies Views Last Post
  comparing numbers on the WP 34S Kiyoshi Akima 7 1,812 10-19-2013, 09:28 AM
Last Post: walter b
  WP34s indirect addressing of alphanumeric labels Eduardo Duenez 4 1,266 06-06-2013, 08:29 PM
Last Post: Eduardo Duenez
  Limits of Indirect Addressing on the WP34S Namir 11 2,369 08-01-2012, 11:53 PM
Last Post: Namir
  WP 34S - indirect addressing issue Gerson W. Barbosa 8 1,769 01-22-2012, 05:46 PM
Last Post: Gerson W. Barbosa
  Comparing HP and Dell Palmer O. Hanson, Jr. 5 1,209 03-16-2011, 10:47 AM
Last Post: bill platt
  Comparing Ti 89 Titanium vs. Ti 84+ SE vs. Hp 50g PhysicsNerd 16 2,744 01-05-2008, 10:37 AM
Last Post: EL
  clearing indirect memory in a program on 35s Don Shepherd 0 577 11-25-2007, 12:35 PM
Last Post: Don Shepherd
  35s indirect addressing Bill Colisch 11 1,963 10-31-2007, 04:32 PM
Last Post: srayb
  HP35s meaning of indirect address 0/hp32sii keyboard Peter Niessen 23 3,847 08-20-2007, 05:14 PM
Last Post: Peter Niessen
  35s - inputting to indirect registers srayb 6 1,452 08-18-2007, 06:22 AM
Last Post: Ralph

Forum Jump: