Post Reply 
Printing to stack for free42/plus42
11-06-2023, 02:23 PM (This post was last modified: 11-06-2023 02:31 PM by Eddie W. Shore.)
Post: #2
RE: Printing to stack for free42/plus42
On the HP 42S family, the stack can only hold alpha strings up to six characters. ASTO stores the first six characters of the alpha string to the stack or a variable.

We could be looking at, something like:

Z: "60°/.="
T: 60% of the number
Y: "70°/.="
X: 70% of the number
(pause... do the next pair of calculations)

There is no % character in alpha, so I have to construct it in three characters.

- - - - -

Here is a program that uses the print-out feature which can print out multiple answers with labels. (but not to the stack itself)

QUANTITY?
180 ***
60°/.= 108.16218
70°/.= 126.16218
80°/.= 144.16218
90°/.= 162.16218


Code:
00 { 59-Byte Prgm }
01▸LBL "PER"
02 PRON              # turns the printer ON, PRINTER menu, 3rd row, labeled PON
03 60.09010        # I'm going from 60% to 90% in increments of 10%
04 STO 01
05 "QUANTITY?"
06 PRA                # PRA:  print the Alpha Stack
07 PROMPT
08 STO 02
09 PRX                   # PRX:  print the X stack
10▸LBL 01
11 CLA
12 RCL 01
13 IP
14 ARCL ST X
15 ├"°/.= "
16 RCL 02
17 RCL 01
18 %
19 ARCL ST X
20 AVIEW                    # when printer is on AVIEW prints to the print-out
21 PSE
22 ISG 01
23 GTO 01
24 .END.


Sample print out:

Code:
QUANTITY?
              180    ***
60°/.= 108.16218
70°/.= 126.16218
80°/.= 144.16218
90°/.= 162.16218

Hope this helps.
Visit this user's website Find all posts by this user
Quote this message in a reply
Post Reply 


Messages In This Thread
RE: Printing to stack for free42/plus42 - Eddie W. Shore - 11-06-2023 02:23 PM



User(s) browsing this thread: 4 Guest(s)