Skip to content

Commit

Permalink
utils/sim: Document memory-mapped I/O interface.
Browse files Browse the repository at this point in the history
  • Loading branch information
asiekierka authored and mysterymath committed Mar 4, 2024
1 parent ad7fa4f commit de7f242
Showing 1 changed file with 10 additions and 3 deletions.
13 changes: 10 additions & 3 deletions utils/sim/mos-sim.c
Original file line number Diff line number Diff line change
Expand Up @@ -25,9 +25,16 @@ static const char usage[] =
"The simulated 6502 will execute a reset sequence through the vector at\n"
"$FFFC like a real 6502.\n"
"\n"
"Writing to $FFF7 aborts.\n"
"Writing to $FFF8 quits normally.\n"
"Writing to $FFF9 writes to stdout.\n"
"Memory-mapped I/O:\n"
"\n"
" Addr | Len | Description\n"
"$FFF0 | 4 | Read: CPU clock cycles from program start.\n"
" | | Write: Reset counter.\n"
"$FFF5 | 1 | Read: Character from standard input.\n"
"$FFF6 | 1 | Read: 1 if last $FFF5 read was EOF.\n"
"$FFF7 | 1 | Write: Aborts.\n"
"$FFF8 | 1 | Write: Exits, returning the written exit code.\n"
"$FFF9 | 1 | Write: Character to standard output.\n"
"\n"
"OPTIONS:\n"
"\t--cycles: Print cycle count to stderr.\n"
Expand Down

0 comments on commit de7f242

Please sign in to comment.