23
TI
-
89 / TI
-
92 Plus Developer Guide
Not for Distribution
Beta Version January 26, 2001
5. Flash Applications vs. ASM Programs
Flash Application ASM Program
Resides in
protected Flash memory
— The
Flash memory occupied by the OS
and applications is protected from
inadvertent or malicious changes.
RAM or archive Flash memory
—
ASM programs can be archived but
must execute in RAM.
Executes in
protected Flash memory
— Flash
apps are executed in place, i.e., the
app does not need to be moved to
RAM before it can be executed.
RAM
— ASM programs can only be
executed in RAM. Calculator
hardware does not allow 68000
instructions to execute in archive
memory. The OS makes a temporary
RAM copy of an archived ASM
program before executing it.
Size
≤
4 MB
— Flash apps are limited by
the amount of free Flash memory but
can be no bigger than 4 MB.
≤
24 KB
— The current version of the
heap manager cannot allocate any
chunk of memory larger than 64 KB.
The lower 24 KB limit is part of the
antipiracy mechanism.
Data segment
Yes
— The OS allocates a data
segment for each application.
Applications can define and reference
global and static variables any of
which may have an initial value.
No
— ASM programs must allocate
variables on the stack or within the
code segment. This is not difficult in
assembly language but C never
allocates static/global variables in the
code segment.
Copy protection
Yes
— A Flash application can only
be installed in calculators that have a
license for the software. All
calculators come with a
freeware/shareware key which allow
freeware/shareware applications to
be installed without an additional
license.
None
— ASM programs can be freely
copied between calculators.
O
menu
Yes
— Interactive Flash applications
appear on the
O
menu.
No
— ASM programs are not
full-fledged applications. They can
only be called from TI
-
BASIC as
subprograms or from the Home
screen author line.
User interaction
Event driven
— Flash applications
participate in cooperative multitasking
through the OS. The OS provides
default behavior for many of the
special keys such as
O
,
3
and
function keys.
Polled
— ASM programs must poll
the keyboard to receive input from the
user. No other applications can run
until the ASM program returns to the
OS. ASM programs do not get any
automatic behavior for special keys
on the keyboard.