6502.Net Versions Save

A .Net-based Cross-Assembler for Several 8-Bit Microprocessors

v4.3.1

4 weeks ago

Version 4.3.1

  • Added support for escape codes of special Commodore keys in string and character literals, e.g.,"{CLR}{HOME}" for Commodore-specific encodings.
  • Symbol names can include registers.
  • Some error message improvements.
  • Other minor bug fixes.

v4.2.2

7 months ago

Version 4.2.2

This release mostly focused on improved error messages.

v4.2

7 months ago

Changes

Support for the Sharp LR35902, the z80-flavored CPU powering the Nintendo Game Boy.

v4.1

7 months ago

Minor bugfix release

v4.0

1 year ago

Release 4.0

Features

  • Enhanced the type system. Now all types have a minimum number of instance member methods, most notable toString(). Previously standalone functions for arrays and strings are now implemented as methods on instances of those types. See the documentation on expressions for more details.
  • Added the tuple type, functionally equivalent to arrays except their members can be heterogenous types.
  • String literals can have explicit encodings via the prefices: u, U and u8.
  • Support included for .Net style interpolated strings, e.g. $"3+2={3+2}", including value formatting support.
  • The command-line option --vice-labels used with -L can output label listings as VICE format.
  • The ^^ prefix operator extracts the high word of a numeric expression.
  • A lightweight diassembler is now available with the --disassemble option. The --disassembly-start and --dissembly-offset options control disassembly. See the documentation for more details.
  • Pseudo-ops accept array and tuple expressions as operands
  • The range function generates an integer array from given arguments.

Changes

  • The command-line options -E and --ignore-colons has been removed.
  • The --createconfig option is now a flag that will generate a config file called 'config.json' from the passed options.
  • The macro string literal substitution of the form @"{macro_param}" has been removed. String interpolation is now supported as a replacement capable of full stringifying full expressions.
  • The following built-in functions have been removed (see above): concat, filter, len, map, reduce, and sort.
  • The poke function now returns the value of the poked value.
  • The preprocessing directives .macro, .binclude and .include are now affected by the -C option.
  • Parsing grammar simplification.
  • Further improvements to error highlighting.
  • The core assembler functionality has been packaged into its own project as a separated library called Sixty502DotNet.Shared.

Fixes

  • Fixed certain 6809 cwai and certain indexed instructions.
  • The --config option had a defect that occasionally prevented the JSON schema from validating.
  • Certain values caused problems for the cbmflt and cbmfltp functionality (both the pseudo-op directives and related functions)

v3.2

1 year ago

Release 3.2

Features

Functions

New functional support for array, with the following functions:

  • concat: Concatenate two arrays or strings
  • filter: Filter array or string elements according to the specified predicate
  • map: Map array elements to new values according to the specified transform function
  • reduce: Reduce array elements to a new value according to the specified reducer function
  • sort: Sort the array or string

The function, or arrow, expression idiom has been added to the assembler syntax to support many of the above built-in functions. Function expressions work like callbacks and lambdas in other programming languages. See the wiki for usage and examples.

The .stringify directive

To generate string byte output from non-string values, ordinarily the format function would be used. A new directive .stringify allows the same in a compact format.

v3.1

1 year ago

Release 3.1

Changes

  • Loosened equality/comparison rules for doubles.
  • Minor refactoring of evaluation code.

v3.0

2 years ago

Release 3.0

Features

Directives

  • The pseudo-op .bankbytes extracts the bank byte values of expressions in the list
  • The pseudo-ops .hibytes and .lobytes extract upper and lower byte values of expressions in the list
  • The pseudo-ops .hiwords and .lowords extract upper and lower word values of expressions in the list
  • The directives .ifconst, .ifnconst and their corresponding .else directives allow for conditional assembly based on the constness of the expression
  • The scoping directive .import allows to use symbols defined in a separate scope without referring to them by their fully qualified name.

Command-Line Options

  • The command-line option -E completes source preprocessing and exits after outputting to the output stream
  • The command-line option --no-highlighting suppresses highlighting of causes of errors and warnings
  • The command-line option --Wall enables all other warning options
  • The command-line option --Wambiguous-zp warns when an argument could be zero-page or absolute
  • The command-line option --Wjump-bug warns whenever the indirect JMP bug is encountered when in 6502 mode
  • The command-line option --Wtext-in-non-text-pseudo-ops warns whenever string data is used in non-string pseudo-ops
  • The command-line option --Wsimplify-call-return warns whenever a subroutine call and subsequent return can be simplified to a jump
  • The command-line option --Wunreferenced-symbols issues a warning for every symbol that is defined but never referenced

Data types and operations

  • More robust type checking in expression evaluation
  • Multiline strings
  • Multidimensional and associative arrays (dictionaries)
  • Range operations on array and string sequences
  • String concatenation with the + operator
  • The arithmetic right shift operator >>> and its complement assignment >>>= shift an integer to the right while preserving its sign
  • The identity equality operators === and !== test if two identifiers refer to the same object
  • Pre- and post-fix increment operations (++ and --) for numeric variables
  • Support for floating point hexadecimal exponential notation, and for floating point non-decimal literals generally
  • A \ followed by a line feed/carriage escapes the newline character
  • The discard _ variable is available for operations where the result of an expression is not needed

Built-in symbols

  • The sizeof function returns the size (in bytes) of the argument. This is distinct from the existing len function that merely reports the length of the string or array expression
  • The int and float functions convert the number argument into an integer or float, respectively
  • The constant MATH_TAU represents τ, which is the count of radians in a turn (2*π)
  • The typeof function returns the expression type in the argument

Changes

Labels

  • Label setting in condition blocks will result in errors if they are set in multiple condition blocks, since symbols now are created in compile time rather than runtime, while conditions evaluate only at runtime. Refer to documentation for further details
  • As a result of the change described above, the use of the .label directive is unnecessary for .goto statements to the label that occur past the label's definition

Data types

  • Type enforcement and safety in expressions, e.g. mathematical operators only work for mathematical operands, compare for boolean, etc.)
  • Some directives require constant expressions for their operands, but those expressions can be prefix or infix
  • Custom user functions now support multiple return types, including complex types like arrays and dictionaries
  • String characters can be accessed by index

Diagnostics

  • Warnings and errors in included files will also report the inclusion source file and line where the .include directive has bene invoked
  • Similarly, warnings and errors in expanded macros will report the macro invocation source file and line
  • The short name of --errors to output errors to the text file in the specified path is now -e, since -E is repurposed for preprocessed output.

Parsing

  • 6502.Net now leverages ANTLR, an open source parser generator. This change allows more advanced features and expression types to be incorporated into the application

Other changes

  • Mnemonics and register names are now considered reserved words for the current target CPU only at runtime, and are available as symbols otherwise. See documentation for full details
  • The \ in a string can only follow a valid escape character.
  • The .let directive now accepts multiple assignment expressions
  • Colons will no longer be recognized as statement delimiters when occurring in semi-colon comments; this makes the command-line option --ignore-colons deprecated
  • The .cpu, .end, .macro/.endmacro and .include/.binclude preprocessor directives are always case insensitive, and are not affected by the -C option
  • The argument f/full of the command-line option --createconfig will enumerate the entire options, whether or not the were specified, instead of generating a sample
  • The .break (or similar control directive) is now strictly optional in switch .case statements, and fallthroughs will not be reported to the user.

Fixes

  • Certain macro expansions stopped working correctly after a recent update. This has been fixed
  • Fixed a bug where assembly status would report too few bytes if assembly reached the end of the 64KiB address space
  • The poke() function was not behaving according to its documentation for addresses outside the bounds of the generated code

v2.8.1

2 years ago

Release 2.8.1

Features

  • The three-way compare operator <=>.
  • The ternary expression a?b:c.
  • More performance improvements to the evaluation engine.
  • Individual chars in string constants be accessed by index.

Changes

  • Subscript expressions allowed for certain illegal values.
  • Minor changes to listing output preamble.

Fixes

  • Certain directives would error if they were preceded by labels.
  • Fixed a defect where assembly bytes in listing output were blank after .relocate directive.

v2.8

2 years ago

Release 2.8

Features

  • New assignment operators are now supported
    • Along with the .let keyword, the := operator can be used to define and assign values to variables.
    • Variables can also be mutated using compound operators, such as += and &=.
  • Added the .label directive for labels back-referenced from .goto directives, which avoids label redefinition errors.
  • New flow control command .do ... .whiletrue.
  • Enumerations are supported with the .enum keyword.
  • Slight performance improvement when referencing and updating label and variable values.

Changes

  • Section definintion syntax in config files has changed.
  • More improvements to source highlighting in error and warning messages.
  • The .target directive is no longer supported.

Fixes

  • The .switch directive had some errors.
  • Certain expressions in macro parameters were not processing correctly.
  • Some math expressions were incorrectly interpreted as conditional expressions.
  • Creating string array variables, and assigning variables to individual elements in an string array should work.
  • Certain .goto destinations were not being recognized.
  • The defect causing the .page directive to throw errors incorrectly has been fixed.
  • Certain sections with assembly were not being written to the output.
  • The .map keyword is did not behave correctly with string literal arguments.