Skip to content
KeyDB For 8-bit microcomputers
Branch: master
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Type Name Latest commit message Commit time
Failed to load latest commit information.

NoSQL For 8-bit Microcomputers

For when DBase just won't do!

What is this?

The NoSQL database craze has made waves on the mainframe and large computer markets, but so far no software package has been made available for the home hobbyist.

Based upon its bigger brother, KeyDB 8-bit edition brings the power of NoSQL to Z80 microcomputers. Supporting a whopping 240 keys, and a diverse command set of PING, SET, and GET KeyDB 8-bit is sure to satisfy your NoSQL needs.

Does it actually work?

It may be hard to believe but we have indeed fit the power of KeyDB in an 8-bit package. Needing just 32KB of RAM this server supports both get and set commands! Best of all as a NoSQL database, you won't have to type a line of that nasty SQL.

KeyDB 8-bit is able to achieve a whopping 10 queries per second on our 4Mhz Z80!

How do I use it?

KeyDB 8-bit is compiled on a much larger UNIX or Linux machine. For convenience instructions are provided for Debian and Ubuntu distributions. Contact your UNIX vendor for additional information.

Add Dependencies

% sudo apt install z80asm z80ex-dev


The compilation step will assemble both KeyDB itself, and the emulator for local testing. Simply run:

% make


KeyDB 8-bit works with the tools of its larger brother KeyDB and Redis. Running make run will launch an emulated server on the default port. After which you will be able to connect with redis-cli, or even redis-benchmark

% make run

Then on a different terminal:

% ./redis-cli


% ./redis-benchmark -t get -c 1


KeyDB 8-bit is licensed under the Bill Gates License. For more details see the LICENSE file.


KeyDB is designed for our specific IMSAI with its upgraded Z80 CPU card, but porting is trivial for any machine with an 8250. Simply change the ioport at the top of keydb.asm to the base address of your 80250 compatible UART. For more complex machines all IO is routed through the getch and putch routines which can be modified to suit your needs.

Note that KeyDB expects the UART to be initialized before it is started. KeyDB will not modify your baud rate and other settings.

Adding new commands

All new commands are listed in the command table in commands.asm. Be sure to follow the format of other commands. In the table you will add the jump vector for your new routine which you can write in keydb.asm. Your command enters with HL pointing to the argument string. Your command must parse it with validate_arg or strtok.

You can’t perform that action at this time.