All Projects → KnightOS → Kernel

KnightOS / Kernel

Licence: mit
Kernel for z80 calculators

Programming Languages

assembly
5116 projects

Projects that are alternatives of or similar to Kernel

Insect
High precision scientific calculator with support for physical units
Stars: ✭ 2,469 (+907.76%)
Mutual labels:  calculator
Pdd
📅 Tiny date, time diff calculator with piggybacked timers
Stars: ✭ 218 (-11.02%)
Mutual labels:  calculator
Kconfiglib
A flexible Python 2/3 Kconfig implementation and library
Stars: ✭ 231 (-5.71%)
Mutual labels:  kernel
Numi
Beautiful calculator app for macOS
Stars: ✭ 3,258 (+1229.8%)
Mutual labels:  calculator
Prototype Kernel
Prototyping kernel development work outside mainline
Stars: ✭ 214 (-12.65%)
Mutual labels:  kernel
Kvm Kernel Example
Examples for: Learning KVM - implement your own kernel
Stars: ✭ 221 (-9.8%)
Mutual labels:  kernel
Cparse
A C++ configurable Expression Parser. Useful as a Calculator or for helping you write your own Programming Language
Stars: ✭ 194 (-20.82%)
Mutual labels:  calculator
Rink Rs
Unit conversion tool and library written in rust
Stars: ✭ 242 (-1.22%)
Mutual labels:  calculator
Kernel
The Stupid Operating System
Stars: ✭ 217 (-11.43%)
Mutual labels:  kernel
Manticore
Manticore is a research operating system, written in Rust.
Stars: ✭ 234 (-4.49%)
Mutual labels:  kernel
Application
🏆 A full-stack component-based MVC kernel for PHP that helps you write powerful and modern web applications. Write less, have cleaner code and your work will bring you joy.
Stars: ✭ 205 (-16.33%)
Mutual labels:  kernel
Eduos Rs
A teaching operating system written in Rust
Stars: ✭ 210 (-14.29%)
Mutual labels:  kernel
Hit Linux 0.11
网易云课堂选的操作系统课实验的代码及相关记录
Stars: ✭ 223 (-8.98%)
Mutual labels:  kernel
Literate Calc Mode.el
🧮 Literate programming for M-x calc
Stars: ✭ 201 (-17.96%)
Mutual labels:  calculator
H Encore 2
Fully chained kernel exploit for the PS Vita on firmwares 3.65-3.73
Stars: ✭ 237 (-3.27%)
Mutual labels:  kernel
Wmi Static Spoofer
Spoofing the Windows 10 HDD/diskdrive serialnumber from kernel without hooking
Stars: ✭ 199 (-18.78%)
Mutual labels:  kernel
Jetson easy
🔩 Automatically script to setup and configure your NVIDIA Jetson [Nano, Xavier, TX2i, TX2, TX1, TK1] . This script run different modules to update, fix and patch the kernel, install ROS and other...
Stars: ✭ 219 (-10.61%)
Mutual labels:  kernel
Talks
schedule and materials about my presentations
Stars: ✭ 245 (+0%)
Mutual labels:  kernel
Rux
A hobbyist microkernel written in Rust, featuring a capability-based system similar to seL4.
Stars: ✭ 240 (-2.04%)
Mutual labels:  kernel
Toolchain
Toolchain and libraries for C/C++ programming on the TI-84+ CE calculator series
Stars: ✭ 229 (-6.53%)
Mutual labels:  calculator

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.

Compiling

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+ CSE TI84pCSE
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.

Usage

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"
    .db KEXC_STACK_SIZE
    .dw 20
    .db KEXC_ENTRY_POINT
    .dw start
    .db KEXC_HEADER_END
start:
    pcall(getLcdLock)
    pcall(allocScreenBuffer)
    kld(hl, message)
    ld de, 0
    pcall(drawStr)
    pcall(fastCopy)
    jr $
message:
    .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.

Versioning

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.

Licensing

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

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].