Retro Assembler V2020.12 Released

June 16, 2020Retro Assembler

The following updates have been made:

Empty Macros get removed from the compiled code automatically. These caused some local label issues.

When the Setting OmitUnusedFunctions is Enabled, empty Functions and their standard, correctly formatted calls get removed from the compiled code.

When the Setting Debug is Enabled, a text representation of the compiled code is saved alongside with the normal debug information. This way you can check out your compiled file's code and data contents, without doing Disassembling which would not recognize the data sections. You can change its default filename in the Setting DebugCodeFile or in the Settings Xml file.

When the Setting OutputSaveInfoFile is Enabled, now Atari DOS (.xex) files create the Info file about memory usage. The Atari 800 example file has been updated to utilize this feature.

See the documentation for details.

Download the latest version from the Retro Assembler page!

Retro Assembler V2020.11 Released

June 11, 2020Retro Assembler

This is a quick update for to fix a nasty little bug in the parser and compiler.

The problem was with the number size detection of currently-undefined labels. An lda <Label or lda >Label instruction, or similar ones using a zero page address would process the memory address of Label incorrectly, when Label is defined after the instruction's code line.

Friend of the project, John Tsombakos was kind enough to write up a reproduction case about it. Thank you John!

See the documentation for details.

Download the latest version from the Retro Assembler page!

Retro Assembler V2020.10 Released

May 29, 2020Retro Assembler

The following changes have been made since the last update:

See the documentation for details.

Download the latest version from the Retro Assembler page!

Retro Assembler V2020.9 Released

May 17, 2020Retro Assembler

There was a serious bug in the Long Branch handler, it has been fixed.

I also added ATASCII (Atari ASCII) and ScreencodeAtari support in the .encoding directive. ATASCII is pretty much the same as normal ASCII, but certain control characters use different byte values.

See the documentation for details.

Download the latest version from the Retro Assembler page!

Retro Assembler V2020.8 Released

May 16, 2020Retro Assembler

I seem to be on the roll these days. My friend Josh at Gang-Gang Studios (who is working on a truly amazing game) asked whether Functions could work similarly to Macros – they won't get included if they are not referenced by the source code itself. I've been wondering about the same recently and it seems like I managed to come up with a good solution to this. It wasn't easy, had a bit of an Edison moment with the thousand ways you can't make a light bulb, but at the end it worked out.

There is a new Setting "OmitUnusedFunctions" for this, which is enabled by default. If your code requires a behavior where all functions are compiled into the binary, you can disable it in your code or in the Settings Xml file.

I also added a new default Segment called Lib (short for Library), which got its .lib shortcut directive. This is placed between the Code and Data Segments, so if you have a large library you need to include, you can utilize this Segment to separate the Functions from the Code Segment's contents. Of course this is optional, or you can use a custom Segment for this purpose.

See the documentation for details.

Download the latest version from the Retro Assembler page!

Retro Assembler V2020.7 Released

May 13, 2020Retro Assembler

In this new update I added a couple of new features:

I added a new directive .format to replace the old .setting "OutputFormat" solution. It's strange I haven't done this sooner, but now it's here.

I added a new Setting HandleLongBranch. The instructions that use relative addressing, typically branching instructions like bne or beq can only handle a certain address range, especially on 8-bit CPUs. When this range is exceeded, the assembler shows an error message about it. If you enable this setting, the assembler tries to resolve these errors by automatically replacing the generated code with a counterpart that can handle long jumps to absolute addresses.

Label  nop
(Lots of instructions here, over $80 bytes worth)
bne Label
(Other instructions)

This fails because Label is way too far away for a relative address jump. The assembler will compile this instead:

Label  nop
(Lots of instructions here, over $80 bytes worth)
beq AfterJmp  //Branch counterpart for "bne"
jmp Label     //Jump to an absolute address.
AfterJmp      //The label that's accessible as a short relative jump.
(Other instructions)

It's handled like this on 6502, 65C02 and 65816, with all the branch instructions of these CPUs. On Z80 and Gameboy CPUs the case is simpler, the jr instructions get replaced with the appropriate jp instructions.

Of course this is not ideal if your goal is writing code that can be relocated to any memory address, but that's rare and then you surely know what you are doing. The feature is not turned on by default, but if you need it, and most people likely would, it can be enabled, even for just a section of the code, by .setting "HandleLongBranch", true

The rest of the changes can be filed under Good Housekeeping:

See the documentation for details.

Download the latest version from the Retro Assembler page!

Retro Assembler V2020.6 Released

May 9, 2020Retro Assembler

In this update I added a new .namespace directive, which can create and use user-defined Namespaces for Labels. If your project and workflow finds a use for it, you're in luck. It can be really powerful in the right hands, but it's probably unnecessary for most coders.

The VS Code Extension and the Notepad++ files have been updated to recognize this new directive.

The .generate directive got a new "random" mode to add an array of one or more random bytes.

The Atari DOS files with the .xex extension are now loaded and processed by the Disassembler as Atari DOS would, by processing each Chunk of data and loading them at the correct memory addresses. The Launcher Chunk is ignored by the loader, otherwise those files would be listed from $02e0

For developers who need to integrate Retro Assembler into a .Net Core project, the retroassembler.dll file offers a few Compiler functions that can be useful in unit tests.

See the documentation for details.

Download the latest version from the Retro Assembler page!

Code Snippets In Visual Studio Code

May 8, 2020Retro AssemblerVS Code

The new Retro Assembler Extension for VS Code 1.3.0 is now capable of using IntelliSense and Code Completion to help entering Directives like .macro and it can display a short description and examples for each. Just type "." and hit Ctrl+Space to show the available Directives, or you can start typing what you need and hit Tab to insert the Code Snippet for the chosen Directive.

These helper entries don't list all possible parameters and full description due to the space limitation in the code editor window, but the most common cases are covered. It makes writing code a lot easier. For further information on the minute details you should still refer to the assembler's documentation.

Retro Assembler V2020.5 Released

May 4, 2020Retro Assembler

In this new version I added support for the Atari DOS file format, which uses the .xex extension. This file format can load one or more Chunks of data to the chosen memory locations, and it can optionally auto-start the program after loading. You need to use Segments to make this work, but everything else is automated. Check out the Atari 800 example project's source code and read about this addition in the documentation.

Hello World example code loaded and launched in an Atari 800 emulator

The Windows version has been updated too, and now it checks a different URL for updates. There won't be any real deviation from the .Net Core version though, it may just stop getting updated at a certain point.

See the documentation for details.

Download the latest version from the Retro Assembler page!

CheckSummer

May 2, 2020AppsBackupUtility

I'm planning to write about my file backup strategy in details, because I always enjoy reading about how other people manage their backups, and I'm surely not alone with this passion. But before I would do so, I released one of the utilities I developed and use in my backup workflow.

CheckSummer is a command line utility capable of creating a checksum file with the list of MD5 hashes for a chosen directory, optionally recursively for the whole structure, or it can validate the files listed in an existing checksum file, by comparing their current state to the previously created MD5 hash. By this I can spot if a file is missing or whether its contents changed. Since this is used in the context of creating backups, its main purpose to detect bit rot that might happen after a while. This is a possibility on hard disks, flash media or perhaps on incorrectly read optical discs – some bits flip and the file still has the original length, but its content is no longer valid. Images and video get artifacts, compressed files break, text files get modified. By checking the checksum of files, this can be detected and a previous, correct version of the file can be restored from backup.

The utility can be set up in its .config file to run in Automated mode (use the config value true) so it won't need any input parameters and it either creates a new checksum file with recursive file processing, or validates them using the checksum file, depending on whether the checksum.txt file exists in the target directory. And if there is no target directory specified, it processes the current directory, so in most cases I just have to type checksummer and the desired action happens.

Download it from the Apps page!

Platform: Windows (.Net Framework 4.8), mac OS / Linux (Mono)

Check out the Archive for more posts!