man ilasm.pnet (Commandes) - the Intermediate Language (IL) assembler

NAME

ilasm - the Intermediate Language (IL) assembler

SYNOPSIS

ilasm [ options ] input.il ...

DESCRIPTION

Ilasm converts Intermediate Language (IL) assembly code input into an IL object file (.obj), an IL executable (.exe), or an IL dynamic link library (.dll). The Texinfo documentation for ilasm describes the assembly code syntax.

You normally won't need to invoke ilasm directly, because it is invoked automatically by the cscc(1) compiler. However, if you are building your own compiler for the Portable.NET platform, then you may need to invoke this program.

Ilasm reads the supplied input files, assembles them, and writes the output to the file specified by the `-o' option, or to a default filename derived from the name of the first input file. If any of the input filenames are `-', then the standard input stream will be used. If `-' is specified multiple times, then standard input will be parsed only once.

Specifying multiple input files is exactly the same as specifying one input file which is the concatenation of all of the files. Only one output file is created. Ilasm must be invoked multiple times to assemble multiple input files into multiple output files.

OPTIONS

-o FILE, --output FILE
Specify the name of the file to write the assembler output to. The default is "input.EXT" where "EXT" is one of "obj", "exe", or "dll", depending on the value of the --format option. If there are multiple input files, then the name of the output file is based on the name of the first input file. If the first input file is `-', then the output is written to standard output. If FILE is `-', then the output is written to standard output.
-j, --format obj
Write a ".obj" file as output, instead of an executable or dynamic link library. This is the default value.
-e, --format exe
Write an executable file as output, instead of a ".obj" file or dynamic link library.
-d, --format dll
Write a dynamic link library file as output, instead of a ".obj" file or executable.
-g, --debug
Enable the generation of debug symbol information to the output file.
-n, --no-debug
Disable the generation of debug symbol information to the output file. This is the default value.
-s, -fshort-insns
Always use the shortest version of an instruction when creating the output. Some instructions have multiple versions. e.g. "br" and "br.s" for long and short versions of the branch instruction. The assembler will attempt to "squash" the instructions to occupy as little space as possible. This is the default value.

When this option is in force, the compiler does not need to concern itself with choosing the most compact form of an instruction, because the assembler will do the work. Long instructions will be converted into shorter versions whenever possible, and short instructions will be converted into longer versions if required. Compiler code generators can therefore be much simpler.

-l, -fno-short-insns
Always use the stated version of an instruction when creating the output. For example, "br" will always generate a 5-byte branch instruction, and "br.s" will always generate a 2-byte branch instruction. If the branch is too long, then using "br.s" will result in an error.

The only reason to use this is to ensure that the form of instruction that is output by the ildasm(1) disassembler is the same as the form of instruction that was input to ilasm. This may be helpful when attempting to diagnose compiler problems.

-L NAME, -fstdlib-name=NAME
Change the name of the standard library to NAME. The default value is "mscorlib".
-J, -mjvm
Assemble to JVM bytecode instead of IL.
-3, -m32bit-only
Tag the output file so that it can only be executed on 32-bit platforms.
-c, -mcui-subsystem
Tag the output file so that it can run within the command-line subsystem under Windows. This is the default.
-G, -mgui-subsystem
Tag the output file so that it can run within the GUI subsystem under Windows.
--help
Print a usage message for the ilasm program.
-v, --version
Print the version of the ilasm program.
--
Marks the end of the command-line options, and the beginning of the input filenames. You may need to use this if your filename begins with '-'. e.g. "ilasm -- -input.il". This is not needed if the input is stdin: "ilasm -" is perfectly valid.

OWNERSHIP OF OUTPUT

The source code for ilasm is covered by the GNU General Public License (GPL). Any modifications to the source must be redistributed under the terms of the GPL.

There is a special exception for the output of the assembler. If you use ilasm to assemble your own program, then you also own the object file, executable, or dynamic link library that is output. You may redistribute the output in any way you see fit. This does not give you ownership over ilasm itself: only the output.

Authors of non-free software can use ilasm to assemble their programs, without being forced to release their source code. However, if authors of non-free software modify ilasm and then assemble their program with the modified version, they must redistribute their modifications to ilasm under the terms of the GPL.

Contact the authors if you have any questions on the ownership of your programs when ilasm is used to assemble them.

AUTHOR

Written by Southern Storm Software, Pty Ltd.

http://www.southern-storm.com.au/

SEE ALSO

DIAGNOSTICS

Exit status is 1 if an error occurred while processing the input. Otherwise the exit status is 0.

BUGS

The parser is fairly unforgiving of errors and will bail out at the first sign of trouble. This is not expected to be a problem because ilasm will normally be processing the output of a compiler such as cscc(1). Compilers are presumed to be aware of how to generate correct IL assembly code.

Ilasm uses the host's native C types `float' and `double' to handle floating point numbers. If the host does not have a strict IEEE floating point implementation, then the values of floating point constants may not be exactly what was expected. The problem can be avoided by using the raw bit forms, which are guaranteed to produce exact IEEE-compliant values.