SCRYDOSBox-XReferenceHardwarea20
a20
Read or set the A20 line, which decides whether addresses past 1 MB wrap around to 0.
a20(method)
Try it
Ask
Is the A20 line on?
Call
a20(method="read")Reply 2 of 3 fields
{
"summary": "a20 read: the A20 gate is on",
"enabled": true
}enabled is true: the A20 line is on, so addresses past 1 MB do not wrap to 0.
The whole reply
JSON
{
"summary": "a20 read: the A20 gate is on",
"status": "ok",
"enabled": true
}The three methods
| method | what it does |
|---|---|
read |
Says whether the line is on. It writes nothing. |
on |
Turns the line on and reads it back. That is a write: the session is marked altered. |
off |
Turns the line off, the same way. |
Arguments
- method one of
"read","on","off", required read,onoroff, as above.
What comes back
- enabled
truewhen the A20 line is on.
All 1 reply fields
enabled(boolean)
What it refuses
- A machine that is running (
not_stopped). - A DOSBox-X whose debugger has no
A20command (no_channel). - A line that does not read back as set (
readback_refused). - An answer in a shape the tool does not know (
unexpected_answer).
Why it works this way
A DOS kernel loaded into the high memory area turns the line on for itself at each INT 21h. So a line set off may be undone at the program's next DOS call.
Related tools
The contract your client receives
Text
The A20 gate, which decides whether memory past 1 MB wraps to 0. Needs the machine
stopped.
`method`: one of `read`, `on`, `off`. The last two mark the session `altered` and read the
gate back.
Reply: `enabled`.
Refused: a build with no `A20` command (`no_channel`); a gate that does not read back as set
(`readback_refused`); a running guest
(`not_stopped`); an answer of another shape (`unexpected_answer`).
Reference: REFERENCE.md, The machine's hardware.