
Note that we document changes to the source files and
closely related files (Makefile, test cases) only, this
is *not* a complete record of every single change ever
made. Check the GitHub commit history for that. :-)

new in DASM version 2.20.16:

    * Comprehensive memory safety and correctness audit of all C source
      files. Every bug found was fixed.

    * Fixed heap buffer overflow in asmerr(): when deeply chained forward
      references force more passes than the -p limit, pass exceeded
      nMaxPasses and bStopAtEnd[pass] wrote one element past the end of
      the allocated array. Found via AddressSanitizer.

    * Fixed stack buffer overflows in parse() (no bounds check on the
      Avbuf write loop), cleanup() (buffer sized for input but not for
      reformatted output), and outlistfile() (unbounded sprintf).

    * Fixed use-after-free in the small block allocator: small_free_all()
      freed all memory blocks but did not reset the internal cursor
      (buf/left), so the next small_alloc() call wrote into freed memory.
      Cursor variables promoted to file scope and reset in small_free_all().

    * Fixed getc() return value stored as unsigned int in getwlh() in
      both ftohex.c and ftobin.c, masking the EOF sentinel and producing
      garbage output on truncated binary input. ftohex now opens input
      files in binary mode to prevent text-mode mangling of 0x1A and
      line endings on Windows.

    * Fixed wrong memset byte count for bStopAtEnd array (was
      nMaxPasses+1 bytes, missing *sizeof(bool)).

    * Fixed non-literal format string passed directly to fprintf in
      asmerr(), a format-string injection risk.

    * Fixed undefined behaviour from signed left-shifts in the expression
      evaluator (exp.c) and the DS directive handler (ops.c); values cast
      to unsigned before shifting.

    * Fixed divide-by-zero in v_align() when the alignment value is zero.

    * Fixed per-pass memory leak in v_incbin(): SYMBOL list was not freed
      on each pass. Also fixed a premature-free bug and added a guard
      against negative skip values.

    * Fixed buffer overflow risk in v_dc() when generating multi-byte
      character constants: Gen[] buffer now flushed before each character.

    * Fixed v_setsym() using strcpy instead of snprintf.

    * Fixed local symbol name buffer in findsymbol() and CreateSymbol()
      in symbols.c: buffer was 14 bytes too small for worst-case index
      values; widened and switched to snprintf.

    * Fixed asm.h missing its include guard entirely, causing duplicate
      enum declarations when two headers both included it.

    * Rewrote symbols.h to match the actual symbols.c implementation;
      the previous version was an aspirational redesign with wrong function
      names, wrong sortmode_t values, and functions that do not exist.

    * Fixed version.h DASM_PRINT_LEGAL macro: expanded to syntactically
      invalid C (void)puts("...")(void) -- compile error if invoked.

    * Declared panic() in errors.h so all translation units see the
      prototype; previously only forward-declared inside main.c, causing
      implicit-declaration errors on Clang.

    * Added missing #include "util.h" to errors.c, making getprogname()
      and strlcat() visible on Linux and eliminating implicit-declaration
      warnings.

    * Build system: object files now placed in src/.objs/<OS>/ so that
      macOS and Linux builds can coexist in the same source tree without
      object files from one platform overwriting the other.

    * CI/CD: GitHub Actions workflow updated to create an official GitHub
      release (as a draft) with platform-specific zip archives when a
      version tag (v*) is pushed. Previous workflow only uploaded
      short-lived build artifacts.

    * Full test suite run under AddressSanitizer and UndefinedBehaviourSan;
      no sanitiser errors remain on any input including adversarial cases.

    * All source files reformatted to consistent K&R style.

new in DASM version 2.20.14:

    * Technical Documentation / User Guide for dasm in PDF format,
      written by Andrew Davie in his engaging style.

    * Dynamic Labels support by concatenating evaluated values

    * Multiline C style /* */ comments

    * Support for mc68hc908 controller family

    * Cleaned up and improved Unit Tests

    * new switch -R to remove output file if dasm found an
      error during assembly

    * Small optimization in the Atari 2600 CLEAN_START macro

    * SETSTR expression; typically used within a macro to use 
      the name of an argument

DASM version 2.20.13:

    * longstring segfault fix
    * fix for non-symbol-compliant unquoted filenames
    * address expression fix
    * makefile portability fixes
    * added atari 7800 support
    * allow labels to shift between multiple passes
    * fix for silenced single pass non-abort errors
    * adjust .byte and .word negative range check
    * duplicate macro fix
    * reduce gcc Wall option build warnings
    * added 'strict' syntax check mode (+ added to docs)
    * enable .word size check for strict-mode only
    * dynamic buffers for pass-output update

DASM version 2.20.12:

	* Fix for handling linux linefeeds under Windows 
	  (fix by msaarna)

	* Fix for segfault on long lines

	* Supports using constants for include files 
	  (enhancement by SpiceWare)

	* 64-bit versions of DASM are now part of the release for 
	  all platforms.

	* Dockerfile for building a 'dasm build machine' docker image 
	  based on Ubuntu 16.04. This allows you to build the dasm 
	  executables for all platforms (Linux, Windows, macOS) in a 
	  single go for any branch of dasm.

2008-04-07  Peter H. Froehlich  <phf at acm dot org>

	* Makefile (dist:): added README.ANDREW and CREDITS;
	  corrected test/atari2600/ pattern

	* test/atari2600/*: removed one Atari 2600 test case
	  due to concerns about the original Atari copyright
	  on the code; adjusted Makefile accordingly

	* src/main.c, doc/dasm.txt: synchronized usage information
	  between dasm itself and the documentation for dasm

	* src/main.c: completely removed deprecated -t option

	* src/ftohex.c: removed _fmode stuff that was necessary
	  for ancient C compilers for DOS

2008-04-06  Peter H. Froehlich  <phf at acm dot org>

	* Makefile: removed Apple specific warning option, added
	  -p to mkdir in build target (thanks to Andrew Davie);
	  added a test target to run all tests from trunk; added
	  "recursive clean" for test directory to clean target;
	  fixed dist target to allow for correctly structured
	  source and binary releases; default target now builds
	  DASM; install target added but just prints a warning

	* test/*: imported Matt Dillon's original test cases from
	  his 2.16 release

	* test/atari2600/*: added two "real" Atari 2600 programs as
	  test cases and created a trivial testing framework

	* test/Makefile, test/run_tests.sh: created a slightly more
	  advanced testing framework, still far from decent though

	* ChangeLog: finally wrote this file for everything that
	  happened since I took over :-)

2008-04-05  Peter H. Froehlich  <phf at acm dot org>

	* src/main.c: made command line behavior more Unix-like by
	  removing "spurious" output (version, completed); added a
	  new -E option to control format of error messages; also
	  refactored asmerr() to make it somewhat cleaner

	* src/asm.h src/global.c src/main.c: turned -T sortmode stuff
	  into a proper enum type and refactored main.c code to use
	  enum constants for range checking

	* Makefile: added to produce beta releases as well as final
	  releases; beta releases work, final releases don't yet

	* src/*: introduced the new "standard header" in all our
	  source files

2008-04-04  Peter H. Froehlich  <phf at acm dot org>

	* src/asm.h: completely removed the old "bool" defines,
	  were not in use anymore anyway (see 2008-04-01)

	* src/main.c: replaced calls of non-standard atoi() with
	  standard strtol(), no error checking yet; added range
	  checking for -T option

	* src/asm.h src/globals.c src/main.c: introduced a "regular"
	  configuration variable F_sortmode for the -T option; the
	  bTableSort hack is however not gone yet

	* src/Makefile: switched on many more warning options,
	  including -Wextra temporarily

	* src/*: fixed more warnings, many of which came from
	  what -Wextra said about field initializations in the
	  opcode tables

	* src/asm.h src/mne*.c: added MNEMONIC_NULL macro to
	  mark the end of MNEMONIC tables correctly and without
	  duplicating the code in every file

2008-04-03  Peter H. Froehlich  <phf at acm dot org>

	* src/Makefile: added target to make an alpha release,
	  reorganized structure to be more obvious

2008-04-02  Peter H. Froehlich  <phf at acm dot org>

	* src/main.c (CompareAlpha, CompareAddress): rewrote
	  CompareAlpha() to call strcasecmp() instead of
          allocating memory for both strings, converting
	  them to lower case inline with one loop for each
	  string, calling strcmp(), and then freeing memory
	  again; also corrected the casts from const void*
	  to const SYMBOL** following the example for qsort(3)
	  from the Linux man page

	* src/Makefile: switched on many more warning options

	* src/*: fixed lots of warnings: shadowing, some
	  more static, lots and lots of const (and casts
	  losing const when they shouldn't)

2008-04-01  Peter H. Froehlich  <phf at acm dot org>

	* src/mnef8.c: replaced uses of non-standard stricmp() with
	  standard strcasecmp()

	* src/asm.h (SYMBOL): made "value" field signed again, fixing
	  the long-standing "-1 bug" (partially for sure)

	* src/asm.h: switched to stdbool.h from custom define for bool

	* test/negative.h: added a new test case for negative literals

	* src/Makefile: use gcc to build on Unix systems, added mnef8.c
	  to dependencies, added a "clean" target, switched to C99 and
	  enabled many warning options

	* src/*: fixed lots of warnings in all source files, mostly
	  concerned with initializion of MNEMONIC tables and various
          printf format codes; also added "static" to many functions
	  that are used only within one file and removed several of
	  the prototypes that were unnecessary because of this

Note that there is a long and involved history of changes from
before 2.20.11 that was not reconstructed here. It would be an
interesting (if Quixotic) project to actually do the necessary
research, but it's not on my agenda for the near future.

