Teaching an LLM to Write Assembly: GBNF-Constrained Generation for a Custom CPU
jamesdrandall.com·3d·
Discuss: Hacker News
🌳Context free grammars
Preview
Report Post

Teaching an LLM to Write Assembly: GBNF-Constrained Generation for a Custom 8-Bit CPU

The source code for this can be found on GitHub here.

Over the past few weeks I’ve been building a fully-playable 8-bit virtual console from scratch — CPU, instruction set, assembler, sprite system, IDE, the lot. One of the more interesting side quests has been teaching an LLM to generate valid assembly targeting my CPU. You can follow the full build in my YouTube series here. Its called Building a Virtual 8-Bit Console with an AI Assistant and we’re up to about part 14 and things are still ongoing.

If you’ve ever tr…

Similar Posts

Loading similar posts...