-
Notifications
You must be signed in to change notification settings - Fork 2
/
Copy pathmmio.txt
18 lines (13 loc) · 978 Bytes
/
mmio.txt
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
Default MMIO base: 0x80'00'00'00 (2 GiB)
Base + 0x00 (1 byte): Framebuffer ready flag
Software keeps this at zero while writing to the framebuffer. Once the framebuffer is ready to be painted, software
sets this to one. After the framebuffer is finished being painted, the simulator sets this back to zero.
Software can alternatively set this to a value greater than one to indicate that the framebuffer is always ready and
that the simulator shouldn't set the flag back to zero.
Base + 0x01 (1 byte): putchar cell
Writing a non-zero byte here will cause it to be printed to the terminal if the program was opened in text mode.
Base + 0x02 (2 bytes): keyboard input
When a key is pressed, its value will be available here. Reading from this location zeroes out its value.
Base + 0x04 (1 byte): keyboard pause flag
Writing a non-zero byte here will cause the simulation to be paused until a key is pressed.
Base + 0x01'00'00'00 (variable size): Framebuffer beginning