Back to BASIC: Drawing a Smiley Face on the ZX Spectrum, Like It’s 1982 Again

by Evgenii Studitskikh
4 minutes read

I can still feel the static crackle of my ZX Spectrum as it powered up, the rubber keys bouncing under my fingertips, and that electric thrill of typing my first program into its 48K universe. It was the early ‘80s—or at least my teenage heart pretended it was—and every line of BASIC felt like a secret handshake with the future. The screen glowed, the tape deck hissed, and suddenly, I was more than a kid—I was a coder, sketching pixelated dreams. Today, I’m stepping back into that time machine to recreate a classic: a smiley face in Sinclair BASIC, just like the ones I doodled when I first discovered PLOT and CIRCLE.

The ZX Spectrum was a humble beast—256×192 pixels, eight garish colors, and a resolution so coarse you could almost hug each blocky dot. But oh, what a playground! With PLOT, DRAW, and CIRCLE, I could coax shapes out of that flickering screen. So, let’s load up some virtual tape and code a smiley face—big round head, cheeky eyes, and a grin—while the nostalgia floods back like a mixtape on rewind.

Here’s the program I pieced together, typed with the same eager hands that once pecked out “10 PRINT” loops:

10 REM Smiley Face for ZX Spectrum
20 CLS : REM Clear the screen
30 PAPER 0 : INK 6 : REM Black background, yellow ink for that sunny vibe
40 REM Draw the big round face
50 CIRCLE 128,96,60 : REM Center at (128,96), radius 60 pixels
60 REM Left eye
70 CIRCLE 108,116,10 : REM Smaller circle, offset left and up
80 REM Right eye
90 CIRCLE 148,116,10 : REM Mirror it on the right
100 REM Big ol’ smile
110 INK 7 : REM Switch to white for contrast
120 PLOT 108,76 : REM Start of the smile arc
130 DRAW 40,0 : REM Horizontal base of the smile
140 PLOT 108,76 : DRAW -20,-20 : REM Left curve up
150 PLOT 148,76 : DRAW 20,-20 : REM Right curve up
160 PAUSE 0 : REM Hold the grin ‘til a keypress
Plaintext

Run this, and after the Spectrum’s signature chug, there it is: a beaming yellow face staring back from a black void. A perfect circle for the head, two smaller ones for eyes, and a smile scratched out with PLOT and DRAW—not quite an arc, but close enough to charm. Back in the day, this would’ve been my Mona Lisa, a triumph of trial and error.

I can still hear the screech of Jet Set Willy loading as I fiddled with my first programs. That face starts with a CIRCLE at (128,96)—the screen’s sweet spot—60 pixels wide, glowing in yellow (INK 6) because it felt happier than plain white. The eyes? Two more circles, nudged 20 pixels left and right of center, 10 pixels high for that cartoonish pop. The smile’s the tricky bit—no fancy curves in BASIC, so I faked it with three lines: a flat base and two upward tilts, switched to white (INK 7) to stand out like a grin in the dark.

The Spectrum’s quirks were its soul. Eight colors—black, blue, red, magenta, green, cyan, yellow, white—and a pesky 8×8 attribute grid that loved to clash. Yellow on black was my go-to; it popped like a sunflower on that tiny CRT. No fill commands meant every shape was an outline, but that just made the victories sweeter—like when I got my first diagonal line to land where I wanted.

Hitting RUN and watching that smile bloom was pure magic. No mouse, no undo—just me, a keyboard, and a blinking cursor, like a digital campfire. If you’ve got an emulator (Fuse, maybe?), type this in and see it smirk back at you. Tweak a radius, shift an eye—make it wink, even. That’s what I did back then, hunched over graph paper, dreaming in pixels.

This smiley face isn’t high art, but it’s a love letter to those days when coding felt like play. I might just hunt down my old Speccy and fire it up, chasing that familiar beep. What about you? Got a retro coding tale that lights up your memory? Share it below—let’s reminisce over some BASIC and a pixelated grin.

You may also like