The Museum of HP Calculators

HP Forum Archive 15

 Comparing X with Indirect YMessage #1 Posted by James F. Chumbley on 26 Oct 2005, 5:47 p.m. 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? Thanks, Jim Chumbley

 Re: Comparing X with Indirect YMessage #2 Posted by donald wallace on 26 Oct 2005, 6:06 p.m.,in response to message #1 by James F. Chumbley Hi, 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} DW

 Re: Comparing X with Indirect YMessage #3 Posted by James F. Chumbley on 26 Oct 2005, 6:51 p.m.,in response to message #2 by donald wallace Thanks, Don, I appreciate the explanation. Jim

 Re: Comparing X with Indirect YMessage #4 Posted by donald wallace on 27 Oct 2005, 1:37 a.m.,in response to message #3 by James F. Chumbley Hi Jim, No worries. Anytime. dw

 Re: Comparing X with Indirect YMessage #5 Posted by Geir Isene on 27 Oct 2005, 12:08 a.m.,in response to message #2 by donald wallace Interestingly pointless to put "X" or "Y" in the Y-register...

 Re: Comparing X with Indirect YMessage #6 Posted by donald wallace on 27 Oct 2005, 1:40 a.m.,in response to message #5 by Geir Isene 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...)

 Re: Comparing X with Indirect YMessage #7 Posted by Karl Schneider on 27 Oct 2005, 3:38 a.m.,in response to message #1 by James F. Chumbley Jim -- Your question revealed to me an error in the 41CX Vol. II manual, as well as several insights about the functionality: 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. Error: 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

 Re: Comparing X with Indirect YMessage #8 Posted by Doug Wilder on 28 Oct 2005, 3:17 a.m.,in response to message #7 by Karl Schneider Those missing relational functions can be had by use of another byte in program: for X>=0? one can use X<=0? X=0? doiftrueline and for X>=Y? X<=Y? X=Y? doiftrueline Best Edited: 28 Oct 2005, 3:36 a.m.

 Synthesizing X>=0? and X>=Y?Message #9 Posted by Karl Schneider on 29 Oct 2005, 2:18 a.m.,in response to message #8 by Doug Wilder Doug -- Quote: 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

 Re: Synthesizing X>=0? and X>=Y?Message #10 Posted by Doug Wilder on 31 Oct 2005, 1:48 a.m.,in response to message #9 by Karl Schneider 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). Best

Go back to the main exhibit hall