Kernel Vs Nostub

This article is under construction and needs to be completed. You can help by expanding it.

Taken from

Translated by Spectras ; Many thanks to him - Website:
I:\ About kernel and nostub modes

Programming on Texas Instruments calculators has long been a tedious task, due to the numerous obstacles TI had put in their system. Back in the old days of TI programming (in the late 90s), a specific software and hardware protection made it impossible to run programs, but very small pieces of opcodes. To do it anyway, one had to install a special piece of software called a kernel, that made it possible for other programs to run. This is no longer true, however, as standalone programs were made possible since. Those programs are called nostub, because they do not include a stub, a litlle piece of code that used to invoke the kernel. Still, kernels are still widely used, for they provide a bunch of useful additional features, and can recover some crashes.
II:\ "Kernel vs Nostub"

Both modes have advantages and drawbacks, and which one is better than the other is a religious issue that has led to many flamewars in the past, and is not going to stop in the near future, if ever. We will try to do a short summary here, though doing so will probably bring loads of flame roaming into my mailbox, from both parties.

Kernel Mode

  • Allows transparent dynamic linking.
  • Adds independence to the OS installed, and some commonly used functions that miss from TIOS.
  • Protects and recovers from common crashes.
  • Needs the kernel to be installed before one can run your program.
  • In case one uses dynamically linked libraries improperly, can decrease dramatically the memory available when the program is running.

Nostub mode

  • Completely independent (does not require any external program).
  • Smaller memory footprint, especially for small programs.
  • Dynamic linking is only very partially supported. The DLL support is much less powerful than that of kernels.
  • Nostub programs are heavily dependent on TI's operating system, and may (and do) break when a major update changes key features of the operating system.

As TIGCC & GCC4TI IDE default mode is nostub, we will work in nostub mode in this tutorial, though a few chapters will be about kernel-mode specifics. Those chapters will be clearly marked as such.

This chapter concludes our introduction to TI calculator programming environment. Next one will add more C background, then chapter 5 will begin the real thing.