Skip to content

Main content

Interrupt Vector Byte Offset Tool

Calculate a vector table entry's byte offset and address from an explicit table layout.

Loading tool…

Description

Multiply index by entry size for offsetBytes and add base for byteAddress.

Address calculations distinguish an occupied last byte from an exclusive end, and alignment rounds to a defined boundary. Element counts and byte counts are not interchangeable.

Multiply index by entry size for offsetBytes and add base for byteAddress.

When to use this tool

Use Interrupt Vector Byte Offset when you need an explicit address, alignment, page, or transfer-count mapping.

How to use the tool and how it works

  1. Enter vectorIndex, bytesPerEntry, baseByteAddress. Use the units and conventions below.
  2. Run the tool. Correct any format, range, or cross-field input error before interpreting the output.
  3. Read offsetBytes, byteAddress. Use the output convention below.

Require nonnegative vectorIndex and baseByteAddress and positive bytesPerEntry. Multiply index by entry size for offsetBytes and add base for byteAddress.1

Input fieldMeaning and unitsAccepted input
vectorIndexVector IndexRequired. Safe integer; minimum 0.
bytesPerEntryBytes Per EntryRequired. Safe integer; minimum 1.
baseByteAddressNumeric address in the stated address-unit convention; no actual memory is read.Required. Safe integer; minimum 0.
Output fieldInterpretationReturned shape
offsetBytesOffset BytesRequired. Safe integer.
byteAddressByte AddressRequired. Safe integer.
json
{
  "input": {
    "vectorIndex": 7,
    "bytesPerEntry": 4,
    "baseByteAddress": 256
  },
  "output": {
    "offsetBytes": 28,
    "byteAddress": 284
  }
}

Limitations and assumptions

  • All inputs are safe integers but arithmetic remains numeric; memory bounds, device vector layout, alignment, and hardware access are not validated.
  • Inputs must satisfy both the field types and the cross-field conditions above. Invalid input causes an error; a successful false flag or documented placeholder is a different result.
  • Numeric calculations use binary floating point unless exact decimal-integer arithmetic is explicitly stated. No hidden measurement tolerance or decimal rounding is added; nonfinite or out-of-contract results are rejected. Numeric signed-zero results are exported as zero.

Alternative or Complementary methods

Validate the resulting span against actual memory bounds and device-specific access and transfer rules.

References

  1. Calculation and input contract: microcontroller/interrupt-vector-byte-offset — tool.io

Similar or alternative tools