Home » Personal collection » Acorn ADFS disks » Electron » Finished_programs.ADF » TAPE3/A/mcPRIMES1 » Compare
Compare TAPE3/A/mcPRIMES1 with M.C.PRIMES
| File: | Personal collection » Acorn ADFS disks » Electron » Finished_programs.ADF » TAPE3/A/mcPRIMES1 |
| Compared with: | Personal collection » Acorn tapes » Own_Work » box02_tape20a_c15_acorn_maths.wav » M.C.PRIMES |
| Similarity: | 99% of bytes duplicated |
17 of 19 lines (89.5%) are identical in the two listings. Duplicated Different
Line numbers are ignored when comparing lines, so that renumbered programs still match.
| TAPE3/A/mcPRIMES1 | M.C.PRIMES |
|---|---|
| 10 REM Machine code prime numbers (7/7/93) | 10 REM Machine code prime numbers (7/7/93) |
| 20 HIMEM=&17FF | 20 HIMEM=&17FF |
| 30 !&70=3 | 30 !&70=3 |
| 40 !&1800=3:!&7B=&1803 | 40 !&1800=3:!&7B=&1803 |
| 50 FOR pass=0 TO 2 STEP 2:P%=&A00 | 50 FOR pass=0 TO 2 STEP 2:P%=&A00 |
| 60 [OPT pass | 60 [OPT pass |
| 70 .code LDA#0:STA&74:LDA#&18:STA&75 | 70 .code LDA#0:STA&74:LDA#&18:STA&75 |
| 80 .product LDA#0:STA&76:STA&77:STA&78 | 80 .product LDA#0:STA&76:STA&77:STA&78 |
| 90 .quotient STA&79:STA&7A | 90 .quotient STA&79:STA&7A |
| 100 .addloop CLC:LDA&76:LDY#0:ADC(&74),Y:STA&76:BCCendadd1:INC&77:BNEendadd1:INC&78:BNEendadd1:JMPnotfactor | 100 .addloop CLC:LDA&76:LDY#0:ADC(&74),Y:STA&76:BCCendadd1:INC&77:BNEendadd1:INC&78:BNEendadd1:JMPnotfactor |
| 110 .endadd1 LDA&77:CLC:LDY#1:ADC(&74),Y:STA&77:BCCendadd2:INC&78:BNEendadd2:JMPnotfactor | 110 .endadd1 LDA&77:CLC:LDY#1:ADC(&74),Y:STA&77:BCCendadd2:INC&78:BNEendadd2:JMPnotfactor |
| 120 .endadd2 INC&79:BNEendadd3:INC&7A | 120 .endadd2 INC&79:BNEendadd3:INC&7A |
| 130 .endadd3 LDX#3:.checkloop LDA&75,X:CMP&6F,X:BCCaddloop:BNEnotfactor:DEX:BNEcheckloop | 130 .endadd3 LDX#3:.checkloop LDA&75,X:CMP&6F,X:BCCaddloop:BNEnotfactor:DEX:BNEcheckloop |
| 140 .notprime CLC:LDA&70:ADC#2:STA&70:BCCnext:INC&71:BNEnext:INC&72:BNEnext:INC&73:RTS:.next JMPcode | 140 .notprime CLC:LDA&70:ADC#2:STA&70:BCCnext:INC&71:BNEnext:INC&72:BNEnext:INC&73:RTS:.next JMPcode |
| 150 .notfactor LDA&7A:LDY#1:CMP(&74),Y:BCCprime:BNEcarryon:LDA&79:LDY#0:CMP(&74),Y:BCCprime | 150 .notfactor LDA&7A:CMP(&74),Y:BCCprime:LDA&79:LDY#0:CMP(&74),Y:BCCprime |
| 160 .carryon CLC:LDA&74:ADC#3:STA&74:BCCnextfactor:INC&75:.nextfactor JMPproduct | 160 CLC:LDA&74:ADC#3:STA&74:BCCnextfactor:INC&75:.nextfactor JMPproduct |
| 170 .prime LDY#0:LDX#3:.store LDA&70,Y:STA(&7B),Y:INY:DEX:BNEstore:LDA&7B:CLC:ADC#3:STA&7B:BCCend:INC&7C:LDA&7C:CMP#&60:BNEend:DEC&7C:.end RTS:] | 170 .prime LDY#0:LDX#3:.store LDA&70,Y:STA(&7B),Y:INY:DEX:BNEstore:LDA&7B:CLC:ADC#3:STA&7B:BCCend:INC&7C:LDA&7C:CMP#&60:BNEend:DEC&7C:.end RTS:] |
| 180 NEXT pass | 180 NEXT pass |
| 190 IF ?&73>0 THEN PRINT"END" ELSE PRINT !&70:CALLnotprime:GOTO190 | 190 IF ?&73>0 THEN PRINT"END" ELSE PRINT !&70:CALLnotprime:GOTO190 |
.