Skip to content
/ CASM Public

A fully customisable assembler for your own instruction sets

License

Notifications You must be signed in to change notification settings

SjVer/CASM

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

CASM

A fully customisable assembler for your own instruction sets!

  1. What Is CASM? 🇨
  2. Documentation 📚
  3. Command-Line Usage 💻
  4. How To Install CASM 💾
  5. Building CASM 🔨

🇨 What Is CASM?

CASM, or Customisable Assembler is an assembler that uses user-defined instruction sets, macros and output options to assemble a given assembly file into binary or textual machine code.


📚 Documentation

Check out the documentation here!


💻 Command-Line Usage

Usage:

casm [-v?V] [-o OUTFILE] [--output=OUTFILE] [--verbose] [--help]
    [--usage] [--version] INSTRFILE ASMFILE

Options:

  -o, --output=OUTFILE       Output to OUTFILE instead of to standard output
  -v, --verbose              Produce verbose output (-vv for extra verbosity)
  -?, --help                 Give this help list
      --usage                Give a short usage message
  -V, --version              Print program version

Examples:

$ casm z80.instr kernel.asm
$ casm -v z80.instr kernel.asm -o mykernel
$ casm -vv -w z80.instr kernel.asm -o mykernel

💾 How To Install CASM

NOTE: CASM HAS NOT YET BEEN RELEASED.
If you want to try it anyway you can always clone this repository and build it yourself.

🐧 Linux

Step 1: Download the debian package:

x86_64 casm_0.0.1_x86-64.deb
armv7l casm_0.0.1_armv7l.deb

Step 2: Go to the directory where you downloaded the `.deb` file and run the following command:
$ sudo apt install ./<downloaded file>.deb

This should install CASM on your device. To confirm the installation run casm --version.

🪟 Windows

Sadly, CASM on Windows is not yet supported. Maybe later!


🔨 Building CASM

If you want to build CASM yourself, here's how to do it (on linux).

commands:

git clone https://github.com/SjVer/CASM.git
cd ./CASM
make

example:

$ git clone https://github.com/SjVer/CASM.git
Cloning into 'CASM'...
remote: Enumerating objects: 407, done.
remote: Counting objects: 100% (407/407), done.
remote: Compressing objects: 100% (274/274), done.
remote: Total 407 (delta 233), reused 292 (delta 121), pack-reused 0
Receiving objects: 100% (407/407), 113.03 KiB | 1.85 MiB/s, done.
Resolving deltas: 100% (233/233), done.
$ cd ./CASM
$ make
[01/5] compiling compiler.c into compiler.o. done!
[02/5] compiling chunk.c into chunk.o. done!
[03/5] compiling cwalk.c into cwalk.o. done!
[04/5] compiling tools.c into tools.o. done!
[05/5] compiling main.c into main.o. done!
[final] compiling final product casm. done!
$ bin/casm --version
casm 0.0.1

The CASM executable should be in the bin directory.

About

A fully customisable assembler for your own instruction sets

Resources

License

Stars

Watchers

Forks

Packages

No packages published