New sentence, new line.

This commit is contained in:
Anthony J. Bentley
2018-07-28 00:07:07 -06:00
parent 4fc1e41b16
commit efe4599bd8

View File

@@ -33,26 +33,27 @@ John: ld a,87 ;Weee
All pseudoops, mnemonics and registers (reserved keywords) are caseinsensitive All pseudoops, mnemonics and registers (reserved keywords) are caseinsensitive
and all labels are casesensitive. and all labels are casesensitive.
.Pp .Pp
There are two syntaxes for comments. In both cases, a comment ends at the end of There are two syntaxes for comments.
the line. The most common one is: anything that follows a semicolon In both cases, a comment ends at the end of the line.
The most common one is: anything that follows a semicolon
.Ql \&; .Ql \&;
(that isn't inside a string) is a comment. There is another (that isn't inside a string) is a comment.
format: anything that follows a There is another format: anything that follows a
.Ql * .Ql *
that is placed right at the start of that is placed right at the start of
a line is a comment. The assembler removes all comments from the code before a line is a comment.
doing anything else. The assembler removes all comments from the code before doing anything else.
.Pp .Pp
Sometimes lines can be too long and it may be necessary to split them. The Sometimes lines can be too long and it may be necessary to split them.
syntax to do so is the following one: The syntax to do so is the following one:
.Pp .Pp
.Bd -literal -offset indent .Bd -literal -offset indent
DB 1, 2, 3, 4 \[rs] DB 1, 2, 3, 4 \[rs]
5, 6, 7, 8 5, 6, 7, 8
.Ed .Ed
.Pp .Pp
This works anywhere in the code except inside of strings. To split strings it is This works anywhere in the code except inside of strings.
needed to use To split strings it is needed to use
.Sy STRCAT .Sy STRCAT
like this: like this:
.Pp .Pp
@@ -138,8 +139,8 @@ and
.Sy LDH A,[$FF00+n8] .Sy LDH A,[$FF00+n8]
syntax instead. syntax instead.
This forces the assembler to emit the correct instruction and the linker to This forces the assembler to emit the correct instruction and the linker to
check if the value is in the correct range. This optimization can be disabled check if the value is in the correct range.
by passing the This optimization can be disabled by passing the
.Fl L .Fl L
flag to flag to
.Sy rgbasm .Sy rgbasm
@@ -524,12 +525,13 @@ For instance, if you pass 1 + 2 as the first argument and then do
you will get the value 5 on screen and not 6 as you might have expected. you will get the value 5 on screen and not 6 as you might have expected.
.Pp .Pp
In reality, up to 256 arguments can be passed to a macro, but you can only use In reality, up to 256 arguments can be passed to a macro, but you can only use
the first 9 like this. If you want to use the rest, you need to use the keyword the first 9 like this.
If you want to use the rest, you need to use the keyword
.Ic SHIFT . .Ic SHIFT .
.Pp .Pp
Line continuations work as usual inside macros or lists of arguments of macros. Line continuations work as usual inside macros or lists of arguments of macros.
Strings, however, are a bit trickier. The following example shows how to use Strings, however, are a bit trickier.
strings as arguments for a macro: The following example shows how to use strings as arguments for a macro:
.Pp .Pp
.Bd -literal -offset indent .Bd -literal -offset indent
PrintMacro : MACRO PrintMacro : MACRO
@@ -751,7 +753,8 @@ PRINTF MUL(3.14, 3987.0)
prints out a string. prints out a string.
.It Ic PRINTV .It Ic PRINTV
prints out an integer value in hexadecimal or, as in the example, the result of prints out an integer value in hexadecimal or, as in the example, the result of
a calculation. Unsurprisingly, you can also print out a constant symbols value. a calculation.
Unsurprisingly, you can also print out a constant symbols value.
.It Ic PRINTI .It Ic PRINTI
prints out a signed integer value. prints out a signed integer value.
.It Ic PRINTF .It Ic PRINTF
@@ -883,7 +886,8 @@ There are a number of numeric formats.
.Pp .Pp
.Bl -dash -compact .Bl -dash -compact
.It .It
Hexadecimal: $0123456789ABCDEF. Case-insensitive Hexadecimal: $0123456789ABCDEF.
Case-insensitive
.It .It
Decimal: 0123456789 Decimal: 0123456789
.It .It