This is an emulator for the z33 architecture used in the "Architecture des Systèmes d'Exploitation" course at the University of Strasbourg.
Binaries for the latest release are available here:
- Linux (x86 64bit)
- Linux (ARM 64bit)
- macOS (x86 64bit)
- macOS (ARM 64bit)
- Windows (x86 64bit)
- Windows (ARM 64bit)
The macOS binaries are not signed, and macOS will quarantine them by default. This can be fixed by removing the quarantine flag on the binary:
xattr -r -d com.apple.quarantine [path to]/z33-cli
Alternatively, it can be compiled from source with a recent enough Rust compiler (>= 1.40). Check the official documentation on how to install Rust.
git clone https://github.com/sandhose/z33-emulator
cd z33-emulator
cargo build --release
# Binary is available under `target/release/z33-cli'
[path to]/z33-cli run samples/fact.S main
[path to]/z33-cli run -i samples/fact.S main
help [command]
: Print the help message of a commandmemory <address> [n]
: Show a block of memory. The address can be either a register with or without offset (e.g.%sp-5
) or a literal (e.g.100
). The second argument is the number of cells to show (one by default).registers [register]
: Show the value of a register. If no register is specified, shows the value of all five of them.list
: Show the code that will be run next.step [n]
: Runn
step of the program (one by default).break <address>
: Set a breakpoint at given address.unbreak <address>
: Remove a breakpoint at given address.info breakpoints
: Show the list of breakpointscontinue
: Run the code until the next breakpointinterrupt
: Trigger a hardware interruptexit
: Exit the emulator
Releasing a new version is done by running doing the following steps:
- Change the crate version in the
Cargo.toml
. This can be automated usingcargo-edit
:# Edit the bump flag accordingly cargo set-version --bump patch # Crate version can be extracted like that VERSION="v$(cargo metadata --format-version=1 | jq -r '.packages[] | select(.name == "z33-cli").version')"
- Commit the changes
git commit -m "${VERSION}" ./Cargo.lock ./{web,emulator,cli}/Cargo.toml git push
- Create a new git tag and push it
git tag -s "${VERSION}" git push --tags
- Wait for the CI to create the draft GitHub release
- Finish the release from the GitHub interface
Full script
cargo set-version --bump patch
VERSION="v$(cargo metadata --format-version=1 | jq -r '.packages[] | select(.name == "z33-cli").version')"
git commit -m "${VERSION}" ./Cargo.lock ./{web,emulator,cli}/Cargo.toml
git push
git tag -s "${VERSION}"
git push --tags