- } else if (address == 0x8000004) { /* SLU: XCSR */
- /* TODO: Should I artificially restrict printing in the simulator? */
- /* It might help catch bugs like the GCC bug that slipped past SIMH. */
- return 0b1;
- } else if (address == 0x8000008) { /* SLU: RBUF */
- if (is_stdin_nonempty()) {
- return getchar();
- } else {
- return (uint8_t)rand();
- }
- } else if (address == 0x800000C) { /* SLU: RCSR */
- if (is_stdin_nonempty()) {
- return 0b1;
- } else {
- return 0b0;
- }
- } else if (address >= 0x20000000) { /* RAM */