���d X; SUPER SIEVE!n X; BY DENNIS DEVRIESx X; (c)1988, ANTIC PUBLISHING� 9� EH� �LOK�;;LOBYTE K 203� �MIK�;;MDBYTE K 204� �LOQ�;;LOBYTE PRIME 205� �MIQ�;;MDBYTE PRIME 206� �HIQ�;;HIBYTE PRIME 207� �LON ;;LOBYTE TEST 1536� �MIN;;MDBYTE TEST 1537� �HIN;;HIBYTE TEST 1538� �LOR;;LOBYTE R 1539� �MIR;;MDBYTE R 1540� �HIR;;HIBYTE R 1541�LOC;;LOBYTE COUNT 1542�MIC;;MDBYTE COUNT 1543�HIC;;HIBYTE COUNT 1544"�F 6;;SIEVE 13824,�KKL 7;;KK LOBYTE 140806�KKM�7;;KK MDBYTE 14208@�PPL 8;;PP LOBYTE 14336J�PPM�8;;PP MDBYTE 14464T7;;START @ 14592^-;;CLEAR DECIMALhQ> r?|�LP7�P�KKL8;;CLEAR KK TABLE�1�H�LP7�X;��LP8�P�PPL8;;CLEAR PP TABLE�1�H�LP8�X;��LP6�P�LON8;;CLEAR PAGE 6�1�H�LP6X;P�MIQ;;CLEAR QP�HIQ&Q>;;SET F TO 1'S0�LPF:P�F8D1NH�LPFXX;b7;;GET HIBYTE HIBYTEl7;;GET HIBYTE LOBYTEvP�HIN�7;;GET MDBYTE�P�MIN�7;;GET LOBYTE�P�LON�Q>;;FIRST PRIME� P�LOQ;;Q=2� P�LOC;;C=2�%>��LP1�Q�F8;;DOES F(Y)=1?�R>;;IF SO, HAVE PRIME�F�WY1�X;!�STEP;;CONTINUE SEARCHX;�WY1 C;;MAKE Q=Y+Y+1*,4T?;;A=Y+Y>P�LOQ;;Q=Y+YH#�LOQ;;Q=Y+Y+1RD�CHK;;IF Q<257\X;fQ>pP�MIQ;;Q>255z)> �H�CHK�X;�:��CHK�Q�LOC;;TEST LOBYTE�R�LON�Q�MIC;;TEST MDBYTE�S�MIN�Q�HIC;;TEST HIBYTE�S�HIN�D�NEXT;;Q<N�X;�:;;Q=>N, DONE!�NEXTQ�MIQR>;;BYTE SET?$F�CPLUS;;IF Q>512.X;8C;;MAKE K=Y+QB,LO�LOQVP�LOK;;K=Y+Q, LOBYTE`Q�MIQjO> ;;GET CARRYtP�MIK;;K=Y+Q, MDBYTE~H�PEEP;;IF K>255�X;��EF�Q> �$�LOK�P�F9;;F(K)=0�Q�LOQ�,�O�LOK�P�LOK;;K=K+Q, LOBYTE�D�EF;;ELSE ADD CARRY�X;�Q�MIQ O�MIK P�MIK E�STEPX;(�PEEP2Q�LOQ<$�LOCFP�PPL9;;PP(C)=Q, LOBYTEPQ�MIQZP�PPM9;;PP(C)=Q, MDBYTEdQ�LOKnP�KKL9;;KK(C)=K, LOBYTExQ�MIK�P�KKM9;;KK(C)=K, MDBYTE�Q> �P�MIK;;RESET K, NEXT LOOP� �CPLUS�#�LOC;;C=C+1, 97 MAX��STEP�Q>�P�F8;;F(Y)=1�3�)> �F�R1�X;�!�LP1;;GO BACK TO START�R1 #�LOR;;R=1�LP3"%>,�LP26 Q�PPL8@P�LOQ;;Q=PP(Y), LOBYTEJ Q�PPM8TP�MIQ;;Q=PP(Y), MDBYTE^Q> hP�HIQ;;RESET Q, NEXT LOOPr;|Q�KKL8;;K=KK(Y), LOBYTE�S>��P�LOK;;K=K-255�Q�KKM8;;K=KK(Y), MDBYTE�S> ;;CARRY BIT?�P�MIK�H�KK2�X;��EF2�Q> ;;ZERO MULTS. OF Q�$�LOK�P�F9;;F(K)=0�Q�LOQ�,O�LOKP�LOK;;K=K+Q, LOBYTEQ�MIQ&O�MIK0P�MIK;;K=K+Q+CARRY:F�EF2;;MORE ZEROSDX;N�KK2XP�KKM8;;FILL KK TABLEbQ�LOKl P�KKL8v3�)>b�H�LP2;;NEXT J�X;�Q�LOR;;R=R+510�,�O>�;;510 LOBYTE�P�LOR�Q�MIR�O>;;510 HIBYTE�P�MIR�D�WY2�X;�#�HIR;;CARRY BIT�WY2%>�LP4 Q�F8;;DOES F(Y)=1?*R>;;IF NOT, GET4H�STEP2;;NEXT F(Y)>X;HC;;MAKE Q=R+Y+YR,\T?fP�LOQ;;Q=Y+Y, LOBYTEpQ> zO> �P�MIQ;;Q=Y+Y, DONE�Q�LOQ�O�LOR�P�LOQ;;Q=Y+Y+R, LOBYTE�Q�MIQ�O�MIR�P�MIQ;;Q=Y+Y+R, MDBYTE�Q> �O�HIR�P�HIQ;;Q=Y+Y+R, HIBYTE�Q�LOC;;CHECK Q=>N?�R�LON�Q�MIC S�MIN Q�HIC S�HIN$ D�NXT2. X;8 :;;Q=>N, DONE!B X;L �NXT2V #�LOC;;C=C+1` H�NXTYj X;t #�MIC~ H�NXTY� X;� #�HIC� ,� D�NXTY;;FORCED BRANCH� X;� �STEP2� Q>� P�F8;;F(Y)=1� �NXTY� 3;;Y=Y+1� )> � H�LP4;;Y<256 X; !�LP3;;GO 'ROUND AGAIN
Back to previous page