diff --git a/.gitignore b/.gitignore index b2d6de30..d57a4529 100644 --- a/.gitignore +++ b/.gitignore @@ -1,5 +1,7 @@ # Dependencies /node_modules +.yarn +.yarnrc.yml # Production /build diff --git a/docs/index.md b/docs/index.md index 4f78008b..66a5645a 100644 --- a/docs/index.md +++ b/docs/index.md @@ -31,6 +31,7 @@ PDFs are also offered for offline reading, and maybe printing. - **Language reference**: documentation of the various languages used throughout RGBDS. - [Assembly syntax](./rgbasm.5.md): how to write RGBASM-flavored Game Boy assembly, and what the various directives do. ([PDF](./rgbasm.5.pdf)) - [CPU instructions](./gbz80.7.md): a list of CPU instructions, as well as quick descriptions of their various effects. ([PDF](./gbz80.7.pdf)) + - [Obsolete syntax](./rgbasm-old.5.md): instructions and directives removed from previous versions of RGBDS. ([PDF](./rgbasm-old.5.pdf)) - [Linkerscript format](./rgblink.5.md): how to write a linker script for RGBLINK. [PDF](./rgblink.5.pdf)) - [Object file format](./rgbds.5.md): a description of the format of files emitted by RGBASM and expected by RGBLINK; useful for integrating custom tooling with RGBDS. ([PDF](./rgbds.5.pdf)) - **Command-line options**: how to write the command lines to invoke RGBDS programs. diff --git a/docs/rgbasm-old.5.html b/docs/rgbasm-old.5.html new file mode 100644 index 00000000..a9b2a935 --- /dev/null +++ b/docs/rgbasm-old.5.html @@ -0,0 +1,376 @@ +
+

+

This is the list of features that have been removed from the + rgbasm(5) assembly language over its + decades of evolution, along with their modern alternatives. Its goal is to + be a reference for backwards incompatibility, when upgrading an old assembly + codebase to work with the latest RGBDS release. It does + attempt + to list syntax bugs that were fixed, nor new reserved keywords that may + conflict with old identifiers.

+
+
+

+

These are features which have been completely removed, without any + direct alternatives. Usually these features were limiting the addition of + other features, or had awkward limits on their own intended effects.

+
+

+

Deprecated in 0.7.0, removed in 0.8.0.

+

rgbasm(1) used to + automatically treat ‘LD’ as + ‘LDH’ if the address was known to be + in the $FF00-$FFFF range, with the + -L flag to opt out. + rgbasm(1) 0.6.0 added a + -l flag to opt in instead.

+

Instead, use ‘LDH’, and + remove the -L and -l flags + from rgbasm(1).

+
+
+

+

Deprecated in 0.7.0, removed in 0.8.0.

+

rgbasm(1) used to + automatically insert a ‘NOP’ after + ‘HALT’, with the + -h flag to opt out. + rgbasm(1) 0.6.0 added a + -H flag to opt in instead.

+

Instead, use an explicit + ‘NOP’ after + ‘HALT’, and remove the + -h and -H flags from + rgbasm(1).

+
+
+

+

Removed in 0.4.2.

+

Instead, put the nested macro definition inside a quoted string + (making sure that none of its lines start with + ENDM), then interpolate that string. For + example:

+
+
MACRO outer
+    DEF definition EQUS """
+        MACRO inner
+            println (\1) - (\\1)
+        \nENDM"""
+    {definition}
+    PURGE definition
+ENDM
+    outer 10
+    inner 3 ; prints 7
+
+
+
+

+

Removed in 0.3.2.

+

This was used to "rewind" the value of + @ in RAM sections, allowing labeled space + allocations to overlap.

+

Instead, use UNION.

+
+
+

+

Deprecated in 0.6.0, removed in 0.7.0.

+

Instead, use WARN or + FAIL to print a complete trace of filenames and line + numbers.

+
+
+

+

Deprecated in 0.5.0, removed in 0.6.0.

+

Instead, use + ‘3.141592653’.

+
+
+

+

Deprecated in 0.9.0.

+

Instead, use a multi-value CHARMAP, or + explicitly combine the values of individual characters.

+
+
+

+

Removed in 0.6.0.

+

Instead, use ‘rgbgfx + -c/--colors’ to explicitly specify a color palette. If using + ‘-c embedded’, arrange the PNG's + indexed palette in a separate graphics editor.

+
+
+

+

Removed in 0.6.0.

+
+
+
+

+

These are features whose syntax has been changed without affecting + functionality. They can generally be updated with a single + search-and-replace.

+
+

+

Deprecated in 0.7.0, removed in 0.8.0.

+

EQU, EQUS, + =, RB, + RW, and RL definitions used + to just start with the symbol name, but had to be typed in column 1.

+

Instead, use DEF before constant and + variable definitions. Note that EQUS expansion does + not occur for the symbol name, so you have to use explicit + ‘{interpolation}’.

+
+
+

+

Deprecated in 0.6.0, removed in 0.7.0.

+

Macros used to be defined as ‘name: + MACRO’.

+

Instead, use ‘MACRO name’. + Note that EQUS expansion does not occur for the + macro name, so you have to use explicit + ‘{interpolation}’.

+
+
+

+

Deprecated in 0.5.2, removed in 0.6.0.

+

Variables used to be defined as ‘name SET + value’.

+

Instead, use ‘DEF name = + value’.

+
+
+

+

Deprecated in 0.4.0, removed in 0.5.0.

+

Labels used to be definable with just a name, but had to be typed + in column 1.

+

Instead, use explicit colons; for example, + ‘Label:’ or exported + ‘Label::’.

+
+
+

+

Deprecated in 0.5.0, removed in 0.7.0.

+

Macro arguments now handle quoted strings and parenthesized + expressions as single arguments, so commas inside them are not argument + separators and do not need escaping.

+

Instead, just use commas without backslashes.

+
+
+

+

Deprecated in 0.4.1, removed in 0.5.0.

+

Instead, use ‘;’ + comments.

+
+
+

+

Deprecated in 0.5.0, removed in 0.6.0.

+

These directives were each specific to one type of value.

+

Instead, use PRINT and + PRINTLN, with STRFMT or + ‘{interpolation}’ for type-specific + formatting.

+
+
+

+

Removed in 0.4.0.

+

Symbols are now automatically resolved if they were exported from + elsewhere.

+

Instead, just remove these directives.

+
+
+

+

Deprecated in 0.4.2, removed in 0.5.0.

+

Instead, use EXPORT.

+
+
+

+

Deprecated in 0.3.0, removed in 0.4.0.

+

Instead of HOME, use + ROM0; instead of CODE and + DATA, use ROMX; instead of + BSS, use WRAM0.

+
+
+

+

Deprecated in 0.3.0, removed in 0.4.0.

+

Instead, use ‘JP HL’.

+
+
+

+

Deprecated in 0.3.0, removed in 0.4.0.

+

Instead, use ‘LDI A, [HL]’ + and LDD A, [HL] (or ‘LD A, [HLI]’ and + ‘LD A, [HLD]’; or LD A, [HL+] and + ‘LD A, [HL-]’).

+
+
+

+

Deprecated in 0.3.0, removed in 0.4.0.

+

Instead, use ‘LD HL, SP + + e8’.

+
+
+

+

Deprecated in 0.9.0.

+

Instead, use ‘LDH’.

+
+
+

+

Deprecated in 0.6.0, removed in 0.8.0.

+

Instead, use -I or + --include.

+
+
+

+

Removed in 0.6.0.

+

Instead, use -Z or + --columns.

+
+
+

+

Deprecated in 0.7.0, removed in 0.8.0.

+

Instead, use --auto-*.

+
+
+
+

+

These are breaking changes that did not alter syntax, and so could + not practically be deprecated.

+
+

+

Changed in 0.6.0.

+

Instead of dividing a circle into 65536.0 "binary + degrees", it is now divided into 1.0 "turns".

+

For example, previously we had:

+ +

Instead, now we have:

+ +
+
+

+

Changed in 0.9.0.

+

Instead of being left-associative, + ‘**’ is now right-associative.

+

Previously we had ‘p ** q ** r == (p ** q) + ** r’.

+

Instead, now we have ‘p ** q ** r == p ** + (q ** r)’.

+
+
+
+

+

rgbasm(1), + gbz80(7), + rgbds(5), + rgbds(7)

+
+
+

+

rgbasm(1) was originally + written by Carsten Sørensen as part of the + ASMotor package, and was later repackaged in RGBDS by + Justin Lloyd. It is now maintained by a number of + contributors at + https://github.com/gbdev/rgbds.

+
diff --git a/docs/rgbasm-old.5.md b/docs/rgbasm-old.5.md new file mode 100644 index 00000000..2d072242 --- /dev/null +++ b/docs/rgbasm-old.5.md @@ -0,0 +1,178 @@ +# rgbasm-old(5) — obsolete language documentation + +import generated from '!!raw-loader!./rgbasm-old.5.html'; + +
+ +export const toc = [ +{ + "value": "DESCRIPTION", + "id": "DESCRIPTION", + "level": 2, +}, +{ + "value": "REMOVED", + "id": "REMOVED", + "level": 2, +}, +{ + "value": "Automatic LD to LDH conversion (rgbasm -l)", + "id": "Automatic_LD_to_LDH_conversion_(rgbasm_-l)", + "level": 3, +}, +{ + "value": "Automatic NOP after HALT (rgbasm -H)", + "id": "Automatic_NOP_after_HALT_(rgbasm_-H)", + "level": 3, +}, +{ + "value": "Nested macro definitions", + "id": "Nested_macro_definitions", + "level": 3, +}, +{ + "value": "Negative DS", + "id": "Negative_DS", + "level": 3, +}, +{ + "value": "__FILE__ and __LINE__", + "id": "__FILE___and___LINE__", + "level": 3, +}, +{ + "value": "_PI", + "id": "_PI", + "level": 3, +}, +{ + "value": "Treating multi-character strings as numbers", + "id": "Treating_multi-character_strings_as_numbers", + "level": 3, +}, +{ + "value": "rgbgfx -f/--fix and -F/--fix-and-save", + "id": "rgbgfx_-f/--fix_and_-F/--fix-and-save", + "level": 3, +}, +{ + "value": "rgbgfx -D/--debug", + "id": "rgbgfx_-D/--debug", + "level": 3, +}, +{ + "value": "REPLACED", + "id": "REPLACED", + "level": 2, +}, +{ + "value": "Defining constants and variables without DEF", + "id": "Defining_constants_and_variables_without_DEF", + "level": 3, +}, +{ + "value": "Defining macros like labels", + "id": "Defining_macros_like_labels", + "level": 3, +}, +{ + "value": "Defining variables with SET", + "id": "Defining_variables_with_SET", + "level": 3, +}, +{ + "value": "Global labels without colons", + "id": "Global_labels_without_colons", + "level": 3, +}, +{ + "value": "'\e,' in strings within macro arguments", + "id": "'_e,'_in_strings_within_macro_arguments", + "level": 3, +}, +{ + "value": "'*' comments", + "id": "'*'_comments", + "level": 3, +}, +{ + "value": "PRINTT, PRINTI, PRINTV, and PRINTF", + "id": "PRINTT,_PRINTI,_PRINTV,_and_PRINTF", + "level": 3, +}, +{ + "value": "IMPORT and XREF", + "id": "IMPORT_and_XREF", + "level": 3, +}, +{ + "value": "GLOBAL and XDEF", + "id": "GLOBAL_and_XDEF", + "level": 3, +}, +{ + "value": "HOME, CODE, DATA, and BSS", + "id": "HOME,_CODE,_DATA,_and_BSS", + "level": 3, +}, +{ + "value": "JP [HL]", + "id": "JP__HL_", + "level": 3, +}, +{ + "value": "LDI A, HL and LDD A, HL", + "id": "LDI_A,_HL_and_LDD_A,_HL", + "level": 3, +}, +{ + "value": "LD HL, [SP + e8]", + "id": "LD_HL,__SP_+_e8_", + "level": 3, +}, +{ + "value": "LDIO", + "id": "LDIO", + "level": 3, +}, +{ + "value": "rgbasm -i", + "id": "rgbasm_-i", + "level": 3, +}, +{ + "value": "rgbgfx -h", + "id": "rgbgfx_-h", + "level": 3, +}, +{ + "value": "rgbgfx --output-*", + "id": "rgbgfx_--output-*", + "level": 3, +}, +{ + "value": "CHANGED", + "id": "CHANGED", + "level": 2, +}, +{ + "value": "Trigonometry function units", + "id": "Trigonometry_function_units", + "level": 3, +}, +{ + "value": "** operator associativity", + "id": "**_operator_associativity", + "level": 3, +}, +{ + "value": "SEE ALSO", + "id": "SEE_ALSO", + "level": 2, +}, +{ + "value": "HISTORY", + "id": "HISTORY", + "level": 2, +}, +]; diff --git a/docs/rgbasm-old.5.pdf b/docs/rgbasm-old.5.pdf new file mode 100644 index 00000000..e1004b8d Binary files /dev/null and b/docs/rgbasm-old.5.pdf differ diff --git a/maintainer/support/index.md b/maintainer/support/index.md index 052a46fb..d3f521bc 100644 --- a/maintainer/support/index.md +++ b/maintainer/support/index.md @@ -13,6 +13,7 @@ PDFs are also offered for offline reading, and maybe printing. - **Language reference**: documentation of the various languages used throughout RGBDS. - [Assembly syntax](./rgbasm.5.md): how to write RGBASM-flavored Game Boy assembly, and what the various directives do. ([PDF](./rgbasm.5.pdf)) - [CPU instructions](./gbz80.7.md): a list of CPU instructions, as well as quick descriptions of their various effects. ([PDF](./gbz80.7.pdf)) + - [Obsolete syntax](./rgbasm-old.5.md): instructions and directives removed from previous versions of RGBDS. ([PDF](./rgbasm-old.5.pdf)) - [Linkerscript format](./rgblink.5.md): how to write a linker script for RGBLINK. ([PDF](./rgblink.5.pdf)) - [Object file format](./rgbds.5.md): a description of the format of files emitted by RGBASM and expected by RGBLINK; useful for integrating custom tooling with RGBDS. ([PDF](./rgbds.5.pdf)) - **Command-line options**: how to write the command lines to invoke RGBDS programs. diff --git a/sidebars.js b/sidebars.js index 8c0de3a5..38dd5a1b 100644 --- a/sidebars.js +++ b/sidebars.js @@ -8,6 +8,7 @@ const sidebars = { "Language reference": [ { type: 'doc', id: 'rgbasm.5', label: "Assembly syntax" }, { type: 'doc', id: 'gbz80.7', label: "CPU instructions" }, + { type: 'doc', id: 'rgbasm-old.5', label: "Obsolete syntax" }, { type: 'doc', id: 'rgblink.5', label: "Linkerscript format" }, { type: 'doc', id: 'rgbds.5', label: "Object file format" }, ]