Skip to content

Turbo Kernel Routines

Overview

The kernel is presently a barebones kernel to run test programs while developing the emulator and the system design. Routines are called using the kcall macro which is available in the tv.inc file. Call names use the values also provided in tv.inc as these map cleanly to the kernel jump table.

The kernel abides by the ABI.

Textmode / Console

Textmode routines assume the user is using the system provided textmode setup. This avoids having to know specific details about the graphics system (VERA). It hand-holds certain things but also means if you do want to do lower level graphics, you will need to use either the lower level kernel calls or manage your own routines to talk to VERA.

This is because things like switching layers, scrolling, etc. can be application dependent.

KERNEL_TEXTMODE_GOTO_XY

Move the cursor to a position the screen.

Register Function
a0 Column (X)
a1 Row (Y)
t0-t1 Clobbered
  • Uses Kernel Variables: CURSOR_COL, CURSOR_ROW
  • Uses Stack: Yes (for ret)

KERNEL_TEXTMODE_PRINT_CHAR

Register Function
a0 Character
t0-t4 Clobbered
  • Uses Stack: No

KERNEL_READ_LINE

KERNEL_TEXTMODE_CLS

KERNEL_TEXTMODE_CURSOR_LEFT

Low-Level Text/Tile-Mode Functions

KERNEL_PRINT_STRING

KERNEL_GOTO_XY

KERNEL_HOME_CURSOR