mirror of
https://github.com/gbdev/rgbds.git
synced 2025-11-29 06:17:48 +00:00
@@ -51,9 +51,9 @@ The defaults are 01.
|
||||
.It Fl D Ar name Ns Oo = Ns Ar value Oc , Fl Fl define Ar name Ns Oo = Ns Ar value Oc
|
||||
Add a string symbol to the compiled source code.
|
||||
This is equivalent to
|
||||
.Ql Ar name Ic EQUS Qq Ar value
|
||||
.Ql Ar name Ic EQUS \(dq Ns Ar value Ns \(dq
|
||||
in code, or
|
||||
.Ql Ar name Ic EQUS Qq 1
|
||||
.Ql Ar name Ic EQUS \(dq1\(dq
|
||||
if
|
||||
.Ar value
|
||||
is not specified.
|
||||
@@ -153,7 +153,9 @@ prefix, entries are listed alphabetically.
|
||||
Warns when
|
||||
.Ic WARN Ns No -type
|
||||
assertions fail. (See
|
||||
.Xr rgbasm 5 "Aborting the assembly process"
|
||||
.Dq Aborting the assembly process
|
||||
in
|
||||
.Xr rgbasm 5
|
||||
for
|
||||
.Ic ASSERT ) .
|
||||
.It Fl Wbuiltin-args
|
||||
@@ -182,37 +184,40 @@ This warning is enabled by
|
||||
Warn when obsolete constructs such as the
|
||||
.Ic jp [hl]
|
||||
instruction or
|
||||
.Cm HOME
|
||||
.Ic HOME
|
||||
section type are encountered.
|
||||
This warning is enabled by
|
||||
.Fl Wextra .
|
||||
.It Fl Wshift
|
||||
Warn when shifting triggers C undefined behavior, potentially causing unpredictable behavior.
|
||||
Shfting behavior will be changed and this warning removed before next release.
|
||||
Warn when shifting right a negative value.
|
||||
Use a division by 2^N instead.
|
||||
.It Fl Wshift-amount
|
||||
Warn when a shift's operand is negative or greater than 32.
|
||||
.It Fl Wno-truncation
|
||||
Warn when an implicit truncation (for example,
|
||||
.Ic db )
|
||||
loses some bits.
|
||||
.It Fl Wno-user
|
||||
Warns when the
|
||||
Warn when the
|
||||
.Ic WARN
|
||||
built-in is executed. (See
|
||||
.Xr rgbasm 5 "Aborting the assembly process"
|
||||
.Dq Aborting the assembly process
|
||||
in
|
||||
.Xr rgbasm 5
|
||||
for
|
||||
.Ic WARN ) .
|
||||
.El
|
||||
.Sh EXAMPLES
|
||||
You can assemble a source file in two ways.
|
||||
Straightforward way:
|
||||
.Pp
|
||||
.Bd -literal -offset indent
|
||||
$ rgbasm -o bar.o foo.asm
|
||||
.Ed
|
||||
Straightforward way:
|
||||
.Dl $ rgbasm -o bar.o foo.asm
|
||||
.Pp
|
||||
Pipes way:
|
||||
.Dl $ cat foo.asm | rgbasm -o bar.o -
|
||||
.Dl $ rgbasm -o bar.o - < foo.asm
|
||||
.Pp
|
||||
.Bd -literal -offset indent
|
||||
$ cat foo.asm | rgbasm -o bar.o -
|
||||
$ rgbasm -o bar.o - < foo.asm
|
||||
.Ed
|
||||
.Pp
|
||||
The resulting object file is not yet a usable ROM image \(em it must first be run through
|
||||
The resulting object file is not yet a usable ROM image\(emit must first be run through
|
||||
.Xr rgblink 1
|
||||
and then
|
||||
.Xr rgbfix 1 .
|
||||
|
||||
1523
src/asm/rgbasm.5
1523
src/asm/rgbasm.5
File diff suppressed because it is too large
Load Diff
85
src/doc_postproc.awk
Executable file
85
src/doc_postproc.awk
Executable file
@@ -0,0 +1,85 @@
|
||||
#!/usr/bin/awk -f
|
||||
|
||||
/^\s+<td><b class="Sy">.+<\/b><\/td>$/ {
|
||||
# Assuming that all cells whose contents are bold are heading cells,
|
||||
# use the HTML tag for those
|
||||
sub(/td><b class="Sy"/, "th");
|
||||
sub(/b><\/td/, "th");
|
||||
}
|
||||
|
||||
BEGIN {
|
||||
in_synopsis = 0
|
||||
}
|
||||
/<table class="Nm">/ {
|
||||
in_synopsis = 1
|
||||
}
|
||||
/<\/table>/ {
|
||||
# Resets synopsis state even when already reset, but whatever
|
||||
in_synopsis = 0
|
||||
}
|
||||
/<code class="Fl">-[a-zA-Z]/ {
|
||||
# Add links to arg descr in synopsis section
|
||||
if (in_synopsis) {
|
||||
while (match($0, /<code class="Fl">-[a-zA-Z]+/)) {
|
||||
# 123456789012345678 -> 18 chars
|
||||
optchars = substr($0, RSTART + 18, RLENGTH - 18)
|
||||
i = length(optchars)
|
||||
while (i) {
|
||||
end = RSTART + 18 + i
|
||||
i -= 1
|
||||
len = i ? 1 : 2
|
||||
$0 = sprintf("%s<a href=\"#%s\">%s</a>%s",
|
||||
substr($0, 0, end - len - 1),
|
||||
substr($0, end - 1, 1),
|
||||
substr($0, end - len, len),
|
||||
substr($0, end))
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
/<div class="Nd">/ {
|
||||
# Make the description blurb inline, as with terminal output
|
||||
gsub(/div/, "span")
|
||||
}
|
||||
|
||||
BEGIN {
|
||||
pages["gbz80", 7] = 1
|
||||
pages["rgbds", 5] = 1
|
||||
pages["rgbds", 7] = 1
|
||||
pages["rgbasm", 1] = 1
|
||||
pages["rgbasm", 5] = 1
|
||||
pages["rgblink",1] = 1
|
||||
pages["rgblink",5] = 1
|
||||
pages["rgbfix", 1] = 1
|
||||
pages["rgbgfx", 1] = 1
|
||||
}
|
||||
/<a class="Xr">/ {
|
||||
# Link to other pages in the doc
|
||||
for (i in pages) {
|
||||
split(i, page, SUBSEP)
|
||||
name = page[1]
|
||||
section = page[2]
|
||||
gsub(sprintf("<a class=\"Xr\">%s\\(%d\\)", name, section),
|
||||
sprintf("<a class=\"Xr\" href=\"%s.%d.html\">%s(%d)", name, section, name, section))
|
||||
}
|
||||
}
|
||||
|
||||
{
|
||||
# Make long opts (defined using `Fl Fl`) into a single tag
|
||||
gsub(/<code class="Fl">-<\/code><code class="Fl">/, "<code class=\"Fl\">-")
|
||||
}
|
||||
|
||||
{
|
||||
print
|
||||
}
|
||||
|
||||
/<head>/ {
|
||||
# Add viewport size <meta> tag for mobile users
|
||||
print " <meta name=\"viewport\" content=\"width=device-width, initial-scale=1\">"
|
||||
}
|
||||
|
||||
/<link/ {
|
||||
# Inject our own style overrides
|
||||
print(" <link rel=\"stylesheet\" href=\"rgbds.css\" type=\"text/css\" media=\"all\"/>")
|
||||
}
|
||||
793
src/gbz80.7
793
src/gbz80.7
File diff suppressed because it is too large
Load Diff
@@ -41,7 +41,7 @@ option to change this.
|
||||
Similarly, WRAM0 sections are placed in the first 4 KiB of WRAM
|
||||
.Pq Dq bank 0 ,
|
||||
and WRAMX sections are placed in any bank of the last 4 KiB.
|
||||
If your ROM doesn't use banked, WRAM you can use the
|
||||
If your ROM doesn't use banked WRAM, you can use the
|
||||
.Fl w
|
||||
option to change this.
|
||||
.Pp
|
||||
@@ -93,14 +93,14 @@ The default is 0.
|
||||
This option is ignored.
|
||||
It was supposed to perform smart linking but fell into disrepair, and so has been removed.
|
||||
It will be reimplemented at some point.
|
||||
.It Fl t , Fl tiny
|
||||
.It Fl t , Fl Fl tiny
|
||||
Expand the ROM0 section size from 16 KiB to the full 32 KiB assigned to ROM and prohibit the use of ROMX sections.
|
||||
Useful for ROMs that fit in 32 KiB.
|
||||
.It Fl V , Fl version
|
||||
.It Fl V , Fl Fl version
|
||||
Print the version of the program and exit.
|
||||
.It Fl v , Fl verbose
|
||||
.It Fl v , Fl Fl verbose
|
||||
Verbose: enable printing more information to standard error.
|
||||
.It Fl w , Fl wramx
|
||||
.It Fl w , Fl Fl wramx
|
||||
Expand the WRAM0 section size from 4 KiB to the full 8 KiB assigned to WRAM and prohibit the use of WRAMX sections.
|
||||
.El
|
||||
.Sh EXAMPLES
|
||||
@@ -115,11 +115,13 @@ You should use
|
||||
.Xr rgbfix 1
|
||||
to fix these so that the program will actually run in a Game Boy:
|
||||
.Pp
|
||||
.D1 $ rgbfix -v bar.gb
|
||||
.Dl $ rgbfix -v bar.gb
|
||||
.Ed
|
||||
.Pp
|
||||
Here is a more complete example:
|
||||
.Pp
|
||||
.D1 $ rgblink -o bin/game.gb -n bin/game.sym -p 0xFF obj/title.o obj/engine.o
|
||||
.Dl $ rgblink -o bin/game.gb -n bin/game.sym -p 0xFF obj/title.o obj/engine.o
|
||||
.Ed
|
||||
.Sh BUGS
|
||||
Please report bugs on
|
||||
.Lk https://github.com/rednex/rgbds/issues GitHub .
|
||||
|
||||
Reference in New Issue
Block a user