EasyManuals Logo
Home>Texas Instruments>Computer Hardware>TMS34010

Texas Instruments TMS34010 Reference Guide

Texas Instruments TMS34010
181 pages
To Next Page IconTo Next Page
To Next Page IconTo Next Page
To Previous Page IconTo Previous Page
To Previous Page IconTo Previous Page
Page #52 background imageLoading...
Page #52 background image
Runtime
Environment
-
Memory
Model
requirements. The .text, .cinit, and .data sections
are
usually linked into either
ROM or RAM. The .bss section must
be
linked into some type
of
RAM.
For more information about allocating sections into memory,
see
Section 9
(the Linker Description)
of
the TMS34010 Assembly Language Tools User's
Guide.
5.1.2
Stack
Management
The C compiler
uses
two
stacks; Figure 5-1 illustrates these stacks in memory.
T
STACK
SIZE
(defaulfsize
is
200
1
00)
SYS _STACK
array
in
.bss:
A13
(FP)
A14
(STK)
SP
Figure
5-1.
The
Program
and
System
Stacks
The
program
stack
is
used
for
passing parameters
toa
function and
for
allocating the local frame for a function.
The
system
stack
is
used for saving the status
of
the calling function
(that is, for saving the values in registers) and the return address.
The C initialization routine,
boot.
c,
allocates memory
for
both stacks in the
.bss section. This memory is
allocated
as
a single, static array named
SYS-STACK. The
boot
routine defines a constant named
STACK-SIZE
that
determines the size
of
SYS-STACK. The default stack size
is
2000 bytes. You
can change the amount
of
memory that is reserved
for
the stack by
following
these steps:
1)
Extract
boot.
c from the source library
rts.
src.
2) Edit
boot.
c;
change the value
of
the constant
STACK-SIZE
to the de-
sired stack size.
3) Recompile
boot.
c and replace the resulting object file,
boot.
obj,
in
the object library
rts.
lib
4)
Replace the copy
of
boot.
c that's in
rts.
src
with
the edited version.
The
two
stacks
grow
toward each other. The program stack grows from the
bottom
of
the array (the lowest address)
to
higher addresses; the system stack
grows from the top
of
the array (the highest address)
down
to lower ad-
dresses.
Do
not
modify
the way the stacks
grow!
The compiler
uses
three registers to manage the stack:
SP
is
the stack pointer
for
the
system
stack.
A14
(STK)
is
the stack pointer for the
program
stack.
5-3

Table of Contents

Other manuals for Texas Instruments TMS34010

Questions and Answers:

Question and Answer IconNeed help?

Do you have a question about the Texas Instruments TMS34010 and is the answer not in the manual?

Texas Instruments TMS34010 Specifications

General IconGeneral
BrandTexas Instruments
ModelTMS34010
CategoryComputer Hardware
LanguageEnglish

Related product manuals