From 4c81eacefebc6e53903abc80d211b1c1b0f18c7a Mon Sep 17 00:00:00 2001 From: Kugel Fuhr <98353208+kugelfuhr@users.noreply.github.com> Date: Fri, 20 Jun 2025 13:00:12 +0200 Subject: [PATCH] Added -d/--debug and -m/--multi-pass switches to the disassembler. The latter will make the disassembler run multiple preparation passes to find all addresses where labels must be placed. Without -m some label addresses are found in the final pass, where the disassembler cannot make use of them. --- doc/da65.sgml | 21 ++++++++++++++- src/da65/global.c | 2 +- src/da65/global.h | 4 ++- src/da65/labels.c | 14 ++++++++++ src/da65/labels.h | 3 +++ src/da65/main.c | 68 ++++++++++++++++++++++++++++++++++++++++++++--- src/da65/output.c | 16 +++++------ 7 files changed, 113 insertions(+), 15 deletions(-) diff --git a/doc/da65.sgml b/doc/da65.sgml index dd51a4764..314e552a9 100644 --- a/doc/da65.sgml +++ b/doc/da65.sgml @@ -46,14 +46,16 @@ The assembler accepts the following options: --------------------------------------------------------------------------- Usage: da65 [options] [inputfile] Short options: + -d Debug mode -g Add debug info to object file -h Help (this text) -i name Specify an info file + -m Run multiple passes to resolve labels -o name Name the output file -v Increase verbosity -F Add formfeeds to the output - -s Accept line markers in the info file -S addr Set the start/load address + -s Accept line markers in the info file -V Print the disassembler version Long options: @@ -61,6 +63,7 @@ Long options: --comment-column n Specify comment start column --comments n Set the comment level for the output --cpu type Set cpu type + --debug Debug mode --debug-info Add debug info to object file --formfeeds Add formfeeds to the output --help Help (this text) @@ -68,6 +71,7 @@ Long options: --info name Specify an info file --label-break n Add newline if label exceeds length n --mnemonic-column n Specify mnemonic start column + --multi-pass Run multiple passes to resolve labels --pagelength n Set the page length for the listing --start-addr addr Set the start/load address --sync-lines Accept line markers in the info file @@ -123,6 +127,12 @@ Here is a description of all the command line options: + -d, --debug + + Enables debug mode, something that should not be needed for mere + mortals:-) + +