MIT License
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:
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]
: Run n
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 emulatorReleasing a new version is done by running doing the following steps:
Cargo.toml
. This can be automated using cargo-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')"
git commit -m "${VERSION}" ./Cargo.lock ./Cargo.toml
git push
git tag -s "${VERSION}"
git push --tags
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 ./Cargo.toml
git push
git tag -s "${VERSION}"
git push --tags