SDKZSPF LSI, SDKZSPF Datasheet - Page 311

no-image

SDKZSPF

Manufacturer Part Number
SDKZSPF
Description
Manufacturer
LSI
Datasheet

Specifications of SDKZSPF

Lead Free Status / Rohs Status
Supplier Unconfirmed
A.1 Example Program: demo.c
Appendix A
Example Programs
This appendix contains three example programs, demo.c, hw_dbg.s, and
pie.exe, that are referred to in previous chapters of this document, and
a collection of files and scripts that demonstrate various aspects of the
tools in more depth. The first example is a program project that combines
C and assembly-language modules. The second example is a program
used in hardware-assisted debugging. The third demonstrates the use of
zdcc, zdas, zdopt, and zdar in producing an example executable that
shows how in-line assembly and intrinsic functions are coded. It also
shows how to relocate sections of an executable and how inter-section
calls are performed.
This example is a C program in the file demo.c. It calls another C
function, func2, in the file func2.c. It also calls two assembly functions,
func1 and func3, in the assembly file func1.s.
int func_1 (int *t);
void func_2 ();
int func_3 ();
int t=500;
main()
{
ZSP Software Development Kit User’s Guide
Copyright © 1999-2003 by LSI Logic Corporation. All rights reserved.
char ch = ‘A’;
int i,j = 100,k;
for (i=0; i< 2; i++) {
func_2();
k = func_1 (&j);
A-1