cd /news/developer-tools/you-can-t-trust-assembly-an-ai-wrote… · home topics developer-tools article
[ARTICLE · art-99134] src=dev.to ↗ pub= topic=developer-tools verified=true sentiment=· neutral

You can't trust assembly an AI wrote. Here's the 3-command gate.

An engineer from TrothByte warns that AI assistants generate assembly code that is confidently wrong in specific, repeatable ways, such as inventing nonexistent mnemonics, flipping operand order, and silently dropping immediates. The proposed fix is a three-command verification gate using GCC and objdump to compare disassembly against the source, catching errors that compile successfully. The project, hosted at github.com/TrothByte/low-level-skills-trothbyte, includes a catalog of 124 verified skills and 177 sources.

read2 min views1 publishedAug 16, 2026

Disclosure:this tutorial was drafted with AI assistance. Every technical claim is verified and source-traced in the linked repository.

AI assistants are confident about assembly — and wrong in specific, repeatable ways. They invent mnemonics that do not exist, flip AT&T/Intel operand order, silently drop immediates, and misread bytes. When we audited real incidents, the failures shared a signature: the code looks plausible and never errors.

The fix isn't "be more careful". It's a mechanical gate you can run in seconds.

gcc -c sample.s && objdump -d sample.o

gcc -c -masm=intel sample.s && objdump -d -M intel sample.o

If the disassembly does not match what you wrote — same mnemonic, same operands, same size — you did not write that instruction. Three real cases this catches:

movqad

is not an instruction. The assembler rejects it — so far, so good. The dangerous ones compile.

imul eax, eax, 38      ; assembles to: 69 c0 00 00 00 00

The 38

is silently dropped by the parser — this is the bug class behind BBoeOS PR#584. The code compiles. The intent is gone.

-masm=intel

flips the operand order (mov eax, [rax]

vs mov (%rax), %eax

). Mixing AT&T and Intel in one file silently changes semantics.

Compiling proves your syntax fits some grammar. It does not prove the encoding matches your intent. LLM-based disassembly gets exact instruction matches right about 14% of the time; "corrected" decompilations are right about 37%. The confidence-to-correctness gap is exactly where the expensive bugs live.

Verify real parallelism (thread counts + wall time, not thread-safe syntax). Verify the API actually exists (cargo search

, not memory). Verify your verification — a harness that can't fail is not evidence.

The full failure catalog and the skills that encode these gates live in

** https://github.com/TrothByte/low-level-skills-trothbyte** —

researched

with exact verification commands.

git clone https://github.com/TrothByte/low-level-skills-trothbyte
python tools/validate.py     # 124 skills + registry + 177 sources, gated in seconds

Also installable via npx skills add TrothByte/low-level-skills-trothbyte

or as a Claude Code plugin marketplace.

Found a failure we haven't catalogued? The repo accepts issues — every new skill must be source-traced and differentiated from the existing 124. Watch the repository to get updates as it grows.

── more in #developer-tools 4 stories · sorted by recency
── more on @trothbyte 3 stories trending now
sponsored brought to you by zahid.host 4,200+ EU-deployed projects
reading about agents? ship yours in a single git push.

Run your AI side-project on zahid.host

EU-based hosting, git-push deploys, automatic HTTPS, no cold starts. Free tier with a custom domain — perfect for shipping the agent you just read about.

$git push zahid main
Live at https://your-agent.zahid.host
Get free account → Pricing
from €0/mo · no card required
LIVE [news/you-can-t-trust-asse…] indexed:0 read:2min 2026-08-16 ·