Keyboard shortcuts

Press or to navigate between chapters

Press S or / to search in the book

Press ? to show this help

Press Esc to hide this help

TTY

This document describes the TTY (teletype) subsystem in the Kyronix kernel. It is the child of Drivers.

Source

kernel/drivers/tty.c, kernel/drivers/vt.c

Overview

The TTY subsystem provides terminal I/O with support for multiple virtual terminals. It handles character buffering, line editing, and ANSI escape sequence processing.

Components

ComponentSourceDescription
TTYtty.cTerminal I/O and line discipline
Virtual TTYvt.cVirtual terminal switching

Features

  • Line buffering with echo
  • ANSI escape sequence parsing (colors, cursor movement)
  • Multiple virtual terminals (switched via keyboard)
  • SIGINT (Ctrl+C), SIGQUIT (Ctrl+) generation
  • Cursor blink timer

Functions

FunctionDescription
tty_putchar(c)Output a character to the current terminal
tty_check_signals()Check for terminal-driven signals

Signal Generation

KeySignalDescription
Ctrl+CSIGINTInterrupt
Ctrl+\SIGQUITQuit
Ctrl+ZSIGTSTPTerminal stop

Last reviewed: 2026-07-22