About This Tool
Mainframe Calculator is a browser-based utility to assist in dump analysis or interactive testing. This calculator works better for these than the Windows calculator due to the save areas and room for notes.
It runs entirely in your browser with no installation, no server, and no data sent anywhere. Everything you type stays on your screen.
How to Use the Calculator
Purpose
The calculator is designed for mainframe programmers working through memory dumps or interactive debuggers. Enter a value in hex, decimal, or octal for each row, apply a plus or minus sign, and the total is calculated automatically.
Main rows
- BASE is your starting value — typically an address from a dump or a base register.
- OFFSET 1 through OFFSET 4 are values you add or subtract from the base.
- TOTAL is recalculated automatically whenever any editable row changes.
Number entry
- Type in Hex, Decimal, or Octal — the other two fields in that row update automatically.
- Use the + / - button on any offset row to control whether that row adds to or subtracts from the total.
- The Notes column is a free-text field for your own comments — module names, field descriptions, whatever helps you keep track.
Alignment code
A small code appears between the Hex and Notes columns. It shows the boundary alignment of the hex value in that row.
- D — doubleword boundary, divisible by 8.
- F — fullword boundary, divisible by 4 but not 8.
- H — halfword boundary, divisible by 2 but not 4.
- Blank — odd value, no boundary alignment.
Tip: use the alignment code to quickly verify that an address is on the correct boundary for a data structure. A fullword field at an odd address will show blank where you would expect F.
SaveArea
Below the main rows is a SaveArea with four rows. Use it to park values you want to keep handy while working through a dump — intermediate addresses, displacement values, or anything you might need again.
- >>>>> copies whatever main row currently has focus into that SaveArea row.
- <<<<< loads a SaveArea row back into whichever main row currently has focus.
- Click into a main row first so the calculator knows which row is active before you push or pull.
Buttons
- Instructions opens the instruction panel as a modal dialog directly on the calculator page.
- Reset clears all editable values to zero, clears all notes, restores all signs to plus, and recalculates the total.
Keyboard use
- Use Tab to move between fields and buttons.
- Use Enter or Space to activate buttons.
- Use Esc to close the Instructions modal when it is open.
Large value support
All arithmetic uses JavaScript BigInt, so the calculator handles values up to and beyond FFFFFFFFFFFFFFFF without rounding or precision loss. There is no overflow for practical mainframe address work.