Skip to main content
bugfix
Source Link
lynn
  • 69.2k
  • 11
  • 133
  • 283

1964 - Dartmouth BASIC

BASIC is a family of general-purpose, high-level programming languages whose design philosophy emphasizes ease of use. In 1964, John G. Kemeny and Thomas E. Kurtz designed the original BASIC language at Dartmouth College in New Hampshire. They wanted to enable students in fields other than science and mathematics to use computers.

I'm looking at this manual on BASIC from 1964, and this emulator of the Darthmouth Time Sharing System it ran on. The server is still up, but sadly, registering an account seems to be impossible. For now, these programs should theoretically work:

Task 1

10 PRINT "BASIC WAS MADE IN 1964"
20 END

Task 2

10 READ N
15 FOR Y = 1 TO N STEP 1
20 FOR X = 1 TO N STEP 1
25 IF YX = 1 THEN 50
30 IF YX = N THEN 50
35 IF X = Y THEN 50
40 PRINT " ",
45 GO TO 55
50 PRINT "N",
55 NEXT X
60 PRINT
65 NEXT Y
70 DATA 5
75 END

Outputting something like:

N                       N
N     N                 N
N           N           N
N                 N     N
N                       N

Note how the input is typed in as part of the program (70 DATA 5); the READ instruction way at the top fetches data from there. There is no string concatenation, but section 3.1 of the manual describes how PRINT results are written to tabulated "zones" on the output.

Task 3

The slow version of Euclid's algorithm:

10 READ A, B
20 IF A = B THEN 80
30 IF A < B THEN 60
40 LET A = A - B
50 GO TO 20
60 LET B = B - A
70 GO TO 20
80 PRINT A
85 DATA 144, 250
90 END

Outputting:

2

1964 - Dartmouth BASIC

BASIC is a family of general-purpose, high-level programming languages whose design philosophy emphasizes ease of use. In 1964, John G. Kemeny and Thomas E. Kurtz designed the original BASIC language at Dartmouth College in New Hampshire. They wanted to enable students in fields other than science and mathematics to use computers.

I'm looking at this manual on BASIC from 1964, and this emulator of the Darthmouth Time Sharing System it ran on. The server is still up, but sadly, registering an account seems to be impossible. For now, these programs should theoretically work:

Task 1

10 PRINT "BASIC WAS MADE IN 1964"
20 END

Task 2

10 READ N
15 FOR Y = 1 TO N STEP 1
20 FOR X = 1 TO N STEP 1
25 IF Y = 1 THEN 50
30 IF Y = N THEN 50
35 IF X = Y THEN 50
40 PRINT " ",
45 GO TO 55
50 PRINT "N",
55 NEXT X
60 PRINT
65 NEXT Y
70 DATA 5
75 END

Outputting something like:

N                       N
N     N                 N
N           N           N
N                 N     N
N                       N

Note how the input is typed in as part of the program (70 DATA 5); the READ instruction way at the top fetches data from there. There is no string concatenation, but section 3.1 of the manual describes how PRINT results are written to tabulated "zones" on the output.

Task 3

The slow version of Euclid's algorithm:

10 READ A, B
20 IF A = B THEN 80
30 IF A < B THEN 60
40 LET A = A - B
50 GO TO 20
60 LET B = B - A
70 GO TO 20
80 PRINT A
85 DATA 144, 250
90 END

Outputting:

2

1964 - Dartmouth BASIC

BASIC is a family of general-purpose, high-level programming languages whose design philosophy emphasizes ease of use. In 1964, John G. Kemeny and Thomas E. Kurtz designed the original BASIC language at Dartmouth College in New Hampshire. They wanted to enable students in fields other than science and mathematics to use computers.

I'm looking at this manual on BASIC from 1964, and this emulator of the Darthmouth Time Sharing System it ran on. The server is still up, but sadly, registering an account seems to be impossible. For now, these programs should theoretically work:

Task 1

10 PRINT "BASIC WAS MADE IN 1964"
20 END

Task 2

10 READ N
15 FOR Y = 1 TO N STEP 1
20 FOR X = 1 TO N STEP 1
25 IF X = 1 THEN 50
30 IF X = N THEN 50
35 IF X = Y THEN 50
40 PRINT " ",
45 GO TO 55
50 PRINT "N",
55 NEXT X
60 PRINT
65 NEXT Y
70 DATA 5
75 END

Outputting something like:

N                       N
N     N                 N
N           N           N
N                 N     N
N                       N

Note how the input is typed in as part of the program (70 DATA 5); the READ instruction way at the top fetches data from there. There is no string concatenation, but section 3.1 of the manual describes how PRINT results are written to tabulated "zones" on the output.

Task 3

The slow version of Euclid's algorithm:

10 READ A, B
20 IF A = B THEN 80
30 IF A < B THEN 60
40 LET A = A - B
50 GO TO 20
60 LET B = B - A
70 GO TO 20
80 PRINT A
85 DATA 144, 250
90 END

Outputting:

2
Source Link
lynn
  • 69.2k
  • 11
  • 133
  • 283

1964 - Dartmouth BASIC

BASIC is a family of general-purpose, high-level programming languages whose design philosophy emphasizes ease of use. In 1964, John G. Kemeny and Thomas E. Kurtz designed the original BASIC language at Dartmouth College in New Hampshire. They wanted to enable students in fields other than science and mathematics to use computers.

I'm looking at this manual on BASIC from 1964, and this emulator of the Darthmouth Time Sharing System it ran on. The server is still up, but sadly, registering an account seems to be impossible. For now, these programs should theoretically work:

Task 1

10 PRINT "BASIC WAS MADE IN 1964"
20 END

Task 2

10 READ N
15 FOR Y = 1 TO N STEP 1
20 FOR X = 1 TO N STEP 1
25 IF Y = 1 THEN 50
30 IF Y = N THEN 50
35 IF X = Y THEN 50
40 PRINT " ",
45 GO TO 55
50 PRINT "N",
55 NEXT X
60 PRINT
65 NEXT Y
70 DATA 5
75 END

Outputting something like:

N                       N
N     N                 N
N           N           N
N                 N     N
N                       N

Note how the input is typed in as part of the program (70 DATA 5); the READ instruction way at the top fetches data from there. There is no string concatenation, but section 3.1 of the manual describes how PRINT results are written to tabulated "zones" on the output.

Task 3

The slow version of Euclid's algorithm:

10 READ A, B
20 IF A = B THEN 80
30 IF A < B THEN 60
40 LET A = A - B
50 GO TO 20
60 LET B = B - A
70 GO TO 20
80 PRINT A
85 DATA 144, 250
90 END

Outputting:

2