Syntax
-s-
Description
C code requires a small startup file containing system initialization code to be executed before entering main. The standard startup code is found in the object file $(InstallDir)/lib/crt0.hzo and the compiler driver automatically links this into your program. If, however, you do not require the standard startup code because you have a pure assembly language application, you can request the compiler driver to exclude this standard startup code from the link using the -s- option.
You will find the source code for the standard startup module crt0 in the file $(InstallDir)/src/crt0.asm.
Setting this in CrossStudio
To exclude the standard startup code for a project:
- Select the project in the Project Explorer.
- In the Linker Options group set the Include Startup Code property to No.
Example
To instruct the compiler to assemble file1.asm and file2.asm into app.hzx and not link the standard startup code:
hcl file1.asm file2.asm -s- -o app.hzx