# Dodo Dodo is a programming language for the [TRS-80 Color Computer (CoCo)](https://en.wikipedia.org/wiki/TRS-80_Color_Computer). ## Setup The easiest way to try out Dodo is via an emulator. ### macOS 1. Install [XRoar](https://www.6809.org.uk/xroar/) 1. Add `xroar` to your PATH ```sh sudo ln -s /Applications/XRoar.app/Contents/MacOS/xroar /usr/local/bin/xroar ``` 1. Install the required ROMs: ```sh cargo run -- setup ``` This downloads [`bas13.rom`](https://colorcomputerarchive.com/repo/ROMs/XRoar/CoCo/BASIC_OS/bas13.rom), [`extbas11.rom`](https://colorcomputerarchive.com/repo/ROMs/XRoar/CoCo/BASIC_OS/extbas11.rom), and [`disk11.rom`](https://colorcomputerarchive.com/repo/ROMs/XRoar/CoCo/DOS/disk11.rom) from the [Color Computer Archive](https://colorcomputerarchive.com/) into `~/.xroar/roms`, verifying their checksums. It's idempotent; use `--check` to report problems without downloading anything, or `--force` to re-download. 1. Run one of the [examples](./examples): ```sh cargo run -- run examples/01_hello.dodo ``` This builds a DECB disk image (`build/01_hello.dsk`), attaches it as drive 0, and types `LOADM"01HELLO":EXEC` into BASIC for you. Pass `--bin` to skip the disk image and autorun the `.bin` directly. To build artifacts without launching the emulator, use `cargo run -- build examples/01_hello.dodo` (a `.bin`) or pass `--dsk` for a disk image. ## Testing Unit tests run with plain `cargo test`. If `xroar` is on your PATH (and the ROMs above are installed), this also runs the end-to-end suite in `crates/dodo/tests/e2e/`, which executes compiled programs headlessly on an emulated CoCo 2 and asserts on the resulting memory contents. A cycle-count report for the programs in `crates/dodo/tests/e2e/perf/` (with optional per-program budgets) is available via: ```sh cargo test --test e2e perf_report -- --ignored --nocapture ``` See the doc comment in `crates/dodo/tests/e2e.rs` for the harness protocol and how to add new test programs.