Z80 Sans – a disassembler in a font (2024)
150 points by pabs3 5 days ago | 15 comments

Averave 2 days ago
You can do a lot of crazy things with fonts. Just off the top of my head:

Tetris Font - https://news.ycombinator.com/item?id=40737294

A font which is also an LLM - https://news.ycombinator.com/item?id=40766791

And in the same vein:

Tetris in a PDF - https://news.ycombinator.com/item?id=42645218

Doom in a PDF - https://news.ycombinator.com/item?id=42678754

reply
california-og 18 hours ago
I made a syntax highlighting font (also mentioned as an inspiration to Z80 sans):

https://blog.glyphdrawing.club/font-with-built-in-syntax-hig...

reply
aa-jv 11 hours ago
>You can do a lot of crazy things with fonts.

My favourite crazy font thing is Chartwell - a font which can be used to add many sophisticated chart types to your document, using discretionary / rare ligatures:

https://www.vectrotype.com/chartwell

(User manual here: https://assets.vectrotype.com/specimens/Chartwell-Manual-24-...)

I've used this to rapidly add charting functionality to various apps over the years - it can be used to produce amazing-looking, dynamic charts, within minutes!

I have, for years, wanted to dissect Chartwell and understand it better .. there are many other fonts which use rare ligatures for interesting purposes, too ..

reply
pwnfunction 2 days ago
next is to build a disassembled inside a pdf
reply
aa-jv 11 hours ago
Alchemist Owl got there already:

https://www.alchemistowl.org/pocorgtfo/

POC||GTFO is one of those things that, once you dive in, you will never regret taking the effort to fully grok.

...

AI-Generated summary of issues relating to disassembly:

PoC||GTFO 0x10 (pocorgtfo10.pdf, January 2016): Titled around "IN THE THEATER OF LITERATE DISASSEMBLY," this entire issue focuses on reverse engineering and disassembly. It includes articles and examples involving disassembly of various systems (e.g., mentions of built-in monitors and naive disassemblers like in Apple ][ contexts, along with reverse engineering hood-lifting). It heavily features disassembly as a theme, with likely code listings and explanations that effectively serve as or demonstrate disassembler usage/output.

PoC||GTFO 0x21 (pocorgtfo21.pdf, February 2022): This issue explicitly mentions a "Notebook of Altera NIOS Disassembly" in its content/description. Articles cover disassembly (e.g., of Altera NIOS soft-core processor code), and one notes that while focused on disassembly, full target plugins would include an assembler, disassembler, code analysis, etc. This strongly indicates the PDF contains disassembly examples, outputs, or even PoC implementations/discussions of disassembler functionality for that architecture.

Other issues occasionally include disassembly snippets or references (e.g., 0x11, 0x13, 0x15 show snippets like disassembled code blocks for specific exploits or systems), but they are more incidental rather than centered on a disassembler tool or example.

reply
anthk 2 days ago
get zmachine.ps and you could play zork i-iii, Tristam Island and tons of z3 zmachine games (search for calypso.z3 too) without cheating as the PDF format implements an ad-hoc JS interpreter where not all viewers parse it.
reply
billforsternz 24 hours ago
I thought my Z80 project (https://github.com/billforsternz/retro-sargon) was close to the whimsical end of the practical to just for fun spectrum but this takes things to a whole new level, kudos.
reply
localhost 4 hours ago
i had gpt-5.4 write a 6502 font version of this font [1] in between working on other things. super fun and learned a lot by watching it do its thing.

[1] https://github.com/jflam/6502-sans

reply
ilaksh 2 days ago
I guess it would be cheating, but he actually could have just written it in Rust, since OpenType can execute web assembly. People have abused that to embed things like Tetris and even an LLM inside of fonts.

What he did was more impressive in a way.

reply
erk__ 18 hours ago
It's not OpenType that can execute wasm it's a experimental extension in HarfBuzz so compared to this it does not work online since it is not enabled for the HarfBuzz builds in Chrome or Firefox. Which makes this more cool to show of online.

(disclaimer, I made the Tetris font)

reply
tgv 2 days ago
This made me smile. What an astonishing combination. The oddball application of a font as a disassembler works like a wonderful practical joke to me. Merging parsing, processing and rendering into a single step feels mad genius.
reply
notglossy 2 days ago
Man... I'm lucky if the fonts I'm using even have tabular figures as alternates. This is on a whole other level.
reply
userbinator 2 days ago
Not too surprising given that a font maps bytes into glyphs, and an instruction set maps them to instructions. I suspect a 6502 or 8051 version would be much simpler.
reply
dhosek 2 days ago
Definitely. I wrote an incomplete z80 disassembler as a high school student back in the 80s, but never got to the 2-byte opcodes. 6502 has none of those so would be much easier to manage.
reply
iberator 2 days ago
Ha ha this is the best thing I have seen today in hacker news!

So clever and funny

reply