Post Reply 
Advanced String Programs (41CX, DM41X, Extended Module Needed)
08-08-2021, 08:30 PM
Post: #3
RE: Advanced String Programs (41CX, DM41X, Extended Module Needed)
Thank you, Albert. I am going to use the formula:

randint = int((b - a + 1) * r) + a

This saves three program steps from ACODE and ASAMP.

Updated ACODE:
Code:
01 LBL^T ACODE
02 CLA
03 STO 01
04 DATE
05 TIME
06 +
07 2
08 /
09 FRC
10 STO 02
11 LBL 00
12 RCL 02
13 XEQ 01
14 XEQ 02
15 XTOA
16 DSE 01
17 GTO 00
18 AVIEW
19 RTN
20 LBL 01
21 RCL 02
22 243 E3
23 *
24 LASTX
25 X<>Y
26 INT
27 4561
28 *
29 51349
30 +
31 X<>Y
32 MOD
33 LASTX
34 /
35 STO 02
36 RTN
37 LBL 02
38 26
39 *
40 INT
41 65
42 +
43 RTN
44   END

Updated ASAMP:
Code:
01 LBL^T ASAMP
02 CLA
03 STO 01
04 9
05 X<Y?
06 GTO 03
07 DATE
08 TIME
09 *
10 FRC
11 STO 02
12 LBL 00
13 XEQ 01
14 STO 03
15 POSA
16 -1
17 X=Y?
18 GTO 02
19 GTO 00
20 LBL 02
21 RCL 03
22 XTOA 
23 DSE 01
24 GTO 00
25 AVIEW
26 RTN
27 LBL 01
28 RCL 02
29 243 E3
30 *
31 LASTX
32 X<>Y
33 INT
34 4561
35 *
36 51349
37 +
38 X<>Y
39 MOD
40 LASTX
41 / 
42 STO 02
43 10
44 *
45 INT
46 48
47 +
48 RTN
49 LBL 03
50 0
51 1/X
52 RTN
53 END

Updated download (first link does not work):
https://drive.google.com/file/d/1UD8CAIL...sp=sharing
Visit this user's website Find all posts by this user
Quote this message in a reply
Post Reply 


Messages In This Thread
RE: Advanced String Programs (41CX, DM41X, Extended Module Needed) - Eddie W. Shore - 08-08-2021 08:30 PM



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