EasyManua.ls Logo

Texas Instruments TMS34010

Texas Instruments TMS34010
128 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
Loading...
Appendix
E
The
following
assembly language code was produced
by
the
TMS34010
C
compiler from the C routines on the previous pages. The comments were ad-
ded
for
your
convenience.
fll
••
i
•••••••••••••••••••••••••••••••••••••••••••••••••
GSP
C
CO"PILER,
Version
1.04,
86.200
•••••••••••••••••••••••••••••••••••••••••••••••••••••••
FP
.set
AI3
StK
.set
AI4
.
fi
Ie
"foo.c"
.globl
var3
.bss
_var3,32,16
.qlobl
var5
.bss
_.var5,32,16
.globl
_main
1
•••••
1.1
••
1
•••••••••••••
1
••••••••••
1
•••••
11.1
••••••••
I
FUNCTION
OEF
:
_main
1
••••••••••••••
,
••••••••••••••••••••••
1
•••••••••
1
•••••
main:
SP,A7,FP
STK,FP
240,STK
iallocate
space
for
local
variables
Since
the
first
subroutine
call
has
no
parameters
there
is
no
preparation
CALLA
_functionl
ifunction
returns
int
in
A8
"OVE
A8,A7
ireturn
value
in
A8
"OVB
A1,'FP
imake
assignment
to
varl
(IFP(O))
Prepare
for
second
subroutine
call
"OVE
STK,-'SP,1
;Push
the
program
stack
pointer
onto
the
hardware
stack.
This
allows
the
called
routine
to
be
the
one
to
clean
up
the
parameters
and
Its
local
data
area.
This
value
is
simply
loaded
from
the
hardware
stack
back
into
the
system
stack.
;Push
global
variable
var5
onto
stack
iPush
local
variable
var4
onto
stack
iPush
global
variable
var3
onto
stack
iPush
local
variable
var2
onto
stack
"OVE
"OVE
"OVE
"OVE
"OVB
"OVE
CALLA
@_varS,'STK+,1
'FP(48),'STK+,1
@_var3,'STK+,
I
'FP(
16)
'STK+,
I
'FP,A7
A7,'STK+,1
;Push
local
variable
varl
(byte)
onto
stack
function2
Prepare
for
third
subroutine
call
"OVE
STK,-tSP,1
"OVE
IFP(16),'STK+,1
iPush
local
variable
var2
onto
stack
E-3

Table of Contents

Other manuals for Texas Instruments TMS34010

Related product manuals