My Computers

The HAL 9000

The original HAL 9000 appeared in the 1968 Stanley Kubrick film 2001: A Space Odyssey. HAL was astronaut Dave's antagonist and the first occurrence in movies, that I can recall, where artificial intelligence was depicted as having gone awry. The name HAL was derived from taking the name of the largest computer company in the world at the time, IBM, and decrementing each of the letters by one in the English alphabet. I became H, B became A, and M became L.

 A picture of HAL embedded in the spacedeck of the spaceship with two astronauts looking on.

I appropriated the HAL 9000 moniker as the name for my first computer program which is on display here. The HAL 9000 program is the first computer program I ever wrote. Written in 1982, it is very basic (written in Intelli-Basic), and is here for archival purposes and for demonstrating unstructured procedural programming.

HAL 9000 Program Running

Original code is listed at the end of the video.

Original HAL 9000 code written in IntelliBasic

Download PDF   Download Txt   Download Visual Studio Solution

        ///// HAL 9000 written in Intellivision Basic By Bill Bennett for the Intellivision Computer Console ©1982  ////////
5	GSUB 2000
10	PRIN "HAL 9000"
20 	PRIN "   "
30 	PRIN "A PROGRAM BY:"
40	PRIN "BILL BENNETT"
50 	GSUB 3000
55	GSUB 9000
60	PRIN "HELLO "
70	PRIN "I AM HAL 9,000"
80	PRIN "THE MOST ADVANCED"
90	PRIN "DATING COMPUTER"
95	PRIN "IN THE WORLD."
97	GSUB 3000
100	PRIN "ENTER YOUR NAME"
105	PRIN "PLEASE:"
107	PRIN "       "
110	GET A$
190	GSUB 2000
200	PUT A$
210	PRIN "IS A VERY NICE NAME."
220	PRIN "IN FACT IT IS ONE"
230	PRIN "OF MY FAVORITE"
240	PRIN "NAMES"
290	GSUB 3000
300	PRIN "ENTER YOUR AGE:"
310	PRIN INPUT A
320	GSUB 900
390	GSUB 2000
400	PRIN A
410	PRIN "LOOKING GOOD"
420	GSUB 3000
430	GOTO 700
490	GSUB 2000
495	GOTO 500
500	PRIN A
510	"TOO OLD FOR ME"
520	GSUB 3000
530	GOTO 6000
590	GSUB 2000
600	PRIN A
610	PRIN "TOO YOUNG, CALL ME"
620	PRIN "IN A FEW YEARS."
630	GSUB 3000
640	GOTO 6000
700	PRIN "ENTER YOUR SEX:"
710	PRIN "[M=1 F=2]"
715	INPU B
720	GSUB 2000
730	IF [B=1] GOTO 800
740	IF [B=2] GOTO 4100
790	GSUB 2000
800	PRIN "WELL, "
810	PUT A$
820	PRIN "I AM SORRY BUT"
830	PRIN A
840	PRIN "YEAR OLD MALES"
850	PRIN "ARE NOT MY STYLE"
855	GSUB 3000
860	GOTO 6000
900	IF [A<17] GOTO 590
910	IF [A>32] GOTO 490
920	RET
1000	IF [B=1] GOTO 800
1100	IF [B=2] GOTO 410
2000	FOR Z=1 TO 10
2100	PRIN	"    "
2200	NEXT Z
2300	RET
3000	PRIN "   "
3100	PRIN "PRESS RETURN"
3200	PRIN "TO CONTINUE"
3300	INPU Q
3350	GSUB 2000
3400	RET
4100	PRIN "YOUR PLACE"
4200	PRIN PUT A$
4300	PRIN "OR MINE?"
4350	GSUB 3000
4400	GOTO 6000
5000	PRIN "   "
5100	PRIN "END OF GAME"
5200	END
6000	PRIN "NAME:"
6100	PRIN A$
6200	PRIN "   "
6300	PRIN "AGE:"
6400	PRIN A
6500	PRIN "   "
6515	IF [A<17] GOTO 7000
6517	IF [A>32] GOTO 7000
6519	IF [B=2] GOTO 6600
6520	PRIN "SEX:"
6530	PRIN "MALE"
6540	GOTO 5000
6600	PRIN "SEX:"
6700	PRIN "FEMALE"
6800	GOTO 5000
7000	"SEX:"
7100	PRIN "UNKNOWN"
7200	GOTO 5000
9000	FOR H=1 TO 4
9100	PRIN "####################"
9150	GSUB 10000
9200	NEXT H
9250	GSUB 2000
9300	RET
10000	FOR I=1 TO 3
10100	PRIN "$$$$$$$$$$$$$$$$$$$$"
11000	FOR G=1 TO 2
12000	PRIN "********************"
12100	PRIN "////////////////////"
12200	NEXT G
13000	NEXT I
13100	RET