Post Reply 
Indirect Storage (STO IND) ELI5 what and why?
03-27-2021, 01:56 AM (This post was last modified: 03-27-2021 10:37 PM by DM48.)
Post: #9
RE: Indirect Storage (STO IND) ELI5 what and why?
RCL 01
"Exit"

I cleared R01. Seems to work as desired. :facepalm:

I am trying to write a program that ask how many points you have (x,y) and then runs a loop so you can enter each point, and after the loop is complete, runs some calculations with the points. I plan on storing the y and x registers as complex numbers so I can pull them out for calcs easy. (After I have this program running, I will try the same using a [X x 2] matrix for storing the numbers and recalling them from the matrix.

I am trying to make it user friendly for myself. This is what I have so far. I believe Indirect Addressing is what I need to store point one in R01, point two in R02, etc.

Code:
00 { 150-Byte Prgm}
01 LBL "Area"
02 CLMENU
03 "#PTS"
04 KEY 1 GTO 05
05 "Go!"
06 KEY 2 GTO 15
07 "Exit"
08 KEY 6 GTO 99
09 MENU
10 STOP
11 CLMENU

12 LBL 05 #Stores the number of points to be entered
13 STO "A" #Number of points
14 CLA
15 "# Points = "
16 ARCL ST X
17 AVIEW
18 CLX
19 GTO "Area"

20 LBL 15
21 1
22 RCL "A" #Number of points
23 1000 #Create fff from number of points to be entered
24 รท
25 +
26 STO "COUNTER" #Loop count variable
27 1
28 STO "R"
29 CLX

30 LBL 20
31 VIEW "COUNTER"
32 PSE
33 "Point"
34 PROMPT #R/S to continue without a second ENTER
35 X<>Y
36 STO IND "R" #Store complex number into R01, R02, increases every loop
37 1
38 STO+ "R"
39 CLX
40 ISG "COUNTER"
41 GTO 20
42 CLA
43 "Done"
44 AVIEW

45 LBL 99
46 EXITALL
47 END

HP48GX, HP42s and DM42.
Find all posts by this user
Quote this message in a reply
Post Reply 


Messages In This Thread
RE: Indirect Storage (STO IND) ELI5 what and why? - DM48 - 03-27-2021 01:56 AM



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