Skip to content

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

40 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

ZAS

What is ZAS?

It's an assembler for processor ZP-80

Table of contents

RoadMap

  • 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

Description

Diagram

+-----------+    +------------------------+    +------------+    
| input.asm | -> | Include depedendencies | -> | Preprocess | 
+-----------+    +------------------------+    +------------+    
                                                          |
+------------+    +-----------+    +----------------+     |
| output.bin | <- | Compiling | <- | Parsing labels | <---/
+------------+    +-----------+    +----------------+

Deployment

NOTE
YOU SHOULD HAVE RUST AND CARGO TO INSTALL THIS EMULATOR

Rust Installation

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

Installation

  1. Download or clone this repo:
    • Git: $ git clone https://github.com/MrZloHex/zas.git
  2. Change working directory to zas:
    • $ cd zas
  3. Run installation script:
    • $ ./install.sh -i
    • NOTE You need to have sudo access.

Uninstallation

  1. Change working directory to zas:
    • $ cd zas
  2. Run uninstallation script:
    • $ ./install.sh -u
  3. Go out from directory:
    • $ cd ..

Usage

Building

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.

Examples

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"

About

Assembler for ZP-80

Topics

Resources

Stars

3 stars

Watchers

1 watching

Forks

Releases

Contributors

Languages