| |||||
On-Line Manuals C166 User's Guide | Interfacing C to AssemblerYou can easily interface your C programs to routines written in XC16x/C16x/ST10 assembly language. The A166 Assembler is a macro assembler that emits object modules in OMF166 format. By following a few programming rules, you can call assembly routines from C and vice versa. Public variables declared in the assembly module are available to your C programs. There are several reasons to call an assembly routine from your C program.
This section describes how to write assembly routines that can be directly interfaced to C programs. For an assembly routine to be called from C, it must be aware of the parameter passing and return value conventions used in C functions. For all practical purposes, the assembly routine must appear to be a C function. | ||||
| |||||