Show "ptr" for pointer use in cross-reference list

Consider:
 LDA $00 loads a value from address $00
 LDA $00,X might load from $00, or might not
 LDA ($00),Y dereferences $00 as a 16-bit pointer
 LDA ($00,X) dereferences a pointer, not necessarily from $00

When perusing the cross-reference list, it's useful to be able to
tell whether an instruction is accessing the location, using it as a
base address, or deferencing it as a pointer.  We now show "ptr" in
the list for pointer dereferences.  (We already showed "idx" for
indexed accesses.)
This commit is contained in:
Andy McFadden committed 2020-09-04 13:26:41 -07:00
1 parent 7c506dceb6
commit bd5b556a7f
5 files changed
+61 -15

No files matched your search

+17
View File
@@ -253,6 +253,23 @@ namespace Asm65 {
}
}
/// <summary>
/// True for instructions that dereference the operand.
/// </summary>
public bool IsPointerAccessInstruction {
get {
return AddrMode == AddressMode.DPIndexXInd ||
AddrMode == AddressMode.DPInd ||
AddrMode == AddressMode.DPIndLong ||
AddrMode == AddressMode.DPIndIndexY ||
AddrMode == AddressMode.DPIndIndexYLong ||
// indirect JMP/JSR
AddrMode == AddressMode.AbsInd ||
AddrMode == AddressMode.AbsIndLong ||
AddrMode == AddressMode.AbsIndexXInd;
}
}
/// <summary>
/// True if this is an absolute-address instruction whose operand is combined with
/// the Program Bank Register.