Use sub-sections for the different symbol types

This will make them appear in the ToC, and generate HTML anchors for them
This commit is contained in:
ISSOtm
2021-03-18 22:37:18 +01:00
committed by Eldred Habert
parent 093631ca0b
commit bdb84a901f

View File

@@ -869,8 +869,7 @@ Periods
.Sq \&. .Sq \&.
are allowed exclusively in labels, as described below. are allowed exclusively in labels, as described below.
A symbol cannot have the same name as a reserved keyword. A symbol cannot have the same name as a reserved keyword.
.Bl -tag -width indent .Ss Label declaration
.It Sy Label declaration
One of the assembler's main tasks is to keep track of addresses for you, so you can work with meaningful names instead of "magic" numbers. One of the assembler's main tasks is to keep track of addresses for you, so you can work with meaningful names instead of "magic" numbers.
.Pp .Pp
This can be done in a number of ways: This can be done in a number of ways:
@@ -945,7 +944,7 @@ However, if the section in which the label is declared has a fixed base address,
.Pp .Pp
.Nm .Nm
is able to compute the subtraction of two labels either if both are constant as described above, or if both belong to the same section. is able to compute the subtraction of two labels either if both are constant as described above, or if both belong to the same section.
.It Ic EQU .Ss Immutable constants
.Ic EQU .Ic EQU
is used to define numerical constant symbols. is used to define numerical constant symbols.
Unlike Unlike
@@ -960,7 +959,7 @@ def SCREEN_HEIGHT equ 144
Note that colons Note that colons
.Ql \&: .Ql \&:
following the name are not allowed. following the name are not allowed.
.It Ic SET .Ss Mutable constants
.Ic SET , .Ic SET ,
or its synonym or its synonym
.Ic = , .Ic = ,
@@ -980,8 +979,8 @@ COUNT = COUNT*2
Note that colons Note that colons
.Ql \&: .Ql \&:
following the name are not allowed. following the name are not allowed.
.It Ic RSSET , RSRESET , RB , RW .Ss Offset constants
The RS group of commands is a handy way of defining structures: The RS group of commands is a handy way of defining structure offsets:
.Bd -literal -offset indent .Bd -literal -offset indent
RSRESET RSRESET
DEF str_pStuff RW 1 DEF str_pStuff RW 1
@@ -1017,7 +1016,7 @@ is omitted, it's assumed to be 1.
Note that colons Note that colons
.Ql \&: .Ql \&:
following the name are not allowed. following the name are not allowed.
.It Ic EQUS .Ss String equates
.Ic EQUS .Ic EQUS
is used to define string equate symbols. is used to define string equate symbols.
Wherever the assembler reads a string equate, it gets Wherever the assembler reads a string equate, it gets
@@ -1128,7 +1127,7 @@ X EQU 42
; prints "Y $2A" ; prints "Y $2A"
PRINTLN "{X} {Y}" PRINTLN "{X} {Y}"
.Ed .Ed
.It Ic MACRO .Ss Macros
One of the best features of an assembler is the ability to write macros for it. One of the best features of an assembler is the ability to write macros for it.
Macros can be called with arguments, and can react depending on input using Macros can be called with arguments, and can react depending on input using
.Ic IF .Ic IF