Post Reply 
Somebody having a clever substitute for the CLRGX command?
09-30-2024, 02:33 PM
Post: #7
RE: Somebody having a clever substitute for the CLRGX command?
I updated my program, putting non-synthetic alternatives in comments, but of course ΣREG? is also only in the CX, not in the X-Functions module. If you don't mind ΣREG to be affected, this is a non-synthetic version:

--
-- b0: contiguous block clear
-- 59-Byte Prgm including END
--
--              L       X       Y       Z       T
01 LBL"b0"              a,b
02 ENTER        -- size check
03 FRC
04  E3
05 *                    b       a,b
06 STO IND X
07 5            -- simple loop vs Σ-loop
08 -
09 X<Y?
10 GTO 00               b-5     a,b
11 RCL Y
12 INT
13 ,06
14 +                    a,6     b-5     a,b     a,b
15  E3
16 /
17 +                    b-5,a,6 a,b     a,b     a,b
18 ΣREG IND Y
19 CLΣ
20 LBL 05
21 ΣREG IND X
22 CLΣ
23 DSE X
24 GTO 05
25 RTN
26 LBL 00          -- 6 elements or less, simple loop
27 CLX
--
-- bI: intitialize counter in Y with value in X
--
28 LBL"bI"
29 LBL 06
30 STO IND Y
31 ISG Y
32 GTO 06
33 END


Cheers, Werner

41CV†,42S,48GX,49G,DM42,DM41X,17BII,15CE,DM15L,12C,16CE
Find all posts by this user
Quote this message in a reply
Post Reply 


Messages In This Thread
RE: Somebody having a clever substitute for the CLRGX command? - Werner - 09-30-2024 02:33 PM



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