![]() |
![]()
| ![]() |
![]()
NAME
DESCRIPTIONThis 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 not attempt to list every syntax bug that was ever fixed (with some notable exceptions), nor new reserved keywords that may conflict with old identifiers. REMOVEDThese 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. Automatic LD to LDH conversion (rgbasm -l)Deprecated in 0.7.0, removed in 0.8.0. rgbasm(1)
used to automatically treat ‘ Instead, use ‘ Automatic NOP after HALT (rgbasm -H)Deprecated in 0.7.0, removed in 0.8.0. rgbasm(1)
used to automatically insert a ‘ Instead, use an explicit
‘ Nested macro definitionsRemoved in 0.4.2. Instead, put the nested macro definition inside a quoted string
(making sure that none of its lines start with
MACRO outer DEF definition EQUS """ MACRO inner println (\1) - (\\1) \nENDM""" {definition} PURGE definition ENDM outer 10 inner 3 ; prints 7 Negative DSRemoved in 0.3.2. This was used to "rewind" the value of
Instead, use __FILE__ and __LINE__Deprecated in 0.6.0, removed in 0.7.0. Instead, use _PIDeprecated in 0.5.0, removed in 0.6.0. Instead, use
‘ Treating multi-character strings as numbersDeprecated in 0.9.0. Instead, use a multi-value rgbgfx -f/--fix and -F/--fix-and-saveRemoved in 0.6.0. Instead, use ‘ rgbgfx -D/--debugRemoved in 0.6.0. REPLACEDThese are features whose syntax has been changed without affecting functionality. They can generally be updated with a single search-and-replace. Defining constants and variables without DEFDeprecated in 0.7.0, removed in 0.8.0.
Instead, use Defining macros like labelsDeprecated in 0.6.0, removed in 0.7.0. Macros used to be defined as ‘ Instead, use ‘ Defining variables with SETDeprecated in 0.5.2, removed in 0.6.0. Variables used to be defined as ‘ Instead, use ‘ Global labels without colonsDeprecated 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,
‘ '\,' in strings within macro argumentsDeprecated 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. '*' commentsDeprecated in 0.4.1, removed in 0.5.0. These comments had to have the
‘ Instead, use ‘ PRINTT, PRINTI, PRINTV, and PRINTFDeprecated in 0.5.0, removed in 0.6.0. These directives were each specific to one type of value. Instead, use IMPORT and XREFRemoved in 0.4.0. Symbols are now automatically resolved if they were exported from elsewhere. Instead, just remove these directives. GLOBAL and XDEFDeprecated in 0.4.2, removed in 0.5.0. Instead, use HOME, CODE, DATA, and BSSDeprecated in 0.3.0, removed in 0.4.0. Instead of JP [HL]Deprecated in 0.3.0, removed in 0.4.0. Instead, use ‘ LDI A, HL and LDD A, HLDeprecated in 0.3.0, removed in 0.4.0. Instead, use ‘ LDIODeprecated in 0.9.0. Instead, use ‘ LD [C], A and LD A, [C]Deprecated in 0.9.0. Instead, use ‘ Note that ‘ LDH [n8], A and LDH A, [n8]Deprecated in 0.9.0. ‘ Instead, use ‘ LD HL, [SP + e8]Deprecated in 0.3.0, removed in 0.4.0. Instead, use ‘ LDHL SP, e8Supported in ASMotor, removed in RGBDS. Instead, use ‘ rgbasm -iDeprecated in 0.6.0, removed in 0.8.0. Instead, use rgbgfx -hRemoved in 0.6.0. Instead, use rgbgfx --output-*Deprecated in 0.7.0, removed in 0.8.0. Instead, use CHANGEDThese are breaking changes that did not alter syntax, and so could not practically be deprecated. Trigonometry function unitsChanged 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:
** operator associativityChanged in 0.9.0. Instead of being left-associative,
‘ Previously we had ‘ Instead, now we have ‘ BUGSThese are misfeatures that may have been possible by mistake. They do not get deprecated, just fixed. Space between exported labels' colonsFixed in 0.7.0. Labels with two colons used to ignore a space between them; for
example, ‘ Instead, use ‘ Space between label and colonFixed in 0.9.0. Space between a label and its colon(s) used to be ignored; for
example, ‘ Instead, use ‘ ADD r16 with implicit first HL operandFixed in 0.5.0. For example, ‘ Instead, use an explicit first
‘ = instead of SETFixed in 0.4.0. The Instead, just use SEE ALSOHISTORYrgbasm(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.
|