HP 42S Programming



#5

I have put a simple little programme into my 42S

I want the result to be displayed as

New$KG= (the calculated value) All on the x line. It will not do that (my HP 41 does)

Relevant last lines are
13 x (This is the final multiplication to give the result I want)
14 CLA (If I don't do this every time I run the programme the statement in line 15 is added to each other multiple times.
15 (append sign like a plus with the left horizontal arm missing) "NEW$KG="
16 AVIEW
17 END.


#6

Hi, Howard;

in order to show the message you want, you should append the number you want to current ALPHA contents. If the number you want to add, referred to as (the calculated value), is in the X-register, you should use:

15 "NEW$KG="
16 ARCL X (appends X-register contents to ALPHA)
17 AVIEW
18 END
Please, let us know if it works.

You can eliminate the line #14 (CLA) if you do not append line 15 (text itself). If you simply key in a text instead of appending it (the addition sign without the left arm, as you described), the new text erases all previous ALPHA contents.

Cheers.

Luiz (Brazil)


Edited: 7 Oct 2009, 10:52 p.m.


#7

Luiz,
That worked fine except that the "New$kg=(value) is on the y line and the (value) is on x line ie x:(value).
Thank you, It is not perfect but a lot better than I could manage by myself.
Howard.


#8

Hi, Howard;

please, make sure you did not add a 'new line' character after the "New$kg=", because it would cause the ALPHA cursor to 'jump' to the next line. I tested the lines I posted previously with my HP42S and the complete ALPHA contents used only the first, top line of the display (commonly filled with the Y-register contents, as you mentioned). I filled the X-register with as many digits as possible.

You mentioned you could do that with the HP41, right? The HP42S is not much different, though. The ALPHA register holds more digits and the LCD allows more digits to be shown in one single line, but these are advantages. Also, the ARCL X should read ARCL ST X (Stack register X) in the HP42S to avoid confusion with a possible ARCL "X" (variable named "X"), instead. So, the lines would read:

14 CLA
15 "NEW$KG="
16 ARCL ST X
17 AVIEW
Please, make sure there is no NL in the end of the ALPHA string in line #15 ("NEW$KG=NL")

Success!

Luiz (Brazil)


Possibly Related Threads...
Thread Author Replies Views Last Post
  HP 42s programming help for novice Carl D (new) 4 642 02-02-2013, 11:39 PM
Last Post: Mike Morrow
  Re: RPN Programming exercise (HP-42S) Gerson W. Barbosa 1 421 02-27-2012, 05:51 PM
Last Post: Marcus von Cube, Germany
  RPN Programming exercise (HP-42S) Gerson W. Barbosa 71 4,526 02-26-2012, 11:48 AM
Last Post: Valentin Albillo
  42s questions and 42s vs 35s snaggs 13 2,081 09-19-2011, 02:44 AM
Last Post: snaggs
  Programming HP-42S Howard Jones 2 453 10-17-2009, 06:47 PM
Last Post: Howard Jones
  Book for learning 41/42s programming? Keith Beyer 8 903 11-14-2008, 09:12 AM
Last Post: Nigel J Dowrick
  HP-42S, 41CX and synthetic programming thoughts Vincent Weber 0 347 06-25-2008, 09:13 AM
Last Post: Vincent Weber
  Re: 42S programming ECL 5 625 02-24-2007, 01:09 AM
Last Post: ECL
  42s programming tech alum 2 476 02-21-2007, 12:40 AM
Last Post: Karl Schneider
  HP 42S manual + programming guide Rob S, 13 1,200 08-18-2006, 03:44 PM
Last Post: Vieira, L. C. (Brazil)

Forum Jump: