.\"Made with Love
.TH M1 1 "JULY 2019" Linux "User Manuals"
.SH NAME

M1 \- The universal Macro assembler

.SH SYNOPSIS
.na

M1 --architecture ARCHITECTURE --file FILE [--output FILE --octal    --binary --big-endian --little-endian]

.SH DESCRIPTION

M1 is the most minimal cross-platform macro assembler possible
.br

Leveraging a few grammar details to provide the user with a
rich vocabulary of ways of expressing their desired output
and input; thus eliminating surprise from the generation
process.
.br
At it's core is DEFINE MACRO EXPANDED
.br
Where one can define an assembly instruction like:
DEFINE INT_80 CD80
and know that everywhere INT_80 is placed in the input
file there will be the hex encoding of that instruction
in the output file or if no output file is specified the
output will be send to standard out.
.br

The supported ARCHITECTURES are as follows: knight-native,
knight-posix, x86, amd64, armv7l and aarch64.
If you fail to specify an architecture, the default of knight-native
will be used.
.br

M1 also supports the generation of 8, 16 and 32bit integers
provided they are encoded as !NUM, @NUM or %NUM respectively.
eg !-1, @42 and %8675309
You however can not mix integers with definitions as macros
are always applied first and will not be evaluated further.

Should you wish to specify the bit and byte encoding of the
integers to match your target --big-endian and --little-endian

Should you wish for the output to be something other than hex
format, you can specify the exact output you desire with:
--octal or --binary

.SH EXAMPLES

Typically, M1 will be called in scripts used in bootstrapping
.br
# M1 -f x86.defs -f libc-core.M1 -f cc.M1 -f cc-footer.M1             --little-endian --architecture x86 -o cc.hex2
.br

.SH COMPATIBILITY

M1 is compatible with all Turing complete machines;
even the ones that try to be Turing complete -1

.SH AUTHORS
Jeremiah Orians <Jeremiah@pdp10.guru>
.br
Jan (janneke) Nieuwenhuizen <janneke@gnu.org>

.SH COPYRIGHT
Copyright 2016-2019 Jeremiah Orians <Jeremiah@pdp10.guru>
.br
Copyright 2017 Jan Nieuwenhuizen <janneke@gnu.org>
.br
License GPLv3+.

.SH "SEE ALSO"
hex2(1), blood-elf(1), kaem(1), syscalls(2)
