@gaialabs/core 0.1.12 → 0.1.13
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/dist/index.js +7 -4
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +8 -5
- package/dist/index.mjs.map +1 -1
- package/package.json +2 -2
package/dist/index.js
CHANGED
|
@@ -715,9 +715,11 @@ var AddressingModeHandler = class {
|
|
|
715
715
|
case "Immediate":
|
|
716
716
|
this.handleImmediateMode(code.mnem, context.size, operands, reg);
|
|
717
717
|
break;
|
|
718
|
+
case "AbsoluteIndexedIndirect":
|
|
719
|
+
this.handleAbsoluteMode(code.mnem, void 0, context.nextAddress, reg.dataBank, operands, reg, true);
|
|
720
|
+
break;
|
|
718
721
|
case "AbsoluteIndirect":
|
|
719
722
|
case "AbsoluteIndirectLong":
|
|
720
|
-
case "AbsoluteIndexedIndirect":
|
|
721
723
|
case "Absolute":
|
|
722
724
|
case "AbsoluteIndexedX":
|
|
723
725
|
case "AbsoluteIndexedY":
|
|
@@ -847,19 +849,20 @@ var AddressingModeHandler = class {
|
|
|
847
849
|
const stackOperations = new StackOperations(reg, this._blockReader);
|
|
848
850
|
stackOperations.handleStackOperation(mnemonic);
|
|
849
851
|
}
|
|
850
|
-
handleAbsoluteMode(mnemonic, xBank1, next, dataBank, operands, registers) {
|
|
852
|
+
handleAbsoluteMode(mnemonic, xBank1, next, dataBank, operands, registers, isIndexedIndirect = false) {
|
|
851
853
|
let refLoc = this._dataReader.readUShort();
|
|
852
854
|
const isPush = this.isPushInstruction(mnemonic);
|
|
853
855
|
if (isPush) {
|
|
854
856
|
refLoc++;
|
|
855
857
|
}
|
|
856
|
-
const isJump = isPush || this.isJumpInstruction(mnemonic);
|
|
858
|
+
const isJump = isPush || isIndexedIndirect || this.isJumpInstruction(mnemonic);
|
|
857
859
|
const bank = xBank1 ?? (isJump ? this._dataReader.position >> 16 : dataBank ?? 129);
|
|
858
860
|
const addr = new shared.Address(bank, refLoc);
|
|
859
861
|
if (addr.isROM) {
|
|
860
862
|
const wrapper = new shared.LocationWrapper(addr.toInt(), shared.AddressType.Offset);
|
|
861
863
|
if (isJump) {
|
|
862
|
-
const
|
|
864
|
+
const type = isIndexedIndirect ? "*Code" : "Code";
|
|
865
|
+
const name = this._blockReader.noteType(wrapper.location, type, isPush, registers);
|
|
863
866
|
if (isPush) {
|
|
864
867
|
operands.push(`&${name}-1`);
|
|
865
868
|
return;
|