Chapter 4 Software Development
page 4-22
(4) #asm and #endasm
These two directives enclose an in-line assembly language block, which the compiler simply
passes to the assembler. The sample firmware uses them in read_fifo() and write_fifo(), the
functions for reading from and writing to USB controller buffers, and in extint1(), extint4(), and
extint5(), the functions for switching register banks in response to an external interrupt from the
USB controller.
For further details on this assembly language code, refer to the nX-8/500S Instruction Manual
(Nx8_500s.pdf).
(5) __accpass
This modifier changes the function calling sequence to pass one parameter in the accumulator.
Note that the compiler's /REG command line option makes this the default for all functions
without an overt __noacc modifier.
(6) __noacc
This modifier overrides __accpass and the compiler's /REG command line option to pass all
parameters on the stack. This is required for standard library functions, so always include the
header files containing the function prototypes. It also applies to the low-level I/O functions
read() and write() called by the standard library functions.
Note that incompatible __accpass and __noacc specifications between compile units produces a
program that runs out of control.
4-3-9. Limitations
(1) As of August 1999, sample firmware operation has been confirmed only for the MSM66Q573
plus ML60851C combination. The ARM code is a preliminary version that does not compile.
(2) The sample firmware has been compiled and tested only with the cc665s compiler only in the
small models. Other memory models have not been tested.