It's an assembler for processor ZP-80
- Simplest compilation
- Label parsing
- Make preprocessing with M4
- Make multiple file system compilation
- Dividing code into segments
- DATA and BSS sections
- Address arithmetic
- Turing complete in preprocessing
- Making offsets
- Vim syntax highlighting
+-----------+ +------------------------+ +------------+
| input.asm | -> | Include depedendencies | -> | Preprocess |
+-----------+ +------------------------+ +------------+
|
+------------+ +-----------+ +----------------+ |
| output.bin | <- | Compiling | <- | Parsing labels | <---/
+------------+ +-----------+ +----------------+
NOTE
YOU SHOULD HAVE RUST AND CARGO TO INSTALL THIS EMULATOR
Try run: $ curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh
And see official guide.
For cargo
try this:
- Ubuntu / Debian
$ sudo apt-get install cargo
- Arch
$ sudo pacman -S cargo
Or see official guide
- Download or clone this repo:
- Git:
$ git clone https://github.com/MrZloHex/zas.git
- Git:
- Change working directory to zas:
$ cd zas
- Run installation script:
$ ./install.sh -i
- NOTE You need to have sudo access.
- Change working directory to zas:
$ cd zas
- Run uninstallation script:
$ ./install.sh -u
- Go out from directory:
$ cd ..
For build your assembly code for ZP-80 run this:
$ zas build --input="<PATH TO YOUR CODE>" --output="<PATH TO OUTPUT BINARY>"
Options for build
subcommand:
- -i, --input:
This is obligatory option, where you specify the path to the source file.
E. g.$ emuBOOB build --input="project8008/src/main.asm"
- -o, --output:
With this option you can specify path and name of output bianry file.
E. g.$ emuBOOB build --input="project8008/src/main.asm" --output="target/my_app"
Flags for build
subcommand:
- -v, --verbose:
Will be displayed your assembly code and after opcodes for ZP-80. - -V, --version:
You will see version of ZAS. - -h, --help:
Display help information about compiler.
There are some examples of programs in examples directory.
Try compile multiply.asm
with zas. For this run:
$ zas build --input="examples/multiply.asm" --output="multiply"