z80asm is a powerful macro assembler for the Zilog Z80 microprocessor, developed by Bas Wijnen. It provides a flexible and efficient way to write assembly code for Z80-based systems, with support for macros, conditional assembly, and more.
- Installation
- Usage
- Testing
- Contributing
- License
- CMake (version 3.10 or higher)
- C Compiler (e.g., GCC, Clang)
- gettext (for localization support, optional)
-
Clone the repository:
git clone https://github.com/lvitals/z80asm.git cd z80asm -
Create a build directory and configure the project:
mkdir build cd build cmake .. -
Build the project:
make -
Install the executable (optional):
sudo make installThis will install
z80asmto/usr/local/binby default.
To assemble a .asm file, use the following command:
z80asm -I /usr/local/share/z80asm/headers your_file.asm -o output.bin
-I: Specifies the directory for include files.-o: Specifies the output file.
z80asm -I /usr/local/share/z80asm/headers example.asm -o example.bin
The project includes a test suite to verify the functionality of z80asm. To run the tests:
-
Build the project (if not already built):
mkdir build cd build cmake .. make -
Run the tests using
ctest:ctest -VThe
-Vflag enables verbose output, so you can see the detailed results of each test.
The test files are located in the tests directory. Each test consists of:
- An
.asmfile (input). - A
.correct-binfile (expected binary output). - A
.correct-errfile (expected error output).
The test script compiles each .asm file and compares the output with the expected results.
Contributions are welcome! If you'd like to contribute to z80asm, please follow these steps:
- Fork the repository.
- Create a new branch for your feature or bugfix.
- Make your changes and commit them.
- Submit a pull request with a detailed description of your changes.
z80asm is licensed under the GNU General Public License (GPL). See the LICENSE file for more details.
- Bas Wijnen: Original author of
z80asm. - Contributors: Everyone who has contributed to the development of this project.
For more information, visit the official website.
This README.md provides a clear and concise guide for users to install, use, and test z80asm. Let me know if you need further adjustments!