Skip to content

Release 1.1.1

Compare
Choose a tag to compare
@TollyH TollyH released this 22 Aug 16:08
· 586 commits to main since this release
2782e6a

.NET 6, Self-contained (.NET install not required)

Patch changes (1.1.0 -> 1.1.1):

  • Fixed an issue where errors raised by references to non-existent labels wouldn't be communicated correctly to the VSCode extension

Release changes (1.0.0 -> 1.1.0):

Additions:

  • Assembler warnings: The assembler will now alert you when common mistakes and possible improvements are detected in your source code. This is accompanied with a new assembler directive and command line parameters to control whether or not individual warnings are raised.
  • Escape sequences: You can now use escape sequences like \n and \0 in strings.
  • Performance: AssEmbly 1.1.0 is on average 8.7x faster than 1.0.0. [1] This now makes it comparatively faster than Python. [2]
  • Breakpoints: The debugger now has support for breaking when a register becomes equal to a specified value.
  • Assembler error messages now show the particular line and file the error occurred on, and are no longer incorrect when following an IMP directive.
  • Assembler errors given when a non-existent label is referenced now tell you what line the reference was made on.
  • Circular imports are now detected and prevent assembly, where before they would cause an infinite loop.
  • Support for JSON communication with the VSCode extension to provide diagnostics in the editor has been added.

Fixes:

  • File/console input/output now work correctly with UTF-8 characters that require multiple bytes. Instructions will now read and write these characters one byte at a time without modifying them, and will display correctly when they're output together.
  • The processor will now correctly crash if rpo is given as the second operand to DVR.

Example program changes:

  • The calculator example no longer returns incorrect results if the second value is shorter in decimal representation than the first.
  • All examples have been altered to use the new features provided in this release, as well as to ensure they follow all the suggestions given by the assembler.

Internal changes:

  • Program.cs has been refactored into separate methods with the Debugger being moved into its own file. All #region directives have been removed.
  • The majority of exceptions now use classes defined specifically for use in AssEmbly, with some new properties such as a ConsoleMessage.
  • The value of the status flag register is now mapped to a Flag enum. The un-setting of bits in the register has also been simplified.
  • Regular expressions are no longer used as a fundamental part of parsing source code lines.
  • The mem-size parameter now has it's value validated, with the application quitting gracefully instead of crashing if it is not valid.
  • The Step and Execute methods in the processor have been merged, contributing to most of the performance gains in this release.
  • The methods the processor uses to read and write values in memory have all been renamed with more descriptive names.

Footnotes:

[1]: Tested with the QOI example program (Example Programs/qoi.ext.asm) on an image 616 x 995 pixels in size. Averaged over 100 trials for each test, all executed synchronously. Exact values were 367.107ms for 1.1.0, 3,178.963ms for 1.0.0. The same image and assembled program binary were used for both tests. CPU was an Intel i9-12900K running Windows 11 Pro 22621.2134 and .NET CLR 6.0.21. Both versions were compiled for release (optimisations enabled) by the same compiler (Roslyn 4.7.0-3.23403.2).

[2]: Tested with a simple loop program that increments a single variable 100,000,000 times, then prints it to the console. Python 3.11.4 x64 (CPython) was utilised. CPU/Windows version the same as above. Your mileage may vary depending on use case.

Documentation Errors

The following errors have been found in the documentation since this release:

  • The "Instruction Count" field in the "Technical Information" table is incorrect. It should read "167 opcodes (49 unique operations)", not "165 opcodes (48 unique operations)".
  • The "Labels" section claims that, in the third example, :END will have a value of 34 when referenced as each instruction will take up 17 bytes. These numbers should actually be 20 and 10 respectively.
  • The start of the "Maths and Bitwise Operations" section says that 4 bytes will be read from memory for these operations, when in fact 8 bytes will be read.
  • The "Reading and Writing" subsection of the "File Handling" section contains an error. It says that new data written to an existing file "will be appended to the end". This is not correct. New data "will start overwriting from the first byte in the file. Any remaining data that does not get overwritten will remain unchanged, and the size of the file will not change unless more bytes are written than were originally in the file. To clear a file before writing it, use the DFL instruction to delete the file beforehand."
  • The first code example in the "Address" subsection of the "Operand Types" section should use MVB, not MVQ.