Primes by Trial Division - Rocky Mountain BASIC

21 March 2020

The Rocky Mountain BASIC version is identical to the IBM PC BASIC / Microsoft GW-BASIC version apart from the use of DISP to display results on the screen (PRINT outputs to an actual printer device), and both COUNT and INDEX being reserved words in this BASIC.

 1 GOTO 10
 5 c = c + 1
 6 GOTO 50
 10 DIM primes(99)
 20 primes(0) = 2
 25 DISP primes(0)
 30 c = 3
 40 FOR found = 1 TO 99
 50 FOR i = 0 TO (found - 1)
 60 IF (c MOD primes(i)) = 0 THEN GOTO 5
 70 NEXT i
 80 DISP c
 90 primes(found) = c
 100 c = c + 1
 110 NEXT found
 120 END

Typewritten Software • bear@typewritten.org • Edmonds, WA 98026

Museum

Home

Lab Overview

Retrotechnology Articles

⇒ Primes Benchmark Source

Media Vault

Software Library

Restoration Projects

Artifacts Sought

Related Articles

Primes Benchmark Results

Other BASICs

Applesoft BASIC

Atari 2600 BASIC

BBC BASIC

Commodore BASIC

DRI Personal BASIC

HP BASIC/V

IBM 5100 BASIC

IBM PC BASIC

PICK/BASIC

Rocky Mountain BASIC

Sinclair ZX80 BASIC

Spectravideo Compumate

TI 99/4 BASIC

TRS-80 Level 1 BASIC

V-Tech Laser 50

VAX BASIC

Structured BASIC

Amiga BASIC

Dartmouth True BASIC

Microsoft QuickBASIC

Microware Basic09

Topaz S-BASIC