The Beauty of Intent: From Assembly to Vibe Code

Tinkering with Time, Tech, and Culture #12

Code as Expression
Code has always been more than instructions — it’s expression. In 1991, when I wrote for one-time programmable chips, every mistake was expensive. That pressure forced intent. We drew waveforms in ASCII art, explained every bit, and left trails of meaning for whoever came next.
Today we optimize for outcomes. Back then, we wrote for understanding.
Assembly as Poetry
Here’s one of those artifacts — a routine I wrote in 1991 to transmit a byte using Manchester encoding. Even if you don’t follow assembly, look at how the comments and diagrams teach.
Back then, this was literally bit-banging a GPIO pin — flipping it high and low in exact rhythm — to generate a Manchester-encoded waveform. Every instruction cycle counted. Today, we’d offload that to a UART peripheral, a DMA channel, or even a tiny PIO state machine. But in 1991, the code itself was the hardware.
;--------------------------------------------------------------------
; Send Byte - This routine sends the byte in xmitbyte to the I/O
; port.
;
; manchester low-->hi = 1
;
; Send format example (send 5fh):
; 0 1111 1010 0 1
; ^ ^^^^ ^^^^ ^ ^
; St P Sp St=Start (always 0)
; f 5 P =Odd paraty
; Sp=Stop (Always 1)
;
; Clock:
; _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
; | |_| |_| |_| |_| |_| |_| |_| |_| |_| |_| |_| |_| |_| |_| |_| |
;
; Data word: 5FH (Octal 137, bin 01011111)
; ___________________ ___
; ________| |___| |___________________________
; Data Frame:
; ____ ___________________ ___ ___ _______________
; |___| |___| |___| |___|
; Encoded data:
; ___ _ _ _ _ ___ ___ _ _ _ _ _
; |_| |___| |_| |_| |_| |_| |___| |___| |_| |_| |_| |_| |
; |T0 |T1 |T2 |T3 |T4 |T5 |T6 |T7 |T8 |T9 |T10|T11|T13|T14|T15|T16|
; St 1 1 1 1 1 0 1 0 OP Sp
; 0 1 1
;--------------------------------------------------------------------
🔎 Full Send_Byte routine (click to expand)
Send_Byte_FF movlw 0ffh
Send_Byte
movwf xmit_byte
;
; Send Start bit (0), we know that the data line is high and
; we want a high to low transistion, so wait for the next data
; transistion time and swing the I/O line low.
;
;;
Send_Start movf RTCC,W
subwf fmcycle,W
btfsc STATUS,CARRY
goto Send_Start
; swing data low
bcf Port_A, OUT_PIN ; Set I/O port low
clrf RTCC ; reset RTCC counter to zero
;;
;
; Incerment checksum
;
movf xmit_byte,W ; get xmit byte to W
addwf checksum,Same ; add it into checksum
;
; Set parity Value to 1, for odd parity
;
clrf Parity_Val ; Set parity to one
incf Parity_Val, Same; (odd parity)
;
; Set the decesion flag to send parity next.
;
bsf d_flag,PARITY
;
; Send Data Byte
;
Send_Data movlw 8 ; 8 bits to be sent
movwf SCount
Send_Loop rrf xmit_byte, Same ; rotate bit right into carry
btfsc STATUS, CARRY ; check if we should send a Zero
goto S_One ; or One
S_Zero
;;;
btfsc Port_A, OUT_PIN ; check I/O for current status
goto HiLow0
; We are currently low, and want a hi to low transistion, so
; do a transition at mid point to set up a hi to low at the
; next data transistion time.
LowHi0 movf RTCC,W
subwf hmcycle,W ; Half Manchester cycle
btfsc STATUS,CARRY
goto LowHi0
; swing data hi
bsf Port_A, OUT_PIN ; Set I/O port Hi
;
; We are currently hi, and want a hi to low transistion, so wait
; until next data transison time and swing I/O line low.
;
HiLow0
movf RTCC,W
subwf fmcycle,W ; Full Manchester cycle 70ns
btfsc STATUS,CARRY
goto HiLow0
; swing data low
bcf Port_A, OUT_PIN ; Set I/O port low
clrf RTCC ; reset RTCC counter to zero
Z_Ret
;;;
goto S_Next
S_One
incf Parity_Val, Same; Incerment parity value
;;;
btfsc Port_A,OUT_PIN ; check I/O for current status
goto HiLow1
;
; We are currently low, and want a low to hi transistion,
; so wait until next data transison time and draw the I/O line hi.
;
LowHi1 movf RTCC,W
subwf fmcycle,W ; Full Manchester cycle 70ns
btfsc STATUS,CARRY
goto LowHi1
; swing data hi
bsf Port_A, OUT_PIN ; Set I/O port hi
clrf RTCC ; reset RTCC counter to zero
O_Ret
goto S_Next
;
; We are currently hi, and want a low to hi transistion, so
; do a transition at mid point to set up a low to hi at the
; next data transistion time.
;
HiLow1 movf RTCC,W
subwf hmcycle,W ; Full Manchester cycle 70ns
btfsc STATUS,CARRY
goto HiLow1
; Swing data low
OutWait2 bcf Port_A, OUT_PIN ; Set I/O port low
; wait tell next data tranistion and swing data hi
goto LowHi1
;;;
S_Next decfsz SCount
goto Send_Loop
;
; determine whether to send parity, stop or bail
incf SCount
btfsc d_flag,PARITY
goto Send_Parity
btfsc d_flag,STOP
goto Send_Stop
clrwdt
Send_Byte_Ret retlw 0ffh
;
; Send Parity Value
;
Send_Parity clrf d_flag ; clear the decision flag
bsf d_flag,STOP ; set send stop bit next
btfsc Parity_Val,LSB ; See if we should send a one or zero
goto S_One ; Send a one
goto S_Zero ; or send a zero
;
; Send Stop Bit (1)
;
Send_Stop clrf d_flag ; clear the decision flag
goto S_One ; send stop bit(1)
You don’t need to decode every line. Just notice:
– The ASCII art diagrams make timing visible.
– The comments explain not just what but why.
– The code is both instruction set and documentation.
This wasn’t written for vibes — it was written with intent.
The Beauty of Code (Pop Culture)
If you’ve seen Silicon Valley, you know the look: Dinesh gazing at Gilfoyle’s code like it’s a Renaissance painting. That’s exactly how I feel about this old assembly — it’s not just bits and branches, it’s intent made visible.
“It’s not her you’re attracted to… it’s my code.” — Gilfoyle, Silicon Valley*
And yes, sometimes code can really feel like that — worthy of awe, even love.
Why “Vibe Code” Fails Here
If you asked an AI to generate the same routine today, you might get something like this:
# "Manchester" send (WRONG in practice)
import time
BIT_PERIOD = 0.000070
def send_byte(b):
# start bit
write_pin(0)
time.sleep(BIT_PERIOD)
# data bits
parity = 1
for i in range(8):
bit = (b >> i) & 1
parity ^= bit
write_pin(bit)
time.sleep(BIT_PERIOD / 2)
write_pin(1 - bit)
time.sleep(BIT_PERIOD / 2)
# parity and stop
write_pin(parity)
time.sleep(BIT_PERIOD)
write_pin(1)
Looks fine, right? But it would never work. Why?
– The OS scheduler can’t guarantee microsecond timing.
– GPIO writes in user space are unpredictable.
– time.sleep()
has jitter measured in milliseconds, not nanoseconds.
– The original assembly was the clock. The instruction stream itself generated the waveform.
In other words: you can vibe a paragraph, but you can’t vibe a clock edge.
What Changed
Back then: Code was scarce and mistakes were expensive. Every instruction had to be counted, every branch deliberate. If you got it wrong, you either lived with the bug or pulled out a quartz-window EPROM and erased it under ultraviolet light before starting over. Intent wasn’t optional; it was survival.
Now: Code is abundant and mistakes are cheap. We can ship, patch, or regenerate in seconds. That abundance shifts the focus: outcomes matter, but the craft — the intent — often gets lost.
Idiocracy and Intent
In the movie Idiocracy, civilization runs on autopilot. Machines still operate, crops still grow — but no one knows why. The systems work, until they don’t. And when they don’t, no one remembers how to fix them.
That’s the trajectory of software optimized purely for outcomes. In 1991, code was written with intent — not just to run, but to explain itself, to endure. Intent meant clarity, deliberate design, and leaving behind a map for the next engineer. Today, most code is scaffolding: it runs, it ships, it solves today’s problem. But it carries no memory, no reasoning, no path back to first principles.
Outcomes keep systems running — until they don’t. When timing matters, when abstractions leak, only intent makes repair possible.
Eventually, the system won’t just need to run. It will need to be understood.
⏱️ Estimated read time: ~6 minutes