SCRYDOSBox-XReferenceReadregistersAlso in MAME

DOSBox-XRead

registers

Read the cpu's registers, now or as they were at the last stop.

registers(from_last_stop=false)

Try it

On Bricks, the game this repository builds, stopped at brick_hit as the ball knocks out its first brick.
Ask

Show me the cpu's registers at this stop.

Call
registers()
Reply 1 of 3 fields
{
  "summary": "registers: 15 registers"
}

Fifteen registers came back. The whole reply, folded below, lists each under regs as a hex string.

The whole reply
JSON
{
  "summary": "registers: 15 registers",
  "status": "ok",
  "regs": {
    "EAX": "0x00000005",
    "EBX": "0x00000707",
    "ECX": "0x005b0020",
    "EDX": "0x00000000",
    "ESI": "0x00000039",
    "EDI": "0x000064e4",
    "EBP": "0x0000091c",
    "ESP": "0x0000fffa",
    "EIP": "0x000002c8",
    "CS": "0x08df",
    "DS": "0x08df",
    "ES": "0xa000",
    "FS": "0x0000",
    "GS": "0x0000",
    "SS": "0x08df"
  }
}

Arguments

from_last_stop boolean, default false
true returns the registers the last stop recorded, and answers while the program runs. Left out, the registers are read now.

What comes back

regs
Each register by name, as a hex string of its own width.
superseded
true with from_last_stop: the values are the last stop's, which last_stop identifies, not the current ones.
All 2 reply fields
  • regs (object)
  • superseded (boolean)

What it refuses

Why it works this way

CR0, CR3 and the descriptor tables are not here: machine_map(sections=["control"]) reads them.

The contract your client receives
Text
The registers at this stop. `from_last_stop=True` returns the registers of the last stop,
never the current value; refused (`no_stop`) before any stop.

Reply: `regs` (hex strings), `superseded` (with `from_last_stop`). CR0, CR3 and descriptor
tables: `machine_map(sections=["control"])`.
Tools