| RGBASM(1) | General Commands Manual | RGBASM(1) |
rgbasm —
Game Boy assembler
rgbasm |
[-EhLVvw] [-b
chars] [-D
name[=value]]
[-g chars]
[-i path]
[-M depend_file]
[-o out_file]
[-p pad_value]
[-r recursion_depth]
[-W warning]
file ... |
rgbasm program creates an RGB object file from an
assembly source file. The input file can be a file path,
or - denoting stdin.
Note that options can be abbreviated as long as the abbreviation
is unambiguous: --verb is
--verbose, but
--ver is invalid because it
could also be --version. The
arguments are as follows:
-b
chars,
--binary-digits
chars-D
name[=value],
- -define
name[=value]name EQUS
"value"’ in code, or
‘name EQUS
"1"’ if value is not
specified.-E,
--export-all-g
chars,
--gfx-chars
chars-h,
--halt-without-noprgbasm inserts a
nop instruction immediately after any
halt instruction. The -h
option disables this behavior.-i
path,
--include
path-L,
--preserve-ldLD
[$FF00+n8],A into the opcode LDH
[$FF00+n8],A in order to have full control of the result in the
final ROM.-M
depend_file,
--dependfile
depend_file-o
out_file,
--output
out_file-p
pad_value,
--pad-value
pad_value-r
recursion_depth,
--recursion-depth
recursion_depth-V,
--version-v,
--verbose-W
warning,
--warning
warning-w-Werror-Werror=-Werror=obsolete), and this warning is
implicitly enabled and turned into an error. This is an error if used with
a meta warning, such as -Werror=all.The following warnings are “meta” warnings, that enable a collection of other warnings. If a specific warning is toggled via a meta flag and a specific one, the more specific one takes priority. The position on the command-line acts as a tie breaker, the last one taking effect.
-Wall-Wextra-WeverythingThe following warnings are actual warning flags; with each
description, the corresponding warning flag is included. Note that each of
these flag also has a negation (for example,
-Wempty-entry enables the warning that
-Wno-empty-entry disables). Only the non-default
flag is listed here. Ignoring the “no-” prefix, entries are
listed alphabetically.
-Wno-assertWARN-type
assertions fail. (See “Aborting the assembly process” in
rgbasm(5) for ASSERT).-Wbuiltin-argsSTRSUB() with indexes outside of the string's
bounds. This warning is enabled by -Wall.-Wdiv-Wempty-entrydb,
dw, dl list. This warning
is enabled by -Wextra.-Wlarge-constant-Wall.-Wlong-string-Wall.-Wobsoletejp [hl]
instruction or HOME section type are encountered.
This warning is enabled by -Wextra.-Wshift-Wshift-amount-Wno-truncationdb)
loses some bits.-Wno-userWARN built-in is executed. (See
“Aborting the assembly process” in
rgbasm(5) for WARN).Straightforward way:
$ rgbasm -o bar.o
foo.asmPipes way:
$ cat foo.asm | rgbasm -o bar.o
-$ rgbasm -o bar.o - <
foo.asmThe resulting object file is not yet a usable ROM image—it must first be run through rgblink(1) and then rgbfix(1).
rgbasm was originally written by Carsten Sørensen
as part of the ASMotor package, and was later packaged in RGBDS by Justin
Lloyd. It is now maintained by a number of contributors at
https://github.com/rednex/rgbds.
| July 8, 2019 | General |