Retro Assembler V2020.4 Released

April 25, 2020Retro Assembler

This version features huge improvements, something I planned to do for quite some time.

The assembler now handles Labels within their own Namespace Context, where Gobal Labels are in the Global Namespace, but Labels defined inside a Macro's code block are under the Macro's "Calling Instance" Namespace Context. This means that Macros no longer close Local Labels when they are called in the source code, and Macros can call other Macros from within, technically even themselves if you are careful enough, without running into "That label already exists" issues.

This also means that the Regional Labels like @@MyRegionalLabel are now deprecated because they are no longer necessary within a Macro's code block. The assembler shows a Warning for these and you need to update them to be Normal Labels. The feature will be completely removed in a later release.

The Debug text file shows Normal and Local labels with their namespaces and instance counters. The Label Printout's output format changed accordingly, too, and optionally it can print Local Labels along with the Normal Labels. See the Settings DebugAddLocalLabels and ShowLocalLabelsAfterCompiling.

These values can be used to identify specific Normal Labels within a Macro's generated code, and these can be referenced from outside the Macro too, in the format of MacroName_2.LabelName where "2" is the 2nd calling instance of the Macro in this example. The first instance doesn't get such a modifier. However this is not recommended, but it's there for experts who need to make their code behave this way for one reason or another.

These changes carry the risk of breaking existing source codes, but only if you used something incorrectly to begin with, or implemented something in a hacky way. These should be easy fixes for most coders.

Also some additional news: the "Windows" version of the assembler is updated to 2020.4 and available on the download page as a separate package. This uses .Net Framework 4.8 and can run using Mono. I can keep this version updated until the project starts using language features that are limited to C# 8.0 or later, so it's best to switch to the .Net Core version.

See the documentation for details, especially the .macro directive section.

Download the latest version from the Retro Assembler page!