Consistently refer to "directives", not "pseudo-ops"

Some docs and warnings already referred to SECTION and
db/dw/dl "directives", but others used "pseudo-ops".
This commit is contained in:
Rangi
2021-01-15 20:31:22 -05:00
committed by Eldred Habert
parent 15ec6efc28
commit fb39c3a70e
3 changed files with 12 additions and 12 deletions

View File

@@ -18,7 +18,7 @@ enum WarningID {
WARNING_BUILTIN_ARG, /* Invalid args to builtins */ WARNING_BUILTIN_ARG, /* Invalid args to builtins */
WARNING_CHARMAP_REDEF, /* Charmap entry re-definition */ WARNING_CHARMAP_REDEF, /* Charmap entry re-definition */
WARNING_DIV, /* Division undefined behavior */ WARNING_DIV, /* Division undefined behavior */
WARNING_EMPTY_DATA_DIRECTIVE, /* `db`, `dw` or `dl` with no directive in ROM */ WARNING_EMPTY_DATA_DIRECTIVE, /* `db`, `dw` or `dl` directive without data in ROM */
WARNING_EMPTY_ENTRY, /* Empty entry in `db`, `dw` or `dl` */ WARNING_EMPTY_ENTRY, /* Empty entry in `db`, `dw` or `dl` */
WARNING_EMPTY_STRRPL, /* Empty second argument in `STRRPL` */ WARNING_EMPTY_STRRPL, /* Empty second argument in `STRRPL` */
WARNING_LARGE_CONSTANT, /* Constants too large */ WARNING_LARGE_CONSTANT, /* Constants too large */

View File

@@ -508,7 +508,7 @@ void yyerror(char const *str)
%type <forArgs> for_args %type <forArgs> for_args
%token T_Z80_ADC "adc" T_Z80_ADD "add" T_Z80_AND "and" %token T_Z80_ADC "adc" T_Z80_ADD "add" T_Z80_AND "and"
%token T_Z80_BIT "bit" %token T_Z80_BIT "bit" // There is no T_Z80_SET, only T_POP_SET
%token T_Z80_CALL "call" T_Z80_CCF "ccf" T_Z80_CP "cp" T_Z80_CPL "cpl" %token T_Z80_CALL "call" T_Z80_CCF "ccf" T_Z80_CP "cp" T_Z80_CPL "cpl"
%token T_Z80_DAA "daa" T_Z80_DEC "dec" T_Z80_DI "di" %token T_Z80_DAA "daa" T_Z80_DEC "dec" T_Z80_DI "di"
%token T_Z80_EI "ei" %token T_Z80_EI "ei"
@@ -537,7 +537,7 @@ void yyerror(char const *str)
%token T_MODE_AF "af" T_MODE_BC "bc" T_MODE_DE "de" T_MODE_SP "sp" %token T_MODE_AF "af" T_MODE_BC "bc" T_MODE_DE "de" T_MODE_SP "sp"
%token T_MODE_HW_C "$ff00+c" %token T_MODE_HW_C "$ff00+c"
%token T_MODE_HL "hl" T_MODE_HL_DEC "hld/hl-" T_MODE_HL_INC "hli/hl+" %token T_MODE_HL "hl" T_MODE_HL_DEC "hld/hl-" T_MODE_HL_INC "hli/hl+"
%token T_CC_NZ "nz" T_CC_Z "z" T_CC_NC "nc" %token T_CC_NZ "nz" T_CC_Z "z" T_CC_NC "nc" // There is no T_CC_C, only T_TOKEN_C
%type <nConstValue> reg_r %type <nConstValue> reg_r
%type <nConstValue> reg_ss %type <nConstValue> reg_ss
@@ -568,18 +568,18 @@ lines : /* empty */
line : label T_NEWLINE line : label T_NEWLINE
| label cpu_command T_NEWLINE | label cpu_command T_NEWLINE
| label macro T_NEWLINE | label macro T_NEWLINE
| label simple_pseudoop T_NEWLINE | label directive T_NEWLINE
| assignment_pseudoop T_NEWLINE | assignment_directive T_NEWLINE
| entire_line /* Commands that manage newlines themselves */ | line_directive /* Directives that manage newlines themselves */
; ;
/* /*
* For "logistical" reasons, these commands must manage newlines themselves. * For "logistical" reasons, these directives must manage newlines themselves.
* This is because we need to switch the lexer's mode *after* the newline has been read, * This is because we need to switch the lexer's mode *after* the newline has been read,
* and to avoid causing some grammar conflicts (token reducing is finicky). * and to avoid causing some grammar conflicts (token reducing is finicky).
* This is DEFINITELY one of the more FRAGILE parts of the codebase, handle with care. * This is DEFINITELY one of the more FRAGILE parts of the codebase, handle with care.
*/ */
entire_line : macrodef line_directive : macrodef
| rept | rept
| for | for
| break | break
@@ -677,7 +677,7 @@ macroargs : /* empty */ {
; ;
/* These commands start with a T_LABEL. */ /* These commands start with a T_LABEL. */
assignment_pseudoop : equ assignment_directive : equ
| set | set
| rb | rb
| rw | rw
@@ -685,7 +685,7 @@ assignment_pseudoop : equ
| equs | equs
; ;
simple_pseudoop : include directive : include
| print | print
| println | println
| printf | printf

View File

@@ -29,7 +29,7 @@ but any program that processes RGB object files (described in
.Xr rgbds 5 ) .Xr rgbds 5 )
can be used in its place. can be used in its place.
.Sh SYNTAX .Sh SYNTAX
The syntax is linebased, just as in any other assembler, meaning that you do one instruction or pseudoop per line: The syntax is linebased, just as in any other assembler, meaning that you do one instruction or directive per line:
.Pp .Pp
.Dl Oo Ar label Oc Oo Ar instruction Oc Oo Ar ;\ comment Oc .Dl Oo Ar label Oc Oo Ar instruction Oc Oo Ar ;\ comment Oc
.Pp .Pp
@@ -38,7 +38,7 @@ Example:
John: ld a,87 ;Weee John: ld a,87 ;Weee
.Ed .Ed
.Pp .Pp
All reserved keywords (pseudoops, mnemonics, registers, etc.) are caseinsensitive; All reserved keywords (directives, mnemonics, registers, etc.) are caseinsensitive;
all identifiers (symbol names) are case-sensitive. all identifiers (symbol names) are case-sensitive.
.Pp .Pp
Comments are used to give humans information about the code, such as explanations. Comments are used to give humans information about the code, such as explanations.