@henols/c64-re-tools 2.0.0-rc.19 → 2.0.0-rc.20
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@henols/c64-re-tools",
|
|
3
|
-
"version": "2.0.0-rc.
|
|
3
|
+
"version": "2.0.0-rc.20",
|
|
4
4
|
"description": "Agent-friendly Commodore 64 engineering toolkit for reverse engineering, debugging, development and testing.",
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"author": "Henrik Olsson",
|
|
@@ -432,7 +432,8 @@ export function layout(input: SourceInput): Layout {
|
|
|
432
432
|
}
|
|
433
433
|
for (const candidate of candidates) for (const arg of candidate.use.args) for (const name of identifiers(arg)) use(byName.get(name)!, "macro argument");
|
|
434
434
|
for (const symbol of input.symbols) want(symbol.address);
|
|
435
|
-
|
|
435
|
+
// A reference target inside a named data region without its own name is that region's name plus the offset: it makes no label (D84).
|
|
436
|
+
for (const target of input.referenceTargets) want(tableStart(target) ?? target);
|
|
436
437
|
if (input.entry !== undefined) want(input.entry);
|
|
437
438
|
// A use with a label inside it is written as its instructions, which then name their targets: that can put a label inside another use.
|
|
438
439
|
const accepted = new Set(candidates);
|
|
@@ -505,7 +506,7 @@ export function layout(input: SourceInput): Layout {
|
|
|
505
506
|
blocks.set(patch.start, { start: patch.start, end: patch.end, switch: patch.switch, code: patch.code, ...(patch.comment === undefined ? {} : { comment: patch.comment }), inner });
|
|
506
507
|
}
|
|
507
508
|
// The high byte of a vector is NMINV+1. A zero-page entry keeps zero-page instructions: its constant has two digits.
|
|
508
|
-
// An address inside a table keeps its own label when the source needs one there anyway, for example as
|
|
509
|
+
// An address inside a table keeps its own label when the source needs one there anyway, for example as the entry.
|
|
509
510
|
for (const [address, start] of insideEntry) if (!wanted.has(address)) names.set(address, `${names.get(start)!}+${address - start}`);
|
|
510
511
|
/** An expression with the names of this source: a name with an offset in brackets, so an operator after it keeps its meaning. */
|
|
511
512
|
const sourceText = (text: string) => replaceIdentifiers(text, (name) => {
|