Primes by Trial Division - IBM 5100 BASIC

18 August 2016

IBM 5100 BASIC supports only single-character variable names, and array indices are 1-based instead of 0-based. Otherwise it is the same as the Applesoft reference version.

0001 GOTO 0010
0005 C=C+1
0006 GOTO 0050
0010 DIM P(100)
0020 P(1)=2
0025 PRINT P(1)
0030 C=3
0040 FOR F=2 TO 100
0050 FOR I=1 TO (F-1)
0060 V=C/P(I)
0065 IF V=INT(V) GOTO 0005
0070 NEXT I
0080 PRINT C
0090 P(F)=C
0100 C=C+1
0110 NEXT F
0120 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

Other Implementations

APL