Get the latest tech news

Show HN: Z80 Sans


OpenType font that disassembles Z80 instructions. Contribute to nevesnunes/z80-sans development by creating an account on GitHub.

Multiple combinations: recall that some Z80 instructions can take 16-bit addresses and registers as operands, which means that a single instruction can have up to 65536 * 7 = 458752 possible combinations; Out-of-order operands: e.g. register and offsets can be encoded into hexadecimal bytes in one order, but disassembled in another order, which complicates backtracking/lookaheads rules; Little-endian addresses: Characters for the least-significant byte need to be rendered before the most-significant byte; Signed offsets: All offsets in range 0x80..0xff need to be rendered as a negative two's-complement number; It's never very clear how to translate them to .ttx, so in the end I just converted all of the Noto Sans family and used the good ol' fashioned bruteforce approach of "learning by example". An interesting property in the Z80 ISA is that bits and registers have up to 8 variations, and these out-of-order cases only involve offsets and one of those specific operands.

Get the Android app

Or read this on Hacker News

Read more on:

Photo of Z80 Sans

Z80 Sans