mirror of
https://github.com/fadden/6502bench.git
synced 2025-02-11 09:31:05 +00:00
Minor tweaks
Note that address region isolation doesn't prevent explicit label references from working (add update the test to prove it). Added a note about pre-label xrefs.
This commit is contained in:
parent
7a7ff44d3a
commit
3b20566b10
@ -1550,7 +1550,7 @@ namespace SourceGen {
|
||||
//
|
||||
// We want to tag both. So if "LDA $1000" becomes "LDA label-2", we want to
|
||||
// add a numeric reference to the code at $1000, and a symbolic reference to the
|
||||
// labe at $1002, that point back to the LDA instruction. These are presented
|
||||
// label at $1002, that point back to the LDA instruction. These are presented
|
||||
// slightly differently to the user. For a symbolic reference with no adjustment,
|
||||
// we don't add the (redundant) numeric reference.
|
||||
//
|
||||
@ -1648,6 +1648,12 @@ namespace SourceGen {
|
||||
mAnattribs[operandOffset].Address;
|
||||
}
|
||||
|
||||
// TODO: to handle pre-labels correctly, we need to associate an
|
||||
// XrefSet with an address region, and add the reference there. We
|
||||
// currently attach it to the offset of the first byte in the region,
|
||||
// which means you don't see anything in the references window when
|
||||
// the pre-label line is selected.
|
||||
|
||||
AddXref(symOffset, new XrefSet.Xref(offset, true, xrefType, accType,
|
||||
accessFlags, adj));
|
||||
if (adj == 0) {
|
||||
|
@ -3947,7 +3947,8 @@ namespace SourceGen {
|
||||
return;
|
||||
}
|
||||
int lineIndex = mMainWin.CodeListView_GetFirstSelectedIndex();
|
||||
LineListGen.Line.Type type = CodeLineList[lineIndex].LineType;
|
||||
LineListGen.Line line = CodeLineList[lineIndex];
|
||||
LineListGen.Line.Type type = line.LineType;
|
||||
if (type != LineListGen.Line.Type.Code &&
|
||||
type != LineListGen.Line.Type.Data &&
|
||||
type != LineListGen.Line.Type.EquDirective &&
|
||||
@ -3960,10 +3961,10 @@ namespace SourceGen {
|
||||
|
||||
// Find the appropriate xref set.
|
||||
if (type == LineListGen.Line.Type.LocalVariableTable) {
|
||||
DefSymbol defSym = CodeLineList.GetLocalVariableFromLine(CodeLineList[lineIndex]);
|
||||
DefSymbol defSym = CodeLineList.GetLocalVariableFromLine(line);
|
||||
xrefs = (defSym == null) ? null : defSym.Xrefs;
|
||||
} else {
|
||||
int offset = CodeLineList[lineIndex].FileOffset;
|
||||
int offset = line.FileOffset;
|
||||
if (offset < 0) {
|
||||
// EQU in header
|
||||
int index = LineListGen.DefSymIndexFromOffset(offset);
|
||||
|
@ -232,7 +232,7 @@
|
||||
},
|
||||
|
||||
"Comments":{
|
||||
},
|
||||
"9":"operand label set manually"},
|
||||
|
||||
"LongComments":{
|
||||
},
|
||||
@ -396,7 +396,13 @@
|
||||
"LabelAnno":"None"}},
|
||||
|
||||
"OperandFormats":{
|
||||
},
|
||||
"9":{
|
||||
"Length":3,
|
||||
"Format":"NumericLE",
|
||||
"SubFormat":"Symbol",
|
||||
"SymbolRef":{
|
||||
"Label":"region4",
|
||||
"Part":"Low"}}},
|
||||
|
||||
"LvTables":{
|
||||
},
|
||||
|
@ -9,7 +9,7 @@ IN_4 = $c000
|
||||
jsr region1
|
||||
jsr region2
|
||||
jsr THREE_K
|
||||
jsr $4000
|
||||
jsr region4 ;operand label set manually
|
||||
lda L9005
|
||||
lda LA008
|
||||
lda IN_3+11
|
||||
|
@ -9,7 +9,7 @@ IN_4 = $c000
|
||||
jsr region1
|
||||
jsr region2
|
||||
jsr THREE_K
|
||||
jsr $4000
|
||||
jsr region4 ;operand label set manually
|
||||
lda L9005
|
||||
lda LA008
|
||||
lda IN_3+11
|
||||
|
@ -9,7 +9,7 @@ IN_4 = $c000
|
||||
jsr region1
|
||||
jsr region2
|
||||
jsr THREE_K
|
||||
jsr $4000
|
||||
jsr region4 ;operand label set manually
|
||||
lda L9005
|
||||
lda LA008
|
||||
lda IN_3+11
|
||||
|
@ -8,7 +8,7 @@ IN_4 equ $c000
|
||||
jsr region1
|
||||
jsr region2
|
||||
jsr THREE_K
|
||||
jsr $4000
|
||||
jsr region4 ;operand label set manually
|
||||
lda L9005
|
||||
lda LA008
|
||||
lda IN_3+11
|
||||
|
@ -106,7 +106,7 @@ namespace SourceGen {
|
||||
|
||||
public override string ToString() {
|
||||
return "Xref off=+" + Offset.ToString("x6") + " sym=" + IsByName +
|
||||
" type=" + Type + " accType= " + AccType + " flags=" + Flags +
|
||||
" type=" + Type + " accType=" + AccType + " flags=" + Flags +
|
||||
" adj=" + Adjustment;
|
||||
}
|
||||
}
|
||||
|
@ -684,6 +684,10 @@ jump to locations in our bank #1 code. It's useful to leave inbound
|
||||
resolution enabled so that we can reference the table from the code
|
||||
that copies it to RAM.</p>
|
||||
|
||||
<p>Note this only affects automatic operand resolution. You can set
|
||||
operand symbols manually to any location, regardless of the isolation
|
||||
flags.</p>
|
||||
|
||||
|
||||
<h3 id="non-addr">Non-Addressable Areas</h3>
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user