| 76 | } |
| 77 | |
| 78 | public isOverlappingRange(startAddress: number, endAddress: number) { // Touching is overlapping |
| 79 | const length = endAddress - startAddress; |
| 80 | const s = Math.min(this.startAddress, startAddress); |
| 81 | const e = Math.max(this.endAddress, endAddress); |
| 82 | const l = e - s; |
| 83 | if (l > (this.span + length)) { |
| 84 | // combined length is greather than the sum of two lengths |
| 85 | return false; |
| 86 | } |
| 87 | return true; |
| 88 | } |
| 89 | |
| 90 | public findInstrIndex(address: number): number { |
| 91 | const len = this.instructions.length; |