TI-99/4A Primes

Being a fan of old hardware, I used the TI-99/4A (released in 1981) to calculate some primes.
The code is written in BASIC, the programming language found on most computers of this era.
Further information on the TI can be found in this Wikipedia article.

TI-99 4A Start ScreenPrime ProgramTI-99 4A


1   REM TI-99/4A BASIC Code
2   REM Jonathan Frech 20th of May, 2016

10  PRINT 2
20  N=1
30  N=N+2
40  FOR X=2 TO N-1
50  D=N
60  D=D-X
70  IF D>0 THEN 60
80  IF D=0 THEN 30
90  NEXT X
100 PRINT N
110 GOTO 30
Advertisements

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s