Here's his program, for a Sharp pocket computer:
Code: Select all
1: “A” CLEAR: INPUT N: L=INT(10*N/3): DIM A(255): Z$=”000000”,T$=”999999”: WAIT 0 2: 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 3: 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 4: Y =INT(Q/10), A(1)=Q-10*Y, Q=Y: IF Q=9 THEN LET M=M+1: GOTO 7 5: IF Q=10 THEN PRINT STR$(P+1);LEFT$(Z$,M);: P=0, M=0: GOTO 7 6: PRINT STR$ P;LEFT$(T$,M);: P=Q, M=0 7: NEXT J: PRINT STR$ P: BEEP 2
It's a spigot program, as previously seen used as a benchmark in these posts:
- A mathematical demo and the request for help from the hardware owners
have a master512? please run this for me!
have z80 second processor? please run this for me!
have ARM Evaluation System? please run this for me!
A request for rare 32016 based hardware
Have Acorn Archimedes? Please run it for me!