/* $VER: pasm version.c V0.8 (14.02.98)
 *
 * This file is part of pasm, a portable PowerPC assembler.
 * Copyright (c) 1997-98  Frank Wille
 *
 * pasm is freeware and part of the portable and retargetable ANSI C
 * compiler vbcc, copyright (c) 1995-98 by Volker Barthelmann.
 * pasm may be freely redistributed as long as no modifications are
 * made and nothing is charged for it. Non-commercial usage is allowed
 * without any restrictions.
 * EVERY PRODUCT OR PROGRAM DERIVED DIRECTLY FROM MY SOURCE MAY NOT BE
 * SOLD COMMERCIALLY WITHOUT PERMISSION FROM THE AUTHOR.
 *
 *
 * v0.7 (02.01.98) phx
 *      Option -O (output format) was renamed to -F. New option -O for
 *      enabling optimizations. Changed "1997" to "1997-98".
 *      Output format 3 is ADOS (like EHF, but doesn't use HUNK_PPC_CODE).
 * v0.6 (30.10.97) phx
 *      Description for option -R was changed from "don't predefine
 *      standard symbols" into "don't predefine register symbols".
 *      Options to disable warnings for optional, 64-bit and super-
 *      visor instructions: -mo, -m64, -ms.
 * v0.5 (12.10.97) phx
 *      New option -D to define a symbol.
 * v0.4 (02.07.97) phx
 *      -V prints only version and build string and no instructions. New
 *      function show_version().
 *      Base address for absolute code may be set with -B option.
 *      New option -I to specify some include paths.
 *      Option -x automatically declares unknown symbols as
 *      externally defined.
 * v0.3 (26.03.97) phx
 *      New option -O to select output file format.
 * v0.2 (25.03.97) phx
 *      Writes ELF object for 32-bit PowerPC big-endian. Either absolute
 *      or ELF output format may be selected. ELF is default for all
 *      currently supported platforms. PPCasm supports nine different
 *      relocation types (there are much more...).
 *      Compiles and works also under NetBSD/amiga (68k).
 *      Changed function declaration to 'new style' in all sources
 *      (to avoid problems with '...' for example).
 * v0.1 (11.03.97) phx
 *      First test version with all PowerPC instructions and most
 *      important directives. Only raw, absolute output.
 * v0.0 (14.02.97) phx
 *      File created. Project started.
 */


#define VERSION_C
#include "ppcasm.h"


void show_version(void)
{
  printf(PNAME " V%d.%02d (" MACHINE ")  (c)1997-98 by Frank Wille\n"
         "build date: " __DATE__ ", " __TIME__ "\n\n"
         ,VERSION,REVISION);
}


void show_usage(void)
{
  show_version();

  printf("usage: " PNAME " [?][-V][-o <file>][-I <path>][-D <sym>[=<exp>]]"
         "[-w][-x][-R][-X][-F <n>][-B <addr>][-m64|s|o][-O <level>] <file>\n"
         "<file>           PowerPC source text to assemble\n"
         "-V               print version identification and build string\n"
         "-o <file>        output file name\n"
         "-I <path>        add include path\n"
         "-D <sym>[=<exp>] define a symbol\n"
         "-w               suppress warnings\n"
         "-x               undefined symbols are automatically external\n"
         "-R               don't predefine register symbols\n"
         "-X               no extended mnemonics\n"
         "-F <n>           set output format (0=abs, 1=elf, 2=ehf, 3=ados)\n"
         "-B <address>     base address for absolute output\n"
         "-m64             enable 64-bit instructions\n"
         "-ms              enable supervisor instructions\n"
         "-mo              enable optional instructions\n"
         "-O <level>       enable optimizations\n"
         );
}
