Datasheet
100 PSoC Designer IDE Guide, Document # 001-42655 Rev *B
Assembler
The Output Status (or error-tracking) window of Code Editor is where the status of file compiling and
assembling resides. Each time you compile and assemble files, the Output Status window is cleared
and the current status is entered as the process occurs.
Figure 5-1. Output Status Window
When compiling is complete, you the see the number of errors. Zero errors signify that the compila-
tion and assemblage was successful. One or more errors indicate problems with one or more files.
This process reveals syntax errors. Such errors include missing input data
and undeclared
identifier. For a list of all identified compile (and build) errors with solutions see the PSoC
Designer Assembly Language User Guide. For further details on compiling and building see “Build-
ing a Project” on page 103 in this guide.
At any time you can ensure a clean compile and assemble (or build) by accessing Project > Clean,
then clicking the Compile/Assemble or Build icon. The “clean” deletes all lib\libPSoc.a,
obj\*.o, and lib\obj\*.o files. These files are regenerated upon a compile or build (in addition
to normal compile and build activity).
5.8 Calling Assembly Functions From C
When one C function calls another, the compiler uses a simple layout for passing arguments that the
caller and callee use to initialize and the access the values. Although you can use the same layout
when a C function calls an assembly language routine, it is best to use of the alternate fastcall16
calling convention. Fastcall16 is directly supported by the C compiler though use of a pragma direc-
tive and is often more efficient than the convention used by C. In fact, fastcall16 is identical to the C
calling convention except for simple cases when the parameters are passed and/or returned in the
CPU A and X registers. All user module API functions implement the fastcall16 interface for this rea-
son.
There are four conditions to meet when using the fastcall16 interface:
■ The function must be tagged with a C #pragma fastcall16 directive
■ The function needs a C function prototype
■ The assembly function name must be the C function name prefixed with an underscore
character (_).
■ The assembly function name must be exported.