12.0 C Programming Tips
[12.1] Advantages of TIGCC over TI SDK
There are two options for C programming on the calculators: TI's proprietary SDK, and the
open-source TIGCC. TIGCC cannot be used to develop flash applications, but it has many other
advantages over the SDK:
!
Global and static variables are allowed in RAM programs with TIGCC.
!
Programs can be automatically compressed with TIGCC. This also allows RAM programs of up to
64 KB of uncompressed size rather than just 24 KB.
!
TIGCC is given with a static library called TIGCCLIB which contains functions like most ANSI
stdio.h and stdlib.h functions, grayscale and sprite routines and many more.
!
By default, programs written with TIGCC also run on AMS versions lower than 2.04 without having
to install a memory resident emulation program. As an alternative, starting from TIGCC 0.94, the
AMS 2.04/2.05 only ROM_CALL method used in the SDK is also supported. The SDK only
supports the method incompatible with AMS 2.03 or lower.
!
By default, programs written with TIGCC also work on AMS 1, while SDK programs often fail to
work even with an emulation program because they use ROM_CALLs available on AMS 2 only.
SDK programs even sometimes use ROM_CALLs only introduced in AMS 2.04 or 2.05. Starting
from TIGCC 0.94, TIGCC now optionally allows the programmer to use those functions if they wish
to abandon AMS 1 compatibility, but does not force him to do so.
!
TIGCC is a port of GCC 3, so you get GCC specific features such as GNU C extensions with it.
!
Starting from TIGCC 0.94, TIGCC supports passing arguments to functions by registers rather than
on the stack as an option. This can create smaller and faster code and make it easier to interface
with existing assembly code.
!
TIGCC supports third-party static libraries, and a few of those have already been written, such as
ExtGraph by Thomas Nussbaumer.
!
TIGCC also allows you to program in assembly (not just inline assembly), and you even have the
choice between 2 different assemblers.
!
TIGCC also allows you to write kernel-based programs, including dynamic libraries and programs
which use them (even though I do not recommend to use this feature).
(Credit to Kevin Kofler)
[12.2]
Use C function in expressions with AMS 2.05
AMS 2.05 does not allow using C programs in expressions, as TI Basic functions can be used. If
cprgm() is a C program, this won't work:
cprgm(5)+1
→
var
This is a severe, unnecessary limitation, and TI would be wise to fix it. This seems unlikely since it still
exists. However, there is a user hack called IPR, which fixes the problem. Get it, with documentation,
at
10 - 1
Summary of Contents for TI-92+
Page 52: ...Component side of PCB GraphLink I O connector detail 1 41...
Page 53: ...LCD connector detail PCB switch side 1 42...
Page 54: ...Key pad sheet contact side Key pad sheet key side 1 43...
Page 55: ...Key cap detail 1 44...
Page 57: ...Component side of PCB with shield removed A detail view of the intergrated circuits 1 46...
Page 410: ...void extensionroutine2 void Credit to Bhuvanesh Bhatt 10 4...