(I commemorated this program in a t-shirt)
In 1983, in the wood shop of JHS 125 in Woodside, Queens, perhaps sensing my frustration in making a spice rack, my teacher asked if I’d rather be in “computer shop”. Mr. Abbey had good instincts.
My new shop teacher, Mr. Penner, gave us each a sheet of graph paper and told us to count 80 columns and 25 rows and draw a picture by filling in squares. I drew a skull (I think it might have been getting close to Halloween). Next, he taught us enough BASIC so that we could write a program to draw our pictures on the screen.
I looked up an old Commodore PET manual, PETASCII table, a PET memory map, and downloaded VICE, a PET emulator, to recreate it here (lines 1010+ would have the coordinates from the drawing):
10 REM DRAW AN AWESOME SKULL!!
20 REM BY LOUIS FRANCO
30 READ X, Y
40 IF X = -1 THEN END
50 POKE 32768 + y * 80 + x, 160
60 GOTO 30
1000 REM (THE X, Y COORDINATES FOR THE SKULL)
1010 DATA
1020 DATA
2000 DATA -1, -1
What I love about this introduction to code:
- It is pretty much the minimum code you can write to get a drawing on the screen.
- It has conditionals and loops, so it’s more interesting than Hello World.
- It takes advantage of something a 13 year-old might know — X, Y coordinates.
- He gave us lines 30-60 because you have to know minutia of PET architecture to understand it. He did explain it, but didn’t expect us to be able to write it.
The next lesson was to animate the drawing (cycling two frames), which we were mostly on our own to do.