Post #1540111
2026-04-22 14:05 UTC
@electron_greg @Robsonde @EdS
Can't access my own Apple //e and Apple //c machines yet, but https://apple2ts.com/ runs at 1 Mhz with the code in the alt-text (and reply) taking 38 seconds.
Replies (1)
-
@wiert@mastodon.social 2026-04-22 14:06
@electron_greg @Robsonde @EdS Modified code: ``` 10 N=20: L=INT(10*N/3): DIM A(255): Z$="000000":T$="999999" 20 FOR I=1 TO L: A(I)=2: NEXT I: M=0: P=0: FOR J=1 TO N: Q=0: K=2*L+1 30 FOR I=L TO 1 STEP -1: K=K-2: X=10*A(I)+Q*I: Q=INT(X/K): A(I)=X-Q*K: NEXT I 40 Y =INT(Q/10): A(1)=Q-10*Y: Q=Y: IF Q=9 THEN LET M=M+1: GOTO 70 50 IF Q=10 THEN PRINT STR$(P+1);LEFT$(Z$,M);: P=0: M=0: GOTO 70 60 PRINT STR$(P);: IF M>0 THEN PRINT LEFT$(T$,M); 65 P=Q: M=0 70 NEXT J:PRINT STR$(P) ```