yasm


Introduction:

YASM is an assembler program that supports multiple assembler syntaxes,
including NASM and GNU AS, as well as multiple output object formats
and instruction sets.

The assembly step creates an object file. If the assembly code
was a standalone main program, then the assembly process takes
the place of the compilation step of a higher level program, and
the complete compile/load/execute process might look like this:

      yasm -f elf64 hello.asm
      gcc -o hello hello.o
      ./hello
    

Web Site:

The YASM home page:

http://yasm.tortall.net/

Reference:

Usage:

On any ARC cluster, check the installation details
by typing "module spider yasm".

YASM requires that the appropriate modules be loaded before it can
be used. One version of the appropriate commands for use on NewRiver is:

module purge
module load gcc/5.2.0
module load yasm/1.3
    

Examples:

The following batch file applies the YASM assembler to the
file hello.asm:

#! /bin/bash
#
#PBS -l walltime=0:05:00
#PBS -l nodes=1:ppn=1
#PBS -W group_list=newriver
#PBS -q open_q
#PBS -j oe
#
cd $PBS_O_WORKDIR
#
module purge
module load gcc/5.2.0
module load yasm/1.3
#
#  Assemble HELLO.ASM
#
yasm -f elf64 -l hello.lst hello.asm
#
#  Load HELLO.O
#
gcc -o hello hello.o
#
#  Run HELLO.
#
./hello

A complete set of files to carry out a similar process are available in
yasm_example.tar