Welcome to Squalenet.Net ! - We are the 17/11/2018 ; time is 18:20
Connectés (6) : 6 inconnus
Your Account

Login :
Password :

RegisterPassword Forgotten
Language
Statistics

Chapter 2

Kernel vs Nostub

Chapter 1 Imprimer Chapter 3
Translated by Spectras ; Many thanks to him/her! - Website: http://www.tiwiki.org/

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:

Advantages Drawbacks
  • 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:

Advantages Drawbacks
  • Completely independant (does not require any external program).
  • Smaller memory footprint, especially for small programs.
  • Dynamic linking is only partially supported.
  • Nostub programs are heavily dependant on TI's operating system, and may (and do) break when a major update changes key features of the operating system.

As TIGCC 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.