Want to take your software engineering career to the next level? Join the mailing list for career tips & advice Click here


Kernel for z80 calculators

Subscribe to updates I use kernel

Statistics on kernel

Number of watchers on Github 171
Number of open issues 2
Average time to close an issue 3 months
Main language Assembly
Average time to merge a PR 4 days
Open pull requests 3+
Closed pull requests 8+
Last commit almost 3 years ago
Repo Created about 7 years ago
Repo Last Updated over 2 years ago
Size 7.86 MB
Homepage http://www.knight...
Organization / Authorknightos
Page Updated
Do you use kernel? Leave a review!
View open issues (2)
View kernel activity
View on github
Fresh, new opensource launches 🚀🚀🚀
Software engineers: It's time to get promoted. Starting NOW! Subscribe to my mailing list and I will equip you with tools, tips and actionable advice to grow in your career.
Evaluating kernel for your project? Score Explanation
Commits Score (?)
Issues & PR Score (?)

KnightOS Kernel

The KnightOS kernel is a kernel for Texas Instruments calculators. It offers many unix-like features for z80 systems, including:

  • A tree-based filesystem
  • Multitasking (up to 32 concurrent processes)
  • Dynamic memory management

This kernel is the basis of KnightOS, which is a good resource for others hoping to implement a userspace.

This project is only useful to systems programmers. Please look into KnightOS instead if you are not a systems programmer.


If you have a pre-compiled kernel image, skip this section.

The toolchain for the kernel was built mostly from scratch, since old z80 tools are, well, old. The new toolchain supports a lot of the kernel's needs on newer platforms, and works well on Linux, Mac, and Windows. You'll need to install:

genkfs is only strictly neccessary if you hope to build a userspace on top of the kernel. On Windows, install Cygwin and perform the build from there. Windows users should install sass into their %PATH%.

The kernel needs to be rebuilt for any system you'd like to target (different calculator models). For each supported calculator model, use the given make target:

Model make Target
TI-73 TI73
TI-73 Explorer TI73
TI-83+ TI83p
TI-83+ SE TI83pSE
TI-84+ TI84p
TI-84+ SE TI84pSE
TI-84 Pocket.fr TI84p
TI-84 Plus Pocket SE TI84pSE

Simply run make [target] to build the kernel. The default target, when omitted, is TI84pSE. This will produce a kernel image in the bin/ directory. This will also generate a kernel.inc file, which you can use to link your userspace with the kernel. Run make clean before trying to switch platforms.


The kernel does not do anything on its own. Instead, it forms the basis for more complex systems. Upon booting, the kernel loads up the filesystem and runs /bin/init. You need to provide this init program yourself. Here is a simple example init program, which can be assembled with the assembler of your choice:

#include "kernel.inc"
    ; Program header
    .db "KEXC"
    .dw 20
    .dw start
    kld(hl, message)
    ld de, 0
    jr $
    .db "Hello, userspace!", 0

When you compile the kernel, you'll get a ROM file with an empty filesystem. To build the filesystem, you will need to make an example on your own system to build it from. Then, you can use genkfs to generate and write a filesystem to the ROM. If you wish to build an OS upgrade that you can send to your calculator, use mktiupgrade.

When you build the kernel, in addition to the ROM file, you will receive a kernel upgrade file (this will be the .73u, .8xu, or .8cu file in the output directory). This can be used on any KnightOS system to upgrade the kernel without touching the userspace filesystem.

Kernel API

The kernel offers an API to userspace to interact with things like threads, memory, hardware, the filesystem, and more. The API is documented through special comments in the source code, which are extracted to generate the online API reference.


The kernel uses semantic versioning. Version numbers are indicated by the latest git tag, and take the form of major.minor.patch. Patch is updated when bugs are fixed and for very minor changes. Minor is updated for new features and major non-breaking changes. Major is updated with breaking changes. When you compile your kernel, the kernel version (as an ASCII string) will be written to address 0x64 on page 0x00.

If you are working with a kernel that is not built from a major release, you will have a sligthly different kernel version. Appended to the version will be -nn-hhhhhhhh. nn is the number of commits that have been made since your kernel release. hhhhhhhh is the git shorthash of the commit you're currently on. A + will be appended to this if your working directory is dirty.

Getting Help

You're free to ask questions about the kernel (or the userspace) in #knightos on irc.freenode.net. We're not always listening, so stick around - it may be a while before your question is answered.

Help, Bugs, Feedback

If you need help with KnightOS, want to keep up with progress, chat with developers, or ask any other questions about KnightOS, you can hang out in the IRC channel: #knightos on irc.freenode.net.

To report bugs, please create a GitHub issue or contact us on IRC.

If you'd like to contribute to the project, please see the contribution guidelines.


The kernel uses the permissive MIT license. It permits use and modification in most scenarios, including commercial.

kernel open pull requests (View All Pulls)
  • Color images
  • Refactor kernel memory usage
  • Detect minimum kernel version
kernel questions on Stackoverflow (View All Questions)
  • Do Linux kernel processes multithread?
  • "Kernel panic" in loading and devtmpfs mounting error into craneboard(am3517_crane)
  • Changing the size of the array in an OpenCL kernel
  • Signal on Kernel parameter change
  • CUDA matrix vector multiplication kernel issues
  • CUDA PTX, driver api - how to get global variable from kernel after execution
  • WorkQueue implementation in Linux Kernel
  • CUDA : Bad performance when allocating heap inside kernel
  • ManagedCuda: IllegalAddress; While Executing a Kernel
  • How to statically build kernel module with buildroot?
  • how to start a process under kernel debugging on windows?
  • Copy function from user space to kernel and execute
  • Kernel build for CentOS 7: kernel-firmware not generated
  • Modify VBO data from OpenCL kernel
  • There alawys has complile error when compile the latest kernel in ubuntu,as follow
  • Explanation of Isotropic Kernel
  • EMV Kernel for CLess Interac card?
  • How / Where to find Linux Kernel Bugs to Fix?
  • why can I enable PCIe MSI on ubuntu 15.04(kernel 3.19.0-42-generic)
  • When I add the option net.ifnames=0 biosdevname=0 in kernel command, the IP route is wrong
  • Linux Kernel Modules between different kernel patches
  • How to check kernel version in Makefile
  • Cannot load my OS kernel
  • How to write a BitBake driver recipe which requires kernel source header files?
  • Systemtap does't show all the local variables in a kernel function
  • Jupyter R kernel crashes
  • How do you get normalized devices coordinates into Apple's Metal kernel functions?
  • Kernel recognizes virtual disks on Azure both as hda and sda
  • Disable kernel tracer
  • Does User space/Kernel Space exist in RTOS?
kernel list of languages used
More projects by KnightOS View all
Other projects in Assembly